vectornode.hpp revision 1472
0N/A/*
1472N/A * Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A */
0N/A
0N/A//------------------------------VectorNode--------------------------------------
0N/A// Vector Operation
0N/Aclass VectorNode : public Node {
0N/A protected:
0N/A uint _length; // vector length
0N/A virtual BasicType elt_basic_type() const = 0; // Vector element basic type
0N/A
0N/A static const Type* vect_type(BasicType elt_bt, uint len);
0N/A static const Type* vect_type(const Type* elt_type, uint len) {
0N/A return vect_type(elt_type->array_element_basic_type(), len);
0N/A }
0N/A
0N/A public:
0N/A friend class VectorLoadNode; // For vect_type
0N/A friend class VectorStoreNode; // ditto.
0N/A
0N/A VectorNode(Node* n1, uint vlen) : Node(NULL, n1), _length(vlen) {
0N/A init_flags(Flag_is_Vector);
0N/A }
0N/A VectorNode(Node* n1, Node* n2, uint vlen) : Node(NULL, n1, n2), _length(vlen) {
0N/A init_flags(Flag_is_Vector);
0N/A }
0N/A virtual int Opcode() const;
0N/A
0N/A uint length() const { return _length; } // Vector length
0N/A
0N/A static uint max_vlen(BasicType bt) { // max vector length
29N/A return (uint)(Matcher::vector_width_in_bytes() / type2aelembytes(bt));
0N/A }
0N/A
0N/A // Element and vector type
0N/A const Type* elt_type() const { return Type::get_const_basic_type(elt_basic_type()); }
0N/A const Type* vect_type() const { return vect_type(elt_basic_type(), length()); }
0N/A
0N/A virtual const Type *bottom_type() const { return vect_type(); }
0N/A virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(); }
0N/A
0N/A // Vector opcode from scalar opcode
0N/A static int opcode(int sopc, uint vlen, const Type* opd_t);
0N/A
0N/A static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
0N/A
0N/A static VectorNode* make(Compile* C, int sopc, Node* n1, Node* n2, uint vlen, const Type* elt_t);
0N/A
0N/A};
0N/A
0N/A//===========================Vector=ALU=Operations====================================
0N/A
0N/A//------------------------------AddVBNode---------------------------------------
0N/A// Vector add byte
0N/Aclass AddVBNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A AddVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------AddVCNode---------------------------------------
0N/A// Vector add char
0N/Aclass AddVCNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A AddVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------AddVSNode---------------------------------------
0N/A// Vector add short
0N/Aclass AddVSNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A AddVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------AddVINode---------------------------------------
0N/A// Vector add int
0N/Aclass AddVINode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A AddVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------AddVLNode---------------------------------------
0N/A// Vector add long
0N/Aclass AddVLNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_LONG; }
0N/A public:
0N/A AddVLNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------AddVFNode---------------------------------------
0N/A// Vector add float
0N/Aclass AddVFNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A AddVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------AddVDNode---------------------------------------
0N/A// Vector add double
0N/Aclass AddVDNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_DOUBLE; }
0N/A public:
0N/A AddVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------SubVBNode---------------------------------------
0N/A// Vector subtract byte
0N/Aclass SubVBNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A SubVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------SubVCNode---------------------------------------
0N/A// Vector subtract char
0N/Aclass SubVCNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A SubVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------SubVSNode---------------------------------------
0N/A// Vector subtract short
0N/Aclass SubVSNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A SubVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------SubVINode---------------------------------------
0N/A// Vector subtract int
0N/Aclass SubVINode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A SubVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------SubVLNode---------------------------------------
0N/A// Vector subtract long
0N/Aclass SubVLNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_LONG; }
0N/A public:
0N/A SubVLNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------SubVFNode---------------------------------------
0N/A// Vector subtract float
0N/Aclass SubVFNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A SubVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------SubVDNode---------------------------------------
0N/A// Vector subtract double
0N/Aclass SubVDNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_DOUBLE; }
0N/A public:
0N/A SubVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------MulVFNode---------------------------------------
0N/A// Vector multiply float
0N/Aclass MulVFNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A MulVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------MulVDNode---------------------------------------
0N/A// Vector multiply double
0N/Aclass MulVDNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_DOUBLE; }
0N/A public:
0N/A MulVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------DivVFNode---------------------------------------
0N/A// Vector divide float
0N/Aclass DivVFNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A DivVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------DivVDNode---------------------------------------
0N/A// Vector Divide double
0N/Aclass DivVDNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_DOUBLE; }
0N/A public:
0N/A DivVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------LShiftVBNode---------------------------------------
0N/A// Vector lshift byte
0N/Aclass LShiftVBNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A LShiftVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------LShiftVCNode---------------------------------------
0N/A// Vector lshift chars
0N/Aclass LShiftVCNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A LShiftVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------LShiftVSNode---------------------------------------
0N/A// Vector lshift shorts
0N/Aclass LShiftVSNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A LShiftVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------LShiftVINode---------------------------------------
0N/A// Vector lshift ints
0N/Aclass LShiftVINode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A LShiftVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------URShiftVBNode---------------------------------------
0N/A// Vector urshift bytes
0N/Aclass URShiftVBNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A URShiftVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------URShiftVCNode---------------------------------------
0N/A// Vector urshift char
0N/Aclass URShiftVCNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A URShiftVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------URShiftVSNode---------------------------------------
0N/A// Vector urshift shorts
0N/Aclass URShiftVSNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A URShiftVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------URShiftVINode---------------------------------------
0N/A// Vector urshift ints
0N/Aclass URShiftVINode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A URShiftVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------AndVNode---------------------------------------
0N/A// Vector and
0N/Aclass AndVNode : public VectorNode {
0N/A protected:
0N/A BasicType _bt;
0N/A virtual BasicType elt_basic_type() const { return _bt; }
0N/A public:
0N/A AndVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------OrVNode---------------------------------------
0N/A// Vector or
0N/Aclass OrVNode : public VectorNode {
0N/A protected:
0N/A BasicType _bt;
0N/A virtual BasicType elt_basic_type() const { return _bt; }
0N/A public:
0N/A OrVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------XorVNode---------------------------------------
0N/A// Vector xor
0N/Aclass XorVNode : public VectorNode {
0N/A protected:
0N/A BasicType _bt;
0N/A virtual BasicType elt_basic_type() const { return _bt; }
0N/A public:
0N/A XorVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//================================= M E M O R Y ==================================
0N/A
0N/A
0N/A//------------------------------VectorLoadNode--------------------------------------
0N/A// Vector Load from memory
0N/Aclass VectorLoadNode : public LoadNode {
0N/A virtual uint size_of() const { return sizeof(*this); }
0N/A
0N/A protected:
0N/A virtual BasicType elt_basic_type() const = 0; // Vector element basic type
0N/A // For use in constructor
0N/A static const Type* vect_type(const Type* elt_type, uint len) {
0N/A return VectorNode::vect_type(elt_type, len);
0N/A }
0N/A
0N/A public:
0N/A VectorLoadNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *rt)
0N/A : LoadNode(c,mem,adr,at,rt) {
0N/A init_flags(Flag_is_Vector);
0N/A }
0N/A virtual int Opcode() const;
0N/A
0N/A virtual uint length() const = 0; // Vector length
0N/A
0N/A // Element and vector type
0N/A const Type* elt_type() const { return Type::get_const_basic_type(elt_basic_type()); }
0N/A const Type* vect_type() const { return VectorNode::vect_type(elt_basic_type(), length()); }
0N/A
0N/A virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(); }
0N/A virtual BasicType memory_type() const { return T_VOID; }
29N/A virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
0N/A
0N/A // Vector opcode from scalar opcode
0N/A static int opcode(int sopc, uint vlen);
0N/A
0N/A static VectorLoadNode* make(Compile* C, int opc, Node* ctl, Node* mem,
0N/A Node* adr, const TypePtr* atyp, uint vlen);
0N/A};
0N/A
0N/A//------------------------------Load16BNode--------------------------------------
0N/A// Vector load of 16 bytes (8bits signed) from memory
0N/Aclass Load16BNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Load16BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,16)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store16B; }
0N/A virtual uint length() const { return 16; }
0N/A};
0N/A
0N/A//------------------------------Load8BNode--------------------------------------
0N/A// Vector load of 8 bytes (8bits signed) from memory
0N/Aclass Load8BNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Load8BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store8B; }
0N/A virtual uint length() const { return 8; }
0N/A};
0N/A
0N/A//------------------------------Load4BNode--------------------------------------
0N/A// Vector load of 4 bytes (8bits signed) from memory
0N/Aclass Load4BNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Load4BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store4B; }
0N/A virtual uint length() const { return 4; }
0N/A};
0N/A
0N/A//------------------------------Load8CNode--------------------------------------
0N/A// Vector load of 8 chars (16bits unsigned) from memory
0N/Aclass Load8CNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Load8CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store8C; }
0N/A virtual uint length() const { return 8; }
0N/A};
0N/A
0N/A//------------------------------Load4CNode--------------------------------------
0N/A// Vector load of 4 chars (16bits unsigned) from memory
0N/Aclass Load4CNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Load4CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store4C; }
0N/A virtual uint length() const { return 4; }
0N/A};
0N/A
0N/A//------------------------------Load2CNode--------------------------------------
0N/A// Vector load of 2 chars (16bits unsigned) from memory
0N/Aclass Load2CNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Load2CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store2C; }
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//------------------------------Load8SNode--------------------------------------
0N/A// Vector load of 8 shorts (16bits signed) from memory
0N/Aclass Load8SNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A Load8SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store8C; }
0N/A virtual uint length() const { return 8; }
0N/A};
0N/A
0N/A//------------------------------Load4SNode--------------------------------------
0N/A// Vector load of 4 shorts (16bits signed) from memory
0N/Aclass Load4SNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A Load4SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store4C; }
0N/A virtual uint length() const { return 4; }
0N/A};
0N/A
0N/A//------------------------------Load2SNode--------------------------------------
0N/A// Vector load of 2 shorts (16bits signed) from memory
0N/Aclass Load2SNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A Load2SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store2C; }
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//------------------------------Load4INode--------------------------------------
0N/A// Vector load of 4 integers (32bits signed) from memory
0N/Aclass Load4INode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A Load4INode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::INT)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store4I; }
0N/A virtual uint length() const { return 4; }
0N/A};
0N/A
0N/A//------------------------------Load2INode--------------------------------------
0N/A// Vector load of 2 integers (32bits signed) from memory
0N/Aclass Load2INode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A Load2INode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::INT)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store2I; }
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//------------------------------Load2LNode--------------------------------------
0N/A// Vector load of 2 longs (64bits signed) from memory
0N/Aclass Load2LNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_LONG; }
0N/A public:
0N/A Load2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeLong *tl = TypeLong::LONG)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(tl,2)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store2L; }
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//------------------------------Load4FNode--------------------------------------
0N/A// Vector load of 4 floats (32bits) from memory
0N/Aclass Load4FNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A Load4FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::FLOAT)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(t,4)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store4F; }
0N/A virtual uint length() const { return 4; }
0N/A};
0N/A
0N/A//------------------------------Load2FNode--------------------------------------
0N/A// Vector load of 2 floats (32bits) from memory
0N/Aclass Load2FNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A Load2FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::FLOAT)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(t,2)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store2F; }
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//------------------------------Load2DNode--------------------------------------
0N/A// Vector load of 2 doubles (64bits) from memory
0N/Aclass Load2DNode : public VectorLoadNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_DOUBLE; }
0N/A public:
0N/A Load2DNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::DOUBLE)
0N/A : VectorLoadNode(c,mem,adr,at,vect_type(t,2)) {}
0N/A virtual int Opcode() const;
0N/A virtual int store_Opcode() const { return Op_Store2D; }
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A
0N/A//------------------------------VectorStoreNode--------------------------------------
0N/A// Vector Store to memory
0N/Aclass VectorStoreNode : public StoreNode {
0N/A virtual uint size_of() const { return sizeof(*this); }
0N/A
0N/A protected:
0N/A virtual BasicType elt_basic_type() const = 0; // Vector element basic type
0N/A
0N/A public:
0N/A VectorStoreNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : StoreNode(c,mem,adr,at,val) {
0N/A init_flags(Flag_is_Vector);
0N/A }
0N/A virtual int Opcode() const;
0N/A
0N/A virtual uint length() const = 0; // Vector length
0N/A
0N/A // Element and vector type
0N/A const Type* elt_type() const { return Type::get_const_basic_type(elt_basic_type()); }
0N/A const Type* vect_type() const { return VectorNode::vect_type(elt_basic_type(), length()); }
0N/A
0N/A virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(); }
0N/A virtual BasicType memory_type() const { return T_VOID; }
29N/A virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
0N/A
0N/A // Vector opcode from scalar opcode
0N/A static int opcode(int sopc, uint vlen);
0N/A
0N/A static VectorStoreNode* make(Compile* C, int opc, Node* ctl, Node* mem,
0N/A Node* adr, const TypePtr* atyp, VectorNode* val,
0N/A uint vlen);
0N/A};
0N/A
0N/A//------------------------------Store16BNode--------------------------------------
0N/A// Vector store of 16 bytes (8bits signed) to memory
0N/Aclass Store16BNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Store16BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 16; }
0N/A};
0N/A
0N/A//------------------------------Store8BNode--------------------------------------
0N/A// Vector store of 8 bytes (8bits signed) to memory
0N/Aclass Store8BNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Store8BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 8; }
0N/A};
0N/A
0N/A//------------------------------Store4BNode--------------------------------------
0N/A// Vector store of 4 bytes (8bits signed) to memory
0N/Aclass Store4BNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Store4BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 4; }
0N/A};
0N/A
0N/A//------------------------------Store8CNode--------------------------------------
0N/A// Vector store of 8 chars (16bits signed/unsigned) to memory
0N/Aclass Store8CNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Store8CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 8; }
0N/A};
0N/A
0N/A//------------------------------Store4CNode--------------------------------------
0N/A// Vector store of 4 chars (16bits signed/unsigned) to memory
0N/Aclass Store4CNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Store4CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 4; }
0N/A};
0N/A
0N/A//------------------------------Store2CNode--------------------------------------
0N/A// Vector store of 2 chars (16bits signed/unsigned) to memory
0N/Aclass Store2CNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Store2CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//------------------------------Store4INode--------------------------------------
0N/A// Vector store of 4 integers (32bits signed) to memory
0N/Aclass Store4INode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A Store4INode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 4; }
0N/A};
0N/A
0N/A//------------------------------Store2INode--------------------------------------
0N/A// Vector store of 2 integers (32bits signed) to memory
0N/Aclass Store2INode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A Store2INode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//------------------------------Store2LNode--------------------------------------
0N/A// Vector store of 2 longs (64bits signed) to memory
0N/Aclass Store2LNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_LONG; }
0N/A public:
0N/A Store2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//------------------------------Store4FNode--------------------------------------
0N/A// Vector store of 4 floats (32bits) to memory
0N/Aclass Store4FNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A Store4FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 4; }
0N/A};
0N/A
0N/A//------------------------------Store2FNode--------------------------------------
0N/A// Vector store of 2 floats (32bits) to memory
0N/Aclass Store2FNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A Store2FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//------------------------------Store2DNode--------------------------------------
0N/A// Vector store of 2 doubles (64bits) to memory
0N/Aclass Store2DNode : public VectorStoreNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_DOUBLE; }
0N/A public:
0N/A Store2DNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
0N/A : VectorStoreNode(c,mem,adr,at,val) {}
0N/A virtual int Opcode() const;
0N/A virtual uint length() const { return 2; }
0N/A};
0N/A
0N/A//=========================Promote_Scalar_to_Vector====================================
0N/A
0N/A//------------------------------Replicate16BNode---------------------------------------
0N/A// Replicate byte scalar to be vector of 16 bytes
0N/Aclass Replicate16BNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Replicate16BNode(Node* in1) : VectorNode(in1, 16) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate8BNode---------------------------------------
0N/A// Replicate byte scalar to be vector of 8 bytes
0N/Aclass Replicate8BNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Replicate8BNode(Node* in1) : VectorNode(in1, 8) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate4BNode---------------------------------------
0N/A// Replicate byte scalar to be vector of 4 bytes
0N/Aclass Replicate4BNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Replicate4BNode(Node* in1) : VectorNode(in1, 4) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate8CNode---------------------------------------
0N/A// Replicate char scalar to be vector of 8 chars
0N/Aclass Replicate8CNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Replicate8CNode(Node* in1) : VectorNode(in1, 8) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate4CNode---------------------------------------
0N/A// Replicate char scalar to be vector of 4 chars
0N/Aclass Replicate4CNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Replicate4CNode(Node* in1) : VectorNode(in1, 4) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate2CNode---------------------------------------
0N/A// Replicate char scalar to be vector of 2 chars
0N/Aclass Replicate2CNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Replicate2CNode(Node* in1) : VectorNode(in1, 2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate8SNode---------------------------------------
0N/A// Replicate short scalar to be vector of 8 shorts
0N/Aclass Replicate8SNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A Replicate8SNode(Node* in1) : VectorNode(in1, 8) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate4SNode---------------------------------------
0N/A// Replicate short scalar to be vector of 4 shorts
0N/Aclass Replicate4SNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A Replicate4SNode(Node* in1) : VectorNode(in1, 4) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate2SNode---------------------------------------
0N/A// Replicate short scalar to be vector of 2 shorts
0N/Aclass Replicate2SNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A Replicate2SNode(Node* in1) : VectorNode(in1, 2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate4INode---------------------------------------
0N/A// Replicate int scalar to be vector of 4 ints
0N/Aclass Replicate4INode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A Replicate4INode(Node* in1) : VectorNode(in1, 4) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate2INode---------------------------------------
0N/A// Replicate int scalar to be vector of 2 ints
0N/Aclass Replicate2INode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A Replicate2INode(Node* in1) : VectorNode(in1, 2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate2LNode---------------------------------------
0N/A// Replicate long scalar to be vector of 2 longs
0N/Aclass Replicate2LNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_LONG; }
0N/A public:
0N/A Replicate2LNode(Node* in1) : VectorNode(in1, 2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate4FNode---------------------------------------
0N/A// Replicate float scalar to be vector of 4 floats
0N/Aclass Replicate4FNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A Replicate4FNode(Node* in1) : VectorNode(in1, 4) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate2FNode---------------------------------------
0N/A// Replicate float scalar to be vector of 2 floats
0N/Aclass Replicate2FNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A Replicate2FNode(Node* in1) : VectorNode(in1, 2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------Replicate2DNode---------------------------------------
0N/A// Replicate double scalar to be vector of 2 doubles
0N/Aclass Replicate2DNode : public VectorNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_DOUBLE; }
0N/A public:
0N/A Replicate2DNode(Node* in1) : VectorNode(in1, 2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//========================Pack_Scalars_into_a_Vector==============================
0N/A
0N/A//------------------------------PackNode---------------------------------------
0N/A// Pack parent class (not for code generation).
0N/Aclass PackNode : public VectorNode {
0N/A public:
0N/A PackNode(Node* in1) : VectorNode(in1, 1) {}
0N/A PackNode(Node* in1, Node* n2) : VectorNode(in1, n2, 2) {}
0N/A virtual int Opcode() const;
0N/A
0N/A void add_opd(Node* n) {
0N/A add_req(n);
0N/A _length++;
0N/A assert(_length == req() - 1, "vector length matches edge count");
0N/A }
0N/A
0N/A // Create a binary tree form for Packs. [lo, hi) (half-open) range
0N/A Node* binaryTreePack(Compile* C, int lo, int hi);
0N/A
0N/A static PackNode* make(Compile* C, Node* s, const Type* elt_t);
0N/A};
0N/A
0N/A//------------------------------PackBNode---------------------------------------
0N/A// Pack byte scalars into vector
0N/Aclass PackBNode : public PackNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A PackBNode(Node* in1) : PackNode(in1) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------PackCNode---------------------------------------
0N/A// Pack char scalars into vector
0N/Aclass PackCNode : public PackNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A PackCNode(Node* in1) : PackNode(in1) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------PackSNode---------------------------------------
0N/A// Pack short scalars into a vector
0N/Aclass PackSNode : public PackNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_SHORT; }
0N/A public:
0N/A PackSNode(Node* in1) : PackNode(in1) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------PackINode---------------------------------------
0N/A// Pack integer scalars into a vector
0N/Aclass PackINode : public PackNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_INT; }
0N/A public:
0N/A PackINode(Node* in1) : PackNode(in1) {}
0N/A PackINode(Node* in1, Node* in2) : PackNode(in1, in2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------PackLNode---------------------------------------
0N/A// Pack long scalars into a vector
0N/Aclass PackLNode : public PackNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_LONG; }
0N/A public:
0N/A PackLNode(Node* in1) : PackNode(in1) {}
0N/A PackLNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------PackFNode---------------------------------------
0N/A// Pack float scalars into vector
0N/Aclass PackFNode : public PackNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_FLOAT; }
0N/A public:
0N/A PackFNode(Node* in1) : PackNode(in1) {}
0N/A PackFNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------PackDNode---------------------------------------
0N/A// Pack double scalars into a vector
0N/Aclass PackDNode : public PackNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_DOUBLE; }
0N/A public:
0N/A PackDNode(Node* in1) : PackNode(in1) {}
0N/A PackDNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A// The Pack2xN nodes assist code generation. They are created from
0N/A// Pack4C, etc. nodes in final_graph_reshape in the form of a
0N/A// balanced, binary tree.
0N/A
0N/A//------------------------------Pack2x1BNode-----------------------------------------
0N/A// Pack 2 1-byte integers into vector of 2 bytes
0N/Aclass Pack2x1BNode : public PackNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_BYTE; }
0N/A public:
0N/A Pack2x1BNode(Node *in1, Node* in2) : PackNode(in1, in2) {}
0N/A virtual int Opcode() const;
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//------------------------------Pack2x2BNode---------------------------------------
0N/A// Pack 2 2-byte integers into vector of 4 bytes
0N/Aclass Pack2x2BNode : public PackNode {
0N/A protected:
0N/A virtual BasicType elt_basic_type() const { return T_CHAR; }
0N/A public:
0N/A Pack2x2BNode(Node *in1, Node* in2) : PackNode(in1, in2) {}
0N/A virtual int Opcode() const;
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//========================Extract_Scalar_from_Vector===============================
0N/A
0N/A//------------------------------ExtractNode---------------------------------------
0N/A// Extract a scalar from a vector at position "pos"
0N/Aclass ExtractNode : public Node {
0N/A public:
0N/A ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) {
0N/A assert(in(2)->get_int() >= 0, "positive constants");
0N/A }
0N/A virtual int Opcode() const;
0N/A uint pos() const { return in(2)->get_int(); }
0N/A
0N/A static Node* make(Compile* C, Node* v, uint position, const Type* opd_t);
0N/A};
0N/A
0N/A//------------------------------ExtractBNode---------------------------------------
0N/A// Extract a byte from a vector at position "pos"
0N/Aclass ExtractBNode : public ExtractNode {
0N/A public:
0N/A ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *bottom_type() const { return TypeInt::INT; }
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//------------------------------ExtractCNode---------------------------------------
0N/A// Extract a char from a vector at position "pos"
0N/Aclass ExtractCNode : public ExtractNode {
0N/A public:
0N/A ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *bottom_type() const { return TypeInt::INT; }
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//------------------------------ExtractSNode---------------------------------------
0N/A// Extract a short from a vector at position "pos"
0N/Aclass ExtractSNode : public ExtractNode {
0N/A public:
0N/A ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *bottom_type() const { return TypeInt::INT; }
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//------------------------------ExtractINode---------------------------------------
0N/A// Extract an int from a vector at position "pos"
0N/Aclass ExtractINode : public ExtractNode {
0N/A public:
0N/A ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *bottom_type() const { return TypeInt::INT; }
0N/A virtual uint ideal_reg() const { return Op_RegI; }
0N/A};
0N/A
0N/A//------------------------------ExtractLNode---------------------------------------
0N/A// Extract a long from a vector at position "pos"
0N/Aclass ExtractLNode : public ExtractNode {
0N/A public:
0N/A ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *bottom_type() const { return TypeLong::LONG; }
0N/A virtual uint ideal_reg() const { return Op_RegL; }
0N/A};
0N/A
0N/A//------------------------------ExtractFNode---------------------------------------
0N/A// Extract a float from a vector at position "pos"
0N/Aclass ExtractFNode : public ExtractNode {
0N/A public:
0N/A ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *bottom_type() const { return Type::FLOAT; }
0N/A virtual uint ideal_reg() const { return Op_RegF; }
0N/A};
0N/A
0N/A//------------------------------ExtractDNode---------------------------------------
0N/A// Extract a double from a vector at position "pos"
0N/Aclass ExtractDNode : public ExtractNode {
0N/A public:
0N/A ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
0N/A virtual int Opcode() const;
0N/A virtual const Type *bottom_type() const { return Type::DOUBLE; }
0N/A virtual uint ideal_reg() const { return Op_RegD; }
0N/A};