vectornode.hpp revision 2667
/*
* 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_VECTORNODE_HPP
#define SHARE_VM_OPTO_VECTORNODE_HPP
#include "opto/matcher.hpp"
#include "opto/memnode.hpp"
#include "opto/opcodes.hpp"
//------------------------------VectorNode--------------------------------------
// Vector Operation
class VectorNode : public Node {
protected:
}
public:
friend class VectorLoadNode; // For vect_type
friend class VectorStoreNode; // ditto.
}
}
virtual int Opcode() const;
}
// Element and vector type
// Vector opcode from scalar opcode
};
//===========================Vector=ALU=Operations====================================
//------------------------------AddVBNode---------------------------------------
// Vector add byte
class AddVBNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------AddVCNode---------------------------------------
// Vector add char
class AddVCNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------AddVSNode---------------------------------------
// Vector add short
class AddVSNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------AddVINode---------------------------------------
// Vector add int
class AddVINode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------AddVLNode---------------------------------------
// Vector add long
class AddVLNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------AddVFNode---------------------------------------
// Vector add float
class AddVFNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------AddVDNode---------------------------------------
// Vector add double
class AddVDNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------SubVBNode---------------------------------------
// Vector subtract byte
class SubVBNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------SubVCNode---------------------------------------
// Vector subtract char
class SubVCNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------SubVSNode---------------------------------------
// Vector subtract short
class SubVSNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------SubVINode---------------------------------------
// Vector subtract int
class SubVINode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------SubVLNode---------------------------------------
// Vector subtract long
class SubVLNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------SubVFNode---------------------------------------
// Vector subtract float
class SubVFNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------SubVDNode---------------------------------------
// Vector subtract double
class SubVDNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------MulVFNode---------------------------------------
// Vector multiply float
class MulVFNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------MulVDNode---------------------------------------
// Vector multiply double
class MulVDNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------DivVFNode---------------------------------------
// Vector divide float
class DivVFNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------DivVDNode---------------------------------------
// Vector Divide double
class DivVDNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------LShiftVBNode---------------------------------------
// Vector lshift byte
class LShiftVBNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------LShiftVCNode---------------------------------------
// Vector lshift chars
class LShiftVCNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------LShiftVSNode---------------------------------------
// Vector lshift shorts
class LShiftVSNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------LShiftVINode---------------------------------------
// Vector lshift ints
class LShiftVINode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------URShiftVBNode---------------------------------------
// Vector urshift bytes
class URShiftVBNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------URShiftVCNode---------------------------------------
// Vector urshift char
class URShiftVCNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------URShiftVSNode---------------------------------------
// Vector urshift shorts
class URShiftVSNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------URShiftVINode---------------------------------------
// Vector urshift ints
class URShiftVINode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------AndVNode---------------------------------------
// Vector and
class AndVNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------OrVNode---------------------------------------
// Vector or
class OrVNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------XorVNode---------------------------------------
// Vector xor
class XorVNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//================================= M E M O R Y ==================================
//------------------------------VectorLoadNode--------------------------------------
// Vector Load from memory
class VectorLoadNode : public LoadNode {
protected:
// For use in constructor
}
public:
}
virtual int Opcode() const;
// Element and vector type
// Vector opcode from scalar opcode
};
//------------------------------Load16BNode--------------------------------------
// Vector load of 16 bytes (8bits signed) from memory
class Load16BNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store16B; }
};
//------------------------------Load8BNode--------------------------------------
// Vector load of 8 bytes (8bits signed) from memory
class Load8BNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store8B; }
};
//------------------------------Load4BNode--------------------------------------
// Vector load of 4 bytes (8bits signed) from memory
class Load4BNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store4B; }
};
//------------------------------Load8CNode--------------------------------------
// Vector load of 8 chars (16bits unsigned) from memory
class Load8CNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store8C; }
};
//------------------------------Load4CNode--------------------------------------
// Vector load of 4 chars (16bits unsigned) from memory
class Load4CNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store4C; }
};
//------------------------------Load2CNode--------------------------------------
// Vector load of 2 chars (16bits unsigned) from memory
class Load2CNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store2C; }
};
//------------------------------Load8SNode--------------------------------------
// Vector load of 8 shorts (16bits signed) from memory
class Load8SNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store8C; }
};
//------------------------------Load4SNode--------------------------------------
// Vector load of 4 shorts (16bits signed) from memory
class Load4SNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store4C; }
};
//------------------------------Load2SNode--------------------------------------
// Vector load of 2 shorts (16bits signed) from memory
class Load2SNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store2C; }
};
//------------------------------Load4INode--------------------------------------
// Vector load of 4 integers (32bits signed) from memory
class Load4INode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store4I; }
};
//------------------------------Load2INode--------------------------------------
// Vector load of 2 integers (32bits signed) from memory
class Load2INode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store2I; }
};
//------------------------------Load2LNode--------------------------------------
// Vector load of 2 longs (64bits signed) from memory
class Load2LNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store2L; }
};
//------------------------------Load4FNode--------------------------------------
// Vector load of 4 floats (32bits) from memory
class Load4FNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store4F; }
};
//------------------------------Load2FNode--------------------------------------
// Vector load of 2 floats (32bits) from memory
class Load2FNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store2F; }
};
//------------------------------Load2DNode--------------------------------------
// Vector load of 2 doubles (64bits) from memory
class Load2DNode : public VectorLoadNode {
protected:
public:
virtual int Opcode() const;
virtual int store_Opcode() const { return Op_Store2D; }
};
//------------------------------VectorStoreNode--------------------------------------
// Vector Store to memory
class VectorStoreNode : public StoreNode {
protected:
public:
}
virtual int Opcode() const;
// Element and vector type
// Vector opcode from scalar opcode
};
//------------------------------Store16BNode--------------------------------------
// Vector store of 16 bytes (8bits signed) to memory
class Store16BNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store8BNode--------------------------------------
// Vector store of 8 bytes (8bits signed) to memory
class Store8BNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store4BNode--------------------------------------
// Vector store of 4 bytes (8bits signed) to memory
class Store4BNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store8CNode--------------------------------------
class Store8CNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store4CNode--------------------------------------
class Store4CNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store2CNode--------------------------------------
class Store2CNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store4INode--------------------------------------
// Vector store of 4 integers (32bits signed) to memory
class Store4INode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store2INode--------------------------------------
// Vector store of 2 integers (32bits signed) to memory
class Store2INode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store2LNode--------------------------------------
// Vector store of 2 longs (64bits signed) to memory
class Store2LNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store4FNode--------------------------------------
// Vector store of 4 floats (32bits) to memory
class Store4FNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store2FNode--------------------------------------
// Vector store of 2 floats (32bits) to memory
class Store2FNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Store2DNode--------------------------------------
// Vector store of 2 doubles (64bits) to memory
class Store2DNode : public VectorStoreNode {
protected:
public:
virtual int Opcode() const;
};
//=========================Promote_Scalar_to_Vector====================================
//------------------------------Replicate16BNode---------------------------------------
// Replicate byte scalar to be vector of 16 bytes
class Replicate16BNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate8BNode---------------------------------------
// Replicate byte scalar to be vector of 8 bytes
class Replicate8BNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate4BNode---------------------------------------
// Replicate byte scalar to be vector of 4 bytes
class Replicate4BNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate8CNode---------------------------------------
// Replicate char scalar to be vector of 8 chars
class Replicate8CNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate4CNode---------------------------------------
// Replicate char scalar to be vector of 4 chars
class Replicate4CNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate2CNode---------------------------------------
// Replicate char scalar to be vector of 2 chars
class Replicate2CNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate8SNode---------------------------------------
// Replicate short scalar to be vector of 8 shorts
class Replicate8SNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate4SNode---------------------------------------
// Replicate short scalar to be vector of 4 shorts
class Replicate4SNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate2SNode---------------------------------------
// Replicate short scalar to be vector of 2 shorts
class Replicate2SNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate4INode---------------------------------------
// Replicate int scalar to be vector of 4 ints
class Replicate4INode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate2INode---------------------------------------
// Replicate int scalar to be vector of 2 ints
class Replicate2INode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate2LNode---------------------------------------
// Replicate long scalar to be vector of 2 longs
class Replicate2LNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate4FNode---------------------------------------
// Replicate float scalar to be vector of 4 floats
class Replicate4FNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate2FNode---------------------------------------
// Replicate float scalar to be vector of 2 floats
class Replicate2FNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Replicate2DNode---------------------------------------
// Replicate double scalar to be vector of 2 doubles
class Replicate2DNode : public VectorNode {
protected:
public:
virtual int Opcode() const;
};
//========================Pack_Scalars_into_a_Vector==============================
//------------------------------PackNode---------------------------------------
// Pack parent class (not for code generation).
class PackNode : public VectorNode {
public:
virtual int Opcode() const;
add_req(n);
_length++;
}
// Create a binary tree form for Packs. [lo, hi) (half-open) range
};
//------------------------------PackBNode---------------------------------------
// Pack byte scalars into vector
protected:
public:
virtual int Opcode() const;
};
//------------------------------PackCNode---------------------------------------
// Pack char scalars into vector
protected:
public:
virtual int Opcode() const;
};
//------------------------------PackSNode---------------------------------------
// Pack short scalars into a vector
protected:
public:
virtual int Opcode() const;
};
//------------------------------PackINode---------------------------------------
// Pack integer scalars into a vector
protected:
public:
virtual int Opcode() const;
};
//------------------------------PackLNode---------------------------------------
// Pack long scalars into a vector
protected:
public:
virtual int Opcode() const;
};
//------------------------------PackFNode---------------------------------------
// Pack float scalars into vector
protected:
public:
virtual int Opcode() const;
};
//------------------------------PackDNode---------------------------------------
// Pack double scalars into a vector
protected:
public:
virtual int Opcode() const;
};
// The Pack2xN nodes assist code generation. They are created from
// Pack4C, etc. nodes in final_graph_reshape in the form of a
// balanced, binary tree.
//------------------------------Pack2x1BNode-----------------------------------------
// Pack 2 1-byte integers into vector of 2 bytes
class Pack2x1BNode : public PackNode {
protected:
public:
virtual int Opcode() const;
};
//------------------------------Pack2x2BNode---------------------------------------
// Pack 2 2-byte integers into vector of 4 bytes
class Pack2x2BNode : public PackNode {
protected:
public:
virtual int Opcode() const;
};
//========================Extract_Scalar_from_Vector===============================
//------------------------------ExtractNode---------------------------------------
// Extract a scalar from a vector at position "pos"
class ExtractNode : public Node {
public:
}
virtual int Opcode() const;
};
//------------------------------ExtractBNode---------------------------------------
// Extract a byte from a vector at position "pos"
class ExtractBNode : public ExtractNode {
public:
virtual int Opcode() const;
};
//------------------------------ExtractCNode---------------------------------------
// Extract a char from a vector at position "pos"
class ExtractCNode : public ExtractNode {
public:
virtual int Opcode() const;
};
//------------------------------ExtractSNode---------------------------------------
// Extract a short from a vector at position "pos"
class ExtractSNode : public ExtractNode {
public:
virtual int Opcode() const;
};
//------------------------------ExtractINode---------------------------------------
// Extract an int from a vector at position "pos"
class ExtractINode : public ExtractNode {
public:
virtual int Opcode() const;
};
//------------------------------ExtractLNode---------------------------------------
// Extract a long from a vector at position "pos"
class ExtractLNode : public ExtractNode {
public:
virtual int Opcode() const;
};
//------------------------------ExtractFNode---------------------------------------
// Extract a float from a vector at position "pos"
class ExtractFNode : public ExtractNode {
public:
virtual int Opcode() const;
};
//------------------------------ExtractDNode---------------------------------------
// Extract a double from a vector at position "pos"
class ExtractDNode : public ExtractNode {
public:
virtual int Opcode() const;
};
#endif // SHARE_VM_OPTO_VECTORNODE_HPP