0N/A/*
3845N/A * Copyright (c) 2007, 2012, 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
1879N/A#ifndef SHARE_VM_OPTO_VECTORNODE_HPP
1879N/A#define SHARE_VM_OPTO_VECTORNODE_HPP
1879N/A
1879N/A#include "opto/matcher.hpp"
1879N/A#include "opto/memnode.hpp"
1879N/A#include "opto/node.hpp"
1879N/A#include "opto/opcodes.hpp"
1879N/A
4024N/A//------------------------------VectorNode-------------------------------------
0N/A// Vector Operation
3845N/Aclass VectorNode : public TypeNode {
3845N/A public:
0N/A
3845N/A VectorNode(Node* n1, const TypeVect* vt) : TypeNode(vt, 2) {
3845N/A init_class_id(Class_Vector);
3845N/A init_req(1, n1);
3845N/A }
3845N/A VectorNode(Node* n1, Node* n2, const TypeVect* vt) : TypeNode(vt, 3) {
3845N/A init_class_id(Class_Vector);
3845N/A init_req(1, n1);
3845N/A init_req(2, n2);
0N/A }
0N/A
3845N/A const TypeVect* vect_type() const { return type()->is_vect(); }
3845N/A uint length() const { return vect_type()->length(); } // Vector length
3964N/A uint length_in_bytes() const { return vect_type()->length_in_bytes(); }
0N/A
0N/A virtual int Opcode() const;
0N/A
3845N/A virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
0N/A
0N/A static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
4024N/A static VectorNode* shift_count(Compile* C, Node* shift, Node* cnt, uint vlen, BasicType bt);
3845N/A static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
3845N/A
3969N/A static int opcode(int opc, BasicType bt);
3845N/A static bool implemented(int opc, uint vlen, BasicType bt);
3964N/A static bool is_shift(Node* n);
3964N/A static bool is_invariant_vector(Node* n);
3969N/A // [Start, end) half-open range defining which operands are vectors
3969N/A static void vector_operands(Node* n, uint* start, uint* end);
0N/A};
0N/A
4024N/A//===========================Vector=ALU=Operations=============================
0N/A
4024N/A//------------------------------AddVBNode--------------------------------------
0N/A// Vector add byte
0N/Aclass AddVBNode : public VectorNode {
0N/A public:
3845N/A AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------AddVSNode--------------------------------------
3845N/A// Vector add char/short
0N/Aclass AddVSNode : public VectorNode {
0N/A public:
3845N/A AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------AddVINode--------------------------------------
0N/A// Vector add int
0N/Aclass AddVINode : public VectorNode {
0N/A public:
3845N/A AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------AddVLNode--------------------------------------
0N/A// Vector add long
0N/Aclass AddVLNode : public VectorNode {
0N/A public:
3845N/A AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------AddVFNode--------------------------------------
0N/A// Vector add float
0N/Aclass AddVFNode : public VectorNode {
0N/A public:
3845N/A AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------AddVDNode--------------------------------------
0N/A// Vector add double
0N/Aclass AddVDNode : public VectorNode {
0N/A public:
3845N/A AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------SubVBNode--------------------------------------
0N/A// Vector subtract byte
0N/Aclass SubVBNode : public VectorNode {
0N/A public:
3845N/A SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------SubVSNode--------------------------------------
0N/A// Vector subtract short
0N/Aclass SubVSNode : public VectorNode {
0N/A public:
3845N/A SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------SubVINode--------------------------------------
0N/A// Vector subtract int
0N/Aclass SubVINode : public VectorNode {
0N/A public:
3845N/A SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------SubVLNode--------------------------------------
0N/A// Vector subtract long
0N/Aclass SubVLNode : public VectorNode {
0N/A public:
3845N/A SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------SubVFNode--------------------------------------
0N/A// Vector subtract float
0N/Aclass SubVFNode : public VectorNode {
0N/A public:
3845N/A SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------SubVDNode--------------------------------------
0N/A// Vector subtract double
0N/Aclass SubVDNode : public VectorNode {
0N/A public:
3845N/A SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------MulVSNode--------------------------------------
3964N/A// Vector multiply short
3964N/Aclass MulVSNode : public VectorNode {
3964N/A public:
3964N/A MulVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
3964N/A virtual int Opcode() const;
3964N/A};
3964N/A
4024N/A//------------------------------MulVINode--------------------------------------
3964N/A// Vector multiply int
3964N/Aclass MulVINode : public VectorNode {
3964N/A public:
3964N/A MulVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
3964N/A virtual int Opcode() const;
3964N/A};
3964N/A
4024N/A//------------------------------MulVFNode--------------------------------------
0N/A// Vector multiply float
0N/Aclass MulVFNode : public VectorNode {
0N/A public:
3845N/A MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------MulVDNode--------------------------------------
0N/A// Vector multiply double
0N/Aclass MulVDNode : public VectorNode {
0N/A public:
3845N/A MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------DivVFNode--------------------------------------
0N/A// Vector divide float
0N/Aclass DivVFNode : public VectorNode {
0N/A public:
3845N/A DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------DivVDNode--------------------------------------
0N/A// Vector Divide double
0N/Aclass DivVDNode : public VectorNode {
0N/A public:
3845N/A DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------LShiftVBNode-----------------------------------
3964N/A// Vector left shift bytes
0N/Aclass LShiftVBNode : public VectorNode {
0N/A public:
3845N/A LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------LShiftVSNode-----------------------------------
3964N/A// Vector left shift shorts
0N/Aclass LShiftVSNode : public VectorNode {
0N/A public:
3845N/A LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------LShiftVINode-----------------------------------
3964N/A// Vector left shift ints
0N/Aclass LShiftVINode : public VectorNode {
0N/A public:
3845N/A LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------LShiftVLNode-----------------------------------
3964N/A// Vector left shift longs
3964N/Aclass LShiftVLNode : public VectorNode {
3964N/A public:
3964N/A LShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
3964N/A virtual int Opcode() const;
3964N/A};
3964N/A
4024N/A//------------------------------RShiftVBNode-----------------------------------
3964N/A// Vector right arithmetic (signed) shift bytes
3845N/Aclass RShiftVBNode : public VectorNode {
0N/A public:
3845N/A RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------RShiftVSNode-----------------------------------
3964N/A// Vector right arithmetic (signed) shift shorts
3845N/Aclass RShiftVSNode : public VectorNode {
0N/A public:
3845N/A RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------RShiftVINode-----------------------------------
3964N/A// Vector right arithmetic (signed) shift ints
3845N/Aclass RShiftVINode : public VectorNode {
0N/A public:
3845N/A RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------RShiftVLNode-----------------------------------
3964N/A// Vector right arithmetic (signed) shift longs
3964N/Aclass RShiftVLNode : public VectorNode {
3964N/A public:
3964N/A RShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
3964N/A virtual int Opcode() const;
3964N/A};
3964N/A
4024N/A//------------------------------URShiftVBNode----------------------------------
3964N/A// Vector right logical (unsigned) shift bytes
3964N/Aclass URShiftVBNode : public VectorNode {
3964N/A public:
3964N/A URShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
3964N/A virtual int Opcode() const;
3964N/A};
3964N/A
4024N/A//------------------------------URShiftVSNode----------------------------------
3964N/A// Vector right logical (unsigned) shift shorts
3964N/Aclass URShiftVSNode : public VectorNode {
3964N/A public:
3964N/A URShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
3964N/A virtual int Opcode() const;
3964N/A};
3964N/A
4024N/A//------------------------------URShiftVINode----------------------------------
3964N/A// Vector right logical (unsigned) shift ints
3964N/Aclass URShiftVINode : public VectorNode {
3964N/A public:
3964N/A URShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
3964N/A virtual int Opcode() const;
3964N/A};
3964N/A
4024N/A//------------------------------URShiftVLNode----------------------------------
3964N/A// Vector right logical (unsigned) shift longs
3964N/Aclass URShiftVLNode : public VectorNode {
3964N/A public:
3964N/A URShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
3964N/A virtual int Opcode() const;
3964N/A};
3964N/A
4024N/A//------------------------------LShiftCntVNode---------------------------------
4024N/A// Vector left shift count
4024N/Aclass LShiftCntVNode : public VectorNode {
4024N/A public:
4024N/A LShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
4024N/A virtual int Opcode() const;
4024N/A virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
4024N/A};
4024N/A
4024N/A//------------------------------RShiftCntVNode---------------------------------
4024N/A// Vector right shift count
4024N/Aclass RShiftCntVNode : public VectorNode {
4024N/A public:
4024N/A RShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
4024N/A virtual int Opcode() const;
4024N/A virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
4024N/A};
4024N/A
3964N/A
0N/A//------------------------------AndVNode---------------------------------------
3964N/A// Vector and integer
0N/Aclass AndVNode : public VectorNode {
0N/A public:
3845N/A AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------OrVNode---------------------------------------
3964N/A// Vector or integer
0N/Aclass OrVNode : public VectorNode {
0N/A public:
3845N/A OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A//------------------------------XorVNode---------------------------------------
3964N/A// Vector xor integer
0N/Aclass XorVNode : public VectorNode {
0N/A public:
3845N/A XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
3845N/A//================================= M E M O R Y ===============================
0N/A
3845N/A//------------------------------LoadVectorNode---------------------------------
3845N/A// Load Vector from memory
3845N/Aclass LoadVectorNode : public LoadNode {
3845N/A public:
3845N/A LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt)
3845N/A : LoadNode(c, mem, adr, at, vt) {
3845N/A init_class_id(Class_LoadVector);
0N/A }
0N/A
3845N/A const TypeVect* vect_type() const { return type()->is_vect(); }
3845N/A uint length() const { return vect_type()->length(); } // Vector length
3845N/A
0N/A virtual int Opcode() const;
0N/A
3845N/A virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); }
0N/A virtual BasicType memory_type() const { return T_VOID; }
3845N/A virtual int memory_size() const { return vect_type()->length_in_bytes(); }
0N/A
3845N/A virtual int store_Opcode() const { return Op_StoreVector; }
0N/A
3845N/A static LoadVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
3845N/A Node* adr, const TypePtr* atyp, uint vlen, BasicType bt);
0N/A};
0N/A
3845N/A//------------------------------StoreVectorNode--------------------------------
3845N/A// Store Vector to memory
3845N/Aclass StoreVectorNode : public StoreNode {
0N/A public:
3845N/A StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
3845N/A : StoreNode(c, mem, adr, at, val) {
3845N/A assert(val->is_Vector() || val->is_LoadVector(), "sanity");
3845N/A init_class_id(Class_StoreVector);
3845N/A }
0N/A
3845N/A const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); }
3845N/A uint length() const { return vect_type()->length(); } // Vector length
0N/A
0N/A virtual int Opcode() const;
0N/A
3845N/A virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(memory_size()); }
3845N/A virtual BasicType memory_type() const { return T_VOID; }
3845N/A virtual int memory_size() const { return vect_type()->length_in_bytes(); }
0N/A
3845N/A static StoreVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
2667N/A Node* adr, const TypePtr* atyp, Node* val,
0N/A uint vlen);
0N/A};
0N/A
3845N/A
3845N/A//=========================Promote_Scalar_to_Vector============================
0N/A
3845N/A//------------------------------ReplicateBNode---------------------------------
3845N/A// Replicate byte scalar to be vector
3845N/Aclass ReplicateBNode : public VectorNode {
0N/A public:
3845N/A ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
3845N/A//------------------------------ReplicateSNode---------------------------------
3845N/A// Replicate short scalar to be vector
3845N/Aclass ReplicateSNode : public VectorNode {
0N/A public:
3845N/A ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
3845N/A//------------------------------ReplicateINode---------------------------------
3845N/A// Replicate int scalar to be vector
3845N/Aclass ReplicateINode : public VectorNode {
0N/A public:
3845N/A ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
3845N/A//------------------------------ReplicateLNode---------------------------------
3845N/A// Replicate long scalar to be vector
3845N/Aclass ReplicateLNode : public VectorNode {
0N/A public:
3845N/A ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
3845N/A//------------------------------ReplicateFNode---------------------------------
3845N/A// Replicate float scalar to be vector
3845N/Aclass ReplicateFNode : public VectorNode {
0N/A public:
3845N/A ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
3845N/A//------------------------------ReplicateDNode---------------------------------
3845N/A// Replicate double scalar to be vector
3845N/Aclass ReplicateDNode : public VectorNode {
0N/A public:
3845N/A ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
3845N/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:
3845N/A PackNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
3845N/A PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {}
0N/A virtual int Opcode() const;
0N/A
3969N/A void add_opd(Node* n) {
3969N/A add_req(n);
0N/A }
0N/A
0N/A // Create a binary tree form for Packs. [lo, hi) (half-open) range
3969N/A PackNode* binary_tree_pack(Compile* C, int lo, int hi);
0N/A
3845N/A static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt);
0N/A};
0N/A
4024N/A//------------------------------PackBNode--------------------------------------
0N/A// Pack byte scalars into vector
0N/Aclass PackBNode : public PackNode {
0N/A public:
3845N/A PackBNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------PackSNode--------------------------------------
0N/A// Pack short scalars into a vector
0N/Aclass PackSNode : public PackNode {
0N/A public:
3845N/A PackSNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
3845N/A PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------PackINode--------------------------------------
0N/A// Pack integer scalars into a vector
0N/Aclass PackINode : public PackNode {
0N/A public:
3845N/A PackINode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
3845N/A PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------PackLNode--------------------------------------
0N/A// Pack long scalars into a vector
0N/Aclass PackLNode : public PackNode {
0N/A public:
3845N/A PackLNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
3845N/A PackLNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
3845N/A virtual int Opcode() const;
3845N/A};
3845N/A
4024N/A//------------------------------Pack2LNode-------------------------------------
3845N/A// Pack 2 long scalars into a vector
3845N/Aclass Pack2LNode : public PackNode {
3845N/A public:
3845N/A Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------PackFNode--------------------------------------
0N/A// Pack float scalars into vector
0N/Aclass PackFNode : public PackNode {
0N/A public:
3845N/A PackFNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
3845N/A PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------PackDNode--------------------------------------
0N/A// Pack double scalars into a vector
0N/Aclass PackDNode : public PackNode {
0N/A public:
3845N/A PackDNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
3845N/A PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
4024N/A//------------------------------Pack2DNode-------------------------------------
3845N/A// Pack 2 double scalars into a vector
3845N/Aclass Pack2DNode : public PackNode {
0N/A public:
3845N/A Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
0N/A virtual int Opcode() const;
0N/A};
0N/A
0N/A
4024N/A//========================Extract_Scalar_from_Vector===========================
0N/A
4024N/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
3845N/A static Node* make(Compile* C, Node* v, uint position, BasicType bt);
0N/A};
0N/A
4024N/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
4024N/A//------------------------------ExtractUBNode----------------------------------
3845N/A// Extract a boolean from a vector at position "pos"
3845N/Aclass ExtractUBNode : public ExtractNode {
3845N/A public:
3845N/A ExtractUBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
3845N/A virtual int Opcode() const;
3845N/A virtual const Type *bottom_type() const { return TypeInt::INT; }
3845N/A virtual uint ideal_reg() const { return Op_RegI; }
3845N/A};
3845N/A
4024N/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
4024N/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
4024N/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
4024N/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
4024N/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
4024N/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};
1879N/A
1879N/A#endif // SHARE_VM_OPTO_VECTORNODE_HPP