1 /*
   2  * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #ifndef SHARE_VM_OPTO_VECTORNODE_HPP
  25 #define SHARE_VM_OPTO_VECTORNODE_HPP
  26 
  27 #include "opto/matcher.hpp"
  28 #include "opto/memnode.hpp"
  29 #include "opto/node.hpp"
  30 #include "opto/opcodes.hpp"
  31 
  32 //------------------------------VectorNode--------------------------------------
  33 // Vector Operation
  34 class VectorNode : public TypeNode {
  35  public:
  36 
  37   VectorNode(Node* n1, const TypeVect* vt) : TypeNode(vt, 2) {
  38     init_class_id(Class_Vector);
  39     init_req(1, n1);
  40   }
  41   VectorNode(Node* n1, Node* n2, const TypeVect* vt) : TypeNode(vt, 3) {
  42     init_class_id(Class_Vector);
  43     init_req(1, n1);
  44     init_req(2, n2);
  45   }
  46 
  47   const TypeVect* vect_type() const { return type()->is_vect(); }
  48   uint length() const { return vect_type()->length(); } // Vector length
  49   uint length_in_bytes() const { return vect_type()->length_in_bytes(); }
  50 
  51   virtual int Opcode() const;
  52 
  53   virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
  54 
  55   static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
  56 
  57   static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
  58 
  59   static int  opcode(int opc, uint vlen, BasicType bt);
  60   static bool implemented(int opc, uint vlen, BasicType bt);
  61   static bool needs_vector_input(Node* n, int opd_idx);
  62 };
  63 
  64 //===========================Vector=ALU=Operations====================================
  65 
  66 //------------------------------AddVBNode---------------------------------------
  67 // Vector add byte
  68 class AddVBNode : public VectorNode {
  69  public:
  70   AddVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  71   virtual int Opcode() const;
  72 };
  73 
  74 //------------------------------AddVSNode---------------------------------------
  75 // Vector add char/short
  76 class AddVSNode : public VectorNode {
  77  public:
  78   AddVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  79   virtual int Opcode() const;
  80 };
  81 
  82 //------------------------------AddVINode---------------------------------------
  83 // Vector add int
  84 class AddVINode : public VectorNode {
  85  public:
  86   AddVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  87   virtual int Opcode() const;
  88 };
  89 
  90 //------------------------------AddVLNode---------------------------------------
  91 // Vector add long
  92 class AddVLNode : public VectorNode {
  93  public:
  94   AddVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
  95   virtual int Opcode() const;
  96 };
  97 
  98 //------------------------------AddVFNode---------------------------------------
  99 // Vector add float
 100 class AddVFNode : public VectorNode {
 101  public:
 102   AddVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 103   virtual int Opcode() const;
 104 };
 105 
 106 //------------------------------AddVDNode---------------------------------------
 107 // Vector add double
 108 class AddVDNode : public VectorNode {
 109  public:
 110   AddVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 111   virtual int Opcode() const;
 112 };
 113 
 114 //------------------------------SubVBNode---------------------------------------
 115 // Vector subtract byte
 116 class SubVBNode : public VectorNode {
 117  public:
 118   SubVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 119   virtual int Opcode() const;
 120 };
 121 
 122 //------------------------------SubVSNode---------------------------------------
 123 // Vector subtract short
 124 class SubVSNode : public VectorNode {
 125  public:
 126   SubVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 127   virtual int Opcode() const;
 128 };
 129 
 130 //------------------------------SubVINode---------------------------------------
 131 // Vector subtract int
 132 class SubVINode : public VectorNode {
 133  public:
 134   SubVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 135   virtual int Opcode() const;
 136 };
 137 
 138 //------------------------------SubVLNode---------------------------------------
 139 // Vector subtract long
 140 class SubVLNode : public VectorNode {
 141  public:
 142   SubVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 143   virtual int Opcode() const;
 144 };
 145 
 146 //------------------------------SubVFNode---------------------------------------
 147 // Vector subtract float
 148 class SubVFNode : public VectorNode {
 149  public:
 150   SubVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 151   virtual int Opcode() const;
 152 };
 153 
 154 //------------------------------SubVDNode---------------------------------------
 155 // Vector subtract double
 156 class SubVDNode : public VectorNode {
 157  public:
 158   SubVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 159   virtual int Opcode() const;
 160 };
 161 
 162 //------------------------------MulVSNode---------------------------------------
 163 // Vector multiply short
 164 class MulVSNode : public VectorNode {
 165  public:
 166   MulVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 167   virtual int Opcode() const;
 168 };
 169 
 170 //------------------------------MulVINode---------------------------------------
 171 // Vector multiply int
 172 class MulVINode : public VectorNode {
 173  public:
 174   MulVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 175   virtual int Opcode() const;
 176 };
 177 
 178 //------------------------------MulVFNode---------------------------------------
 179 // Vector multiply float
 180 class MulVFNode : public VectorNode {
 181  public:
 182   MulVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 183   virtual int Opcode() const;
 184 };
 185 
 186 //------------------------------MulVDNode---------------------------------------
 187 // Vector multiply double
 188 class MulVDNode : public VectorNode {
 189  public:
 190   MulVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 191   virtual int Opcode() const;
 192 };
 193 
 194 //------------------------------DivVFNode---------------------------------------
 195 // Vector divide float
 196 class DivVFNode : public VectorNode {
 197  public:
 198   DivVFNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 199   virtual int Opcode() const;
 200 };
 201 
 202 //------------------------------DivVDNode---------------------------------------
 203 // Vector Divide double
 204 class DivVDNode : public VectorNode {
 205  public:
 206   DivVDNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 207   virtual int Opcode() const;
 208 };
 209 
 210 //------------------------------LShiftVBNode---------------------------------------
 211 // Vector left shift bytes
 212 class LShiftVBNode : public VectorNode {
 213  public:
 214   LShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 215   virtual int Opcode() const;
 216 };
 217 
 218 //------------------------------LShiftVSNode---------------------------------------
 219 // Vector left shift shorts
 220 class LShiftVSNode : public VectorNode {
 221  public:
 222   LShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 223   virtual int Opcode() const;
 224 };
 225 
 226 //------------------------------LShiftVINode---------------------------------------
 227 // Vector left shift ints
 228 class LShiftVINode : public VectorNode {
 229  public:
 230   LShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 231   virtual int Opcode() const;
 232 };
 233 
 234 //------------------------------LShiftVLNode---------------------------------------
 235 // Vector left shift longs
 236 class LShiftVLNode : public VectorNode {
 237  public:
 238   LShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 239   virtual int Opcode() const;
 240 };
 241 
 242 //------------------------------RShiftVBNode---------------------------------------
 243 // Vector right arithmetic (signed) shift bytes
 244 class RShiftVBNode : public VectorNode {
 245  public:
 246   RShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 247   virtual int Opcode() const;
 248 };
 249 
 250 //------------------------------RShiftVSNode---------------------------------------
 251 // Vector right arithmetic (signed) shift shorts
 252 class RShiftVSNode : public VectorNode {
 253  public:
 254   RShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 255   virtual int Opcode() const;
 256 };
 257 
 258 //------------------------------RShiftVINode---------------------------------------
 259 // Vector right arithmetic (signed) shift ints
 260 class RShiftVINode : public VectorNode {
 261  public:
 262   RShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 263   virtual int Opcode() const;
 264 };
 265 
 266 //------------------------------RShiftVLNode---------------------------------------
 267 // Vector right arithmetic (signed) shift longs
 268 class RShiftVLNode : public VectorNode {
 269  public:
 270   RShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 271   virtual int Opcode() const;
 272 };
 273 
 274 //------------------------------URShiftVBNode---------------------------------------
 275 // Vector right logical (unsigned) shift bytes
 276 class URShiftVBNode : public VectorNode {
 277  public:
 278   URShiftVBNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 279   virtual int Opcode() const;
 280 };
 281 
 282 //------------------------------URShiftVSNode---------------------------------------
 283 // Vector right logical (unsigned) shift shorts
 284 class URShiftVSNode : public VectorNode {
 285  public:
 286   URShiftVSNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 287   virtual int Opcode() const;
 288 };
 289 
 290 //------------------------------URShiftVINode---------------------------------------
 291 // Vector right logical (unsigned) shift ints
 292 class URShiftVINode : public VectorNode {
 293  public:
 294   URShiftVINode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 295   virtual int Opcode() const;
 296 };
 297 
 298 //------------------------------URShiftVLNode---------------------------------------
 299 // Vector right logical (unsigned) shift longs
 300 class URShiftVLNode : public VectorNode {
 301  public:
 302   URShiftVLNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 303   virtual int Opcode() const;
 304 };
 305 
 306 
 307 //------------------------------AndVNode---------------------------------------
 308 // Vector and integer
 309 class AndVNode : public VectorNode {
 310  public:
 311   AndVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 312   virtual int Opcode() const;
 313 };
 314 
 315 //------------------------------OrVNode---------------------------------------
 316 // Vector or integer
 317 class OrVNode : public VectorNode {
 318  public:
 319   OrVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 320   virtual int Opcode() const;
 321 };
 322 
 323 //------------------------------XorVNode---------------------------------------
 324 // Vector xor integer
 325 class XorVNode : public VectorNode {
 326  public:
 327   XorVNode(Node* in1, Node* in2, const TypeVect* vt) : VectorNode(in1,in2,vt) {}
 328   virtual int Opcode() const;
 329 };
 330 
 331 //================================= M E M O R Y ===============================
 332 
 333 //------------------------------LoadVectorNode---------------------------------
 334 // Load Vector from memory
 335 class LoadVectorNode : public LoadNode {
 336  public:
 337   LoadVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeVect* vt)
 338     : LoadNode(c, mem, adr, at, vt) {
 339     init_class_id(Class_LoadVector);
 340   }
 341 
 342   const TypeVect* vect_type() const { return type()->is_vect(); }
 343   uint length() const { return vect_type()->length(); } // Vector length
 344 
 345   virtual int Opcode() const;
 346 
 347   virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
 348   virtual BasicType memory_type() const { return T_VOID; }
 349   virtual int memory_size() const { return vect_type()->length_in_bytes(); }
 350 
 351   virtual int store_Opcode() const { return Op_StoreVector; }
 352 
 353   static LoadVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
 354                               Node* adr, const TypePtr* atyp, uint vlen, BasicType bt);
 355 };
 356 
 357 //------------------------------StoreVectorNode--------------------------------
 358 // Store Vector to memory
 359 class StoreVectorNode : public StoreNode {
 360  public:
 361   StoreVectorNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
 362     : StoreNode(c, mem, adr, at, val) {
 363     assert(val->is_Vector() || val->is_LoadVector(), "sanity");
 364     init_class_id(Class_StoreVector);
 365   }
 366 
 367   const TypeVect* vect_type() const { return in(MemNode::ValueIn)->bottom_type()->is_vect(); }
 368   uint length() const { return vect_type()->length(); } // Vector length
 369 
 370   virtual int Opcode() const;
 371 
 372   virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(memory_size()); }
 373   virtual BasicType memory_type() const { return T_VOID; }
 374   virtual int memory_size() const { return vect_type()->length_in_bytes(); }
 375 
 376   static StoreVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
 377                                Node* adr, const TypePtr* atyp, Node* val,
 378                                uint vlen);
 379 };
 380 
 381 
 382 //=========================Promote_Scalar_to_Vector============================
 383 
 384 //------------------------------ReplicateBNode---------------------------------
 385 // Replicate byte scalar to be vector
 386 class ReplicateBNode : public VectorNode {
 387  public:
 388   ReplicateBNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
 389   virtual int Opcode() const;
 390 };
 391 
 392 //------------------------------ReplicateSNode---------------------------------
 393 // Replicate short scalar to be vector
 394 class ReplicateSNode : public VectorNode {
 395  public:
 396   ReplicateSNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
 397   virtual int Opcode() const;
 398 };
 399 
 400 //------------------------------ReplicateINode---------------------------------
 401 // Replicate int scalar to be vector
 402 class ReplicateINode : public VectorNode {
 403  public:
 404   ReplicateINode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
 405   virtual int Opcode() const;
 406 };
 407 
 408 //------------------------------ReplicateLNode---------------------------------
 409 // Replicate long scalar to be vector
 410 class ReplicateLNode : public VectorNode {
 411  public:
 412   ReplicateLNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
 413   virtual int Opcode() const;
 414 };
 415 
 416 //------------------------------ReplicateFNode---------------------------------
 417 // Replicate float scalar to be vector
 418 class ReplicateFNode : public VectorNode {
 419  public:
 420   ReplicateFNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
 421   virtual int Opcode() const;
 422 };
 423 
 424 //------------------------------ReplicateDNode---------------------------------
 425 // Replicate double scalar to be vector
 426 class ReplicateDNode : public VectorNode {
 427  public:
 428   ReplicateDNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
 429   virtual int Opcode() const;
 430 };
 431 
 432 //========================Pack_Scalars_into_a_Vector===========================
 433 
 434 //------------------------------PackNode---------------------------------------
 435 // Pack parent class (not for code generation).
 436 class PackNode : public VectorNode {
 437  public:
 438   PackNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {}
 439   PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {}
 440   virtual int Opcode() const;
 441 
 442   void add_opd(uint i, Node* n) {
 443     init_req(i+1, n);
 444   }
 445 
 446   // Create a binary tree form for Packs. [lo, hi) (half-open) range
 447   Node* binaryTreePack(Compile* C, int lo, int hi);
 448 
 449   static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt);
 450 };
 451 
 452 //------------------------------PackBNode---------------------------------------
 453 // Pack byte scalars into vector
 454 class PackBNode : public PackNode {
 455  public:
 456   PackBNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
 457   virtual int Opcode() const;
 458 };
 459 
 460 //------------------------------PackSNode---------------------------------------
 461 // Pack short scalars into a vector
 462 class PackSNode : public PackNode {
 463  public:
 464   PackSNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
 465   PackSNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
 466   virtual int Opcode() const;
 467 };
 468 
 469 //------------------------------PackINode---------------------------------------
 470 // Pack integer scalars into a vector
 471 class PackINode : public PackNode {
 472  public:
 473   PackINode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
 474   PackINode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
 475   virtual int Opcode() const;
 476 };
 477 
 478 //------------------------------PackLNode---------------------------------------
 479 // Pack long scalars into a vector
 480 class PackLNode : public PackNode {
 481  public:
 482   PackLNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
 483   PackLNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
 484   virtual int Opcode() const;
 485 };
 486 
 487 //------------------------------Pack2LNode--------------------------------------
 488 // Pack 2 long scalars into a vector
 489 class Pack2LNode : public PackNode {
 490  public:
 491   Pack2LNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
 492   virtual int Opcode() const;
 493 };
 494 
 495 //------------------------------PackFNode---------------------------------------
 496 // Pack float scalars into vector
 497 class PackFNode : public PackNode {
 498  public:
 499   PackFNode(Node* in1, const TypeVect* vt)  : PackNode(in1, vt) {}
 500   PackFNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
 501   virtual int Opcode() const;
 502 };
 503 
 504 //------------------------------PackDNode---------------------------------------
 505 // Pack double scalars into a vector
 506 class PackDNode : public PackNode {
 507  public:
 508   PackDNode(Node* in1, const TypeVect* vt) : PackNode(in1, vt) {}
 509   PackDNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
 510   virtual int Opcode() const;
 511 };
 512 
 513 //------------------------------Pack2DNode--------------------------------------
 514 // Pack 2 double scalars into a vector
 515 class Pack2DNode : public PackNode {
 516  public:
 517   Pack2DNode(Node* in1, Node* in2, const TypeVect* vt) : PackNode(in1, in2, vt) {}
 518   virtual int Opcode() const;
 519 };
 520 
 521 
 522 //========================Extract_Scalar_from_Vector===============================
 523 
 524 //------------------------------ExtractNode---------------------------------------
 525 // Extract a scalar from a vector at position "pos"
 526 class ExtractNode : public Node {
 527  public:
 528   ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) {
 529     assert(in(2)->get_int() >= 0, "positive constants");
 530   }
 531   virtual int Opcode() const;
 532   uint  pos() const { return in(2)->get_int(); }
 533 
 534   static Node* make(Compile* C, Node* v, uint position, BasicType bt);
 535 };
 536 
 537 //------------------------------ExtractBNode---------------------------------------
 538 // Extract a byte from a vector at position "pos"
 539 class ExtractBNode : public ExtractNode {
 540  public:
 541   ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
 542   virtual int Opcode() const;
 543   virtual const Type *bottom_type() const { return TypeInt::INT; }
 544   virtual uint ideal_reg() const { return Op_RegI; }
 545 };
 546 
 547 //------------------------------ExtractUBNode--------------------------------------
 548 // Extract a boolean from a vector at position "pos"
 549 class ExtractUBNode : public ExtractNode {
 550  public:
 551   ExtractUBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
 552   virtual int Opcode() const;
 553   virtual const Type *bottom_type() const { return TypeInt::INT; }
 554   virtual uint ideal_reg() const { return Op_RegI; }
 555 };
 556 
 557 //------------------------------ExtractCNode---------------------------------------
 558 // Extract a char from a vector at position "pos"
 559 class ExtractCNode : public ExtractNode {
 560  public:
 561   ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
 562   virtual int Opcode() const;
 563   virtual const Type *bottom_type() const { return TypeInt::INT; }
 564   virtual uint ideal_reg() const { return Op_RegI; }
 565 };
 566 
 567 //------------------------------ExtractSNode---------------------------------------
 568 // Extract a short from a vector at position "pos"
 569 class ExtractSNode : public ExtractNode {
 570  public:
 571   ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
 572   virtual int Opcode() const;
 573   virtual const Type *bottom_type() const { return TypeInt::INT; }
 574   virtual uint ideal_reg() const { return Op_RegI; }
 575 };
 576 
 577 //------------------------------ExtractINode---------------------------------------
 578 // Extract an int from a vector at position "pos"
 579 class ExtractINode : public ExtractNode {
 580  public:
 581   ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
 582   virtual int Opcode() const;
 583   virtual const Type *bottom_type() const { return TypeInt::INT; }
 584   virtual uint ideal_reg() const { return Op_RegI; }
 585 };
 586 
 587 //------------------------------ExtractLNode---------------------------------------
 588 // Extract a long from a vector at position "pos"
 589 class ExtractLNode : public ExtractNode {
 590  public:
 591   ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
 592   virtual int Opcode() const;
 593   virtual const Type *bottom_type() const { return TypeLong::LONG; }
 594   virtual uint ideal_reg() const { return Op_RegL; }
 595 };
 596 
 597 //------------------------------ExtractFNode---------------------------------------
 598 // Extract a float from a vector at position "pos"
 599 class ExtractFNode : public ExtractNode {
 600  public:
 601   ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
 602   virtual int Opcode() const;
 603   virtual const Type *bottom_type() const { return Type::FLOAT; }
 604   virtual uint ideal_reg() const { return Op_RegF; }
 605 };
 606 
 607 //------------------------------ExtractDNode---------------------------------------
 608 // Extract a double from a vector at position "pos"
 609 class ExtractDNode : public ExtractNode {
 610  public:
 611   ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
 612   virtual int Opcode() const;
 613   virtual const Type *bottom_type() const { return Type::DOUBLE; }
 614   virtual uint ideal_reg() const { return Op_RegD; }
 615 };
 616 
 617 #endif // SHARE_VM_OPTO_VECTORNODE_HPP