/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#ifndef SHARE_VM_OPTO_MULNODE_HPP
#define SHARE_VM_OPTO_MULNODE_HPP
#include "opto/opcodes.hpp"
// Portions of code courtesy of Clifford Click
class PhaseTransform;
//------------------------------MulNode----------------------------------------
// Classic MULTIPLY functionality. This covers all the usual 'multiply'
// behaviors for an algebraic ring. Multiply-integer, multiply-float,
// multiply-double, and binary-and are all inherited from this class. The
// various identity values are supplied by virtual functions.
public:
}
// Handle algebraic identities here. If we have an identity, return the Node
// we are equivalent to. We look for "add of zero" as an identity.
// We also canonicalize the Node, moving constants to the right input,
// and flatten expressions (so that 1+x+2 becomes x+3).
// Compute a new Type for this node. Basically we just do the pre-check,
// then call the virtual add() to set the type.
// Supplied function returns the product of the inputs.
// This also type-checks the inputs for sanity. Guaranteed never to
// be passed a TOP or BOTTOM type, these are filtered out by a pre-check.
// This call recognizes the multiplicative zero type.
// Supplied function to return the multiplicative identity type
// Supplied function to return the additive identity type
// Supplied function to return the additive opcode
virtual int add_opcode() const = 0;
// Supplied function to return the multiplicative opcode
virtual int mul_opcode() const = 0;
};
//------------------------------MulINode---------------------------------------
// Multiply 2 integers
public:
virtual int Opcode() const;
};
//------------------------------MulLNode---------------------------------------
// Multiply 2 longs
public:
virtual int Opcode() const;
};
//------------------------------MulFNode---------------------------------------
// Multiply 2 floats
public:
virtual int Opcode() const;
};
//------------------------------MulDNode---------------------------------------
// Multiply 2 doubles
public:
virtual int Opcode() const;
};
//-------------------------------MulHiLNode------------------------------------
// Upper 64 bits of a 64 bit by 64 bit multiply
public:
virtual int Opcode() const;
};
//------------------------------AndINode---------------------------------------
// Logically AND 2 integers. Included with the MUL nodes because it inherits
// all the behavior of multiplication on a ring.
public:
virtual int Opcode() const;
};
//------------------------------AndINode---------------------------------------
// Logically AND 2 longs. Included with the MUL nodes because it inherits
// all the behavior of multiplication on a ring.
public:
virtual int Opcode() const;
};
//------------------------------LShiftINode------------------------------------
// Logical shift left
public:
virtual int Opcode() const;
};
//------------------------------LShiftLNode------------------------------------
// Logical shift left
public:
virtual int Opcode() const;
};
//------------------------------RShiftINode------------------------------------
// Signed shift right
public:
virtual int Opcode() const;
};
//------------------------------RShiftLNode------------------------------------
// Signed shift right
public:
virtual int Opcode() const;
};
//------------------------------URShiftINode-----------------------------------
// Logical shift right
public:
virtual int Opcode() const;
};
//------------------------------URShiftLNode-----------------------------------
// Logical shift right
public:
virtual int Opcode() const;
};
#endif // SHARE_VM_OPTO_MULNODE_HPP