hotspot/src/share/vm/opto/vectornode.hpp
author kvn
Wed, 27 Jul 2011 17:28:36 -0700
changeset 10255 bab46e6f7661
parent 9101 ff58f9a8e31c
child 13104 657b387034fb
permissions -rw-r--r--
7069452: Cleanup NodeFlags Summary: Remove flags which duplicate information in Node::NodeClasses. Reviewed-by: never
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
     2
 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 670
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 670
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 670
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    24
#ifndef SHARE_VM_OPTO_VECTORNODE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    25
#define SHARE_VM_OPTO_VECTORNODE_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    26
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
#include "opto/matcher.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    28
#include "opto/memnode.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    29
#include "opto/node.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    30
#include "opto/opcodes.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
//------------------------------VectorNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
// Vector Operation
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
class VectorNode : public Node {
9101
ff58f9a8e31c 7004535: Clone loop predicate during loop unswitch
kvn
parents: 7397
diff changeset
    35
  virtual uint size_of() const { return sizeof(*this); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
  uint _length; // vector length
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  virtual BasicType elt_basic_type() const = 0; // Vector element basic type
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  static const Type* vect_type(BasicType elt_bt, uint len);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  static const Type* vect_type(const Type* elt_type, uint len) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
    return vect_type(elt_type->array_element_basic_type(), len);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
  friend class VectorLoadNode;  // For vect_type
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  friend class VectorStoreNode; // ditto.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
  VectorNode(Node* n1, uint vlen) : Node(NULL, n1), _length(vlen) {
10255
bab46e6f7661 7069452: Cleanup NodeFlags
kvn
parents: 9101
diff changeset
    50
    init_class_id(Class_Vector);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  VectorNode(Node* n1, Node* n2, uint vlen) : Node(NULL, n1, n2), _length(vlen) {
10255
bab46e6f7661 7069452: Cleanup NodeFlags
kvn
parents: 9101
diff changeset
    53
    init_class_id(Class_Vector);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
  uint length() const { return _length; } // Vector length
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  static uint max_vlen(BasicType bt) { // max vector length
202
dc13bf0e5d5d 6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM
kvn
parents: 1
diff changeset
    60
    return (uint)(Matcher::vector_width_in_bytes() / type2aelembytes(bt));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  // Element and vector type
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  const Type* elt_type()  const { return Type::get_const_basic_type(elt_basic_type()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
  const Type* vect_type() const { return vect_type(elt_basic_type(), length()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  virtual const Type *bottom_type() const { return vect_type(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  virtual uint        ideal_reg()   const { return Matcher::vector_ideal_reg(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  // Vector opcode from scalar opcode
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  static int opcode(int sopc, uint vlen, const Type* opd_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  static VectorNode* make(Compile* C, int sopc, Node* n1, Node* n2, uint vlen, const Type* elt_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
//===========================Vector=ALU=Operations====================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
//------------------------------AddVBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
// Vector add byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
class AddVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  AddVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
//------------------------------AddVCNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
// Vector add char
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
class AddVCNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
  AddVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
//------------------------------AddVSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
// Vector add short
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
class AddVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
  AddVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
//------------------------------AddVINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
// Vector add int
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
class AddVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  AddVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
//------------------------------AddVLNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
// Vector add long
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
class AddVLNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  virtual BasicType elt_basic_type() const { return T_LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  AddVLNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
//------------------------------AddVFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
// Vector add float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
class AddVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  AddVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
//------------------------------AddVDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
// Vector add double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
class AddVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
  virtual BasicType elt_basic_type() const { return T_DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
  AddVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
//------------------------------SubVBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
// Vector subtract byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
class SubVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   157
  SubVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   158
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
//------------------------------SubVCNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
// Vector subtract char
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
class SubVCNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
  SubVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
//------------------------------SubVSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
// Vector subtract short
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
class SubVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   176
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   177
  SubVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
//------------------------------SubVINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
// Vector subtract int
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
class SubVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  SubVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
//------------------------------SubVLNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
// Vector subtract long
489c9b5090e2 Initial load
duke
parents:
diff changeset
   193
class SubVLNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   194
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
  virtual BasicType elt_basic_type() const { return T_LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
  SubVLNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   199
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   200
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
//------------------------------SubVFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
// Vector subtract float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
class SubVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  SubVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
//------------------------------SubVDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
// Vector subtract double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   213
class SubVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   214
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  virtual BasicType elt_basic_type() const { return T_DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
  SubVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
//------------------------------MulVFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
// Vector multiply float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
class MulVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   224
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   226
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
  MulVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   228
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   229
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   230
489c9b5090e2 Initial load
duke
parents:
diff changeset
   231
//------------------------------MulVDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
// Vector multiply double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
class MulVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
  virtual BasicType elt_basic_type() const { return T_DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
  MulVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
//------------------------------DivVFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
// Vector divide float
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
class DivVFNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
  DivVFNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
//------------------------------DivVDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
// Vector Divide double
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
class DivVDNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
  virtual BasicType elt_basic_type() const { return T_DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
  DivVDNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
//------------------------------LShiftVBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
// Vector lshift byte
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
class LShiftVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
  LShiftVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
//------------------------------LShiftVCNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
// Vector lshift chars
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
class LShiftVCNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
  LShiftVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
//------------------------------LShiftVSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
// Vector lshift shorts
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
class LShiftVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
  LShiftVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
//------------------------------LShiftVINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
// Vector lshift ints
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
class LShiftVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
  LShiftVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
//------------------------------URShiftVBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
// Vector urshift bytes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
class URShiftVBNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   307
  URShiftVBNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   308
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   310
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
//------------------------------URShiftVCNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
// Vector urshift char
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
class URShiftVCNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
  URShiftVCNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   319
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
//------------------------------URShiftVSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
// Vector urshift shorts
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
class URShiftVSNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
  URShiftVSNode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
//------------------------------URShiftVINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
// Vector urshift ints
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
class URShiftVINode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
  URShiftVINode(Node* in1, Node* in2, uint vlen) : VectorNode(in1,in2,vlen) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   340
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
//------------------------------AndVNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
// Vector and
489c9b5090e2 Initial load
duke
parents:
diff changeset
   343
class AndVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   344
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
  BasicType _bt;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
  virtual BasicType elt_basic_type() const { return _bt; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   347
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   348
  AndVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   349
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   351
489c9b5090e2 Initial load
duke
parents:
diff changeset
   352
//------------------------------OrVNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   353
// Vector or
489c9b5090e2 Initial load
duke
parents:
diff changeset
   354
class OrVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   355
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   356
  BasicType _bt;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   357
  virtual BasicType elt_basic_type() const { return _bt; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   358
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
  OrVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   360
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
//------------------------------XorVNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
// Vector xor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
class XorVNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
  BasicType _bt;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
  virtual BasicType elt_basic_type() const { return _bt; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
  XorVNode(Node* in1, Node* in2, uint vlen, BasicType bt) : VectorNode(in1,in2,vlen), _bt(bt) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   371
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
489c9b5090e2 Initial load
duke
parents:
diff changeset
   374
//================================= M E M O R Y ==================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
   375
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
489c9b5090e2 Initial load
duke
parents:
diff changeset
   377
//------------------------------VectorLoadNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
// Vector Load from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
class VectorLoadNode : public LoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
  virtual uint size_of() const { return sizeof(*this); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
489c9b5090e2 Initial load
duke
parents:
diff changeset
   382
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
  virtual BasicType elt_basic_type()  const = 0; // Vector element basic type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
  // For use in constructor
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
  static const Type* vect_type(const Type* elt_type, uint len) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
    return VectorNode::vect_type(elt_type, len);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
  VectorLoadNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *rt)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
    : LoadNode(c,mem,adr,at,rt) {
10255
bab46e6f7661 7069452: Cleanup NodeFlags
kvn
parents: 9101
diff changeset
   392
    init_class_id(Class_VectorLoad);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
  virtual uint  length() const = 0; // Vector length
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
  // Element and vector type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
  const Type* elt_type()  const { return Type::get_const_basic_type(elt_basic_type()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
  const Type* vect_type() const { return VectorNode::vect_type(elt_basic_type(), length()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
  virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
  virtual BasicType memory_type() const { return T_VOID; }
202
dc13bf0e5d5d 6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM
kvn
parents: 1
diff changeset
   404
  virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
  // Vector opcode from scalar opcode
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
  static int opcode(int sopc, uint vlen);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
  static VectorLoadNode* make(Compile* C, int opc, Node* ctl, Node* mem,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
                              Node* adr, const TypePtr* atyp, uint vlen);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
//------------------------------Load16BNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
// Vector load of 16 bytes (8bits signed) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
class Load16BNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
  Load16BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,16)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   422
  virtual int store_Opcode() const { return Op_Store16B; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
  virtual uint length() const { return 16; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   425
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
//------------------------------Load8BNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
// Vector load of 8 bytes (8bits signed) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
class Load8BNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   432
  Load8BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   433
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   434
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
  virtual int store_Opcode() const { return Op_Store8B; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   436
  virtual uint length() const { return 8; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
//------------------------------Load4BNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   440
// Vector load of 4 bytes (8bits signed) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
class Load4BNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   442
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   443
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   445
  Load4BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::BYTE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   447
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   448
  virtual int store_Opcode() const { return Op_Store4B; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   449
  virtual uint length() const { return 4; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   450
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   451
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
//------------------------------Load8CNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
// Vector load of 8 chars (16bits unsigned) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
class Load8CNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   455
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   456
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   457
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   458
  Load8CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   459
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   460
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   461
  virtual int store_Opcode() const { return Op_Store8C; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   462
  virtual uint length() const { return 8; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   463
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   464
489c9b5090e2 Initial load
duke
parents:
diff changeset
   465
//------------------------------Load4CNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
// Vector load of 4 chars (16bits unsigned) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   467
class Load4CNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   468
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   471
  Load4CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   474
  virtual int store_Opcode() const { return Op_Store4C; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   475
  virtual uint length() const { return 4; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   476
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   477
489c9b5090e2 Initial load
duke
parents:
diff changeset
   478
//------------------------------Load2CNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   479
// Vector load of 2 chars (16bits unsigned) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
class Load2CNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   481
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   482
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   483
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   484
  Load2CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::CHAR)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   485
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   486
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   487
  virtual int store_Opcode() const { return Op_Store2C; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   488
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   489
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   490
489c9b5090e2 Initial load
duke
parents:
diff changeset
   491
//------------------------------Load8SNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
// Vector load of 8 shorts (16bits signed) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
class Load8SNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   494
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   495
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   496
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   497
  Load8SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   498
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,8)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   499
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   500
  virtual int store_Opcode() const { return Op_Store8C; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   501
  virtual uint length() const { return 8; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   502
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   503
489c9b5090e2 Initial load
duke
parents:
diff changeset
   504
//------------------------------Load4SNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   505
// Vector load of 4 shorts (16bits signed) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   506
class Load4SNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   507
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   508
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   509
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
  Load4SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   511
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   512
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   513
  virtual int store_Opcode() const { return Op_Store4C; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   514
  virtual uint length() const { return 4; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   515
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   516
489c9b5090e2 Initial load
duke
parents:
diff changeset
   517
//------------------------------Load2SNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   518
// Vector load of 2 shorts (16bits signed) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   519
class Load2SNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   520
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   521
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   522
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   523
  Load2SNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::SHORT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   524
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   525
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   526
  virtual int store_Opcode() const { return Op_Store2C; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   527
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   528
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   529
489c9b5090e2 Initial load
duke
parents:
diff changeset
   530
//------------------------------Load4INode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   531
// Vector load of 4 integers (32bits signed) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   532
class Load4INode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   534
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   535
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   536
  Load4INode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::INT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,4)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   538
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   539
  virtual int store_Opcode() const { return Op_Store4I; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   540
  virtual uint length() const { return 4; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   541
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   542
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
//------------------------------Load2INode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   544
// Vector load of 2 integers (32bits signed) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   545
class Load2INode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   546
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   547
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   548
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   549
  Load2INode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeInt *ti = TypeInt::INT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   550
    : VectorLoadNode(c,mem,adr,at,vect_type(ti,2)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   551
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   552
  virtual int store_Opcode() const { return Op_Store2I; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   553
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   554
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   555
489c9b5090e2 Initial load
duke
parents:
diff changeset
   556
//------------------------------Load2LNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   557
// Vector load of 2 longs (64bits signed) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   558
class Load2LNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   559
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   560
  virtual BasicType elt_basic_type() const { return T_LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   561
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   562
  Load2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeLong *tl = TypeLong::LONG)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   563
    : VectorLoadNode(c,mem,adr,at,vect_type(tl,2)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   564
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   565
  virtual int store_Opcode() const { return Op_Store2L; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   566
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   567
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   568
489c9b5090e2 Initial load
duke
parents:
diff changeset
   569
//------------------------------Load4FNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   570
// Vector load of 4 floats (32bits) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   571
class Load4FNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   572
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   573
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   574
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   575
  Load4FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::FLOAT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   576
    : VectorLoadNode(c,mem,adr,at,vect_type(t,4)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   577
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   578
  virtual int store_Opcode() const { return Op_Store4F; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   579
  virtual uint length() const { return 4; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   580
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   581
489c9b5090e2 Initial load
duke
parents:
diff changeset
   582
//------------------------------Load2FNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   583
// Vector load of 2 floats (32bits) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   584
class Load2FNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   585
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   586
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   587
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   588
  Load2FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::FLOAT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   589
    : VectorLoadNode(c,mem,adr,at,vect_type(t,2)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   590
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   591
  virtual int store_Opcode() const { return Op_Store2F; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   592
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   593
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   594
489c9b5090e2 Initial load
duke
parents:
diff changeset
   595
//------------------------------Load2DNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   596
// Vector load of 2 doubles (64bits) from memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   597
class Load2DNode : public VectorLoadNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   598
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   599
  virtual BasicType elt_basic_type() const { return T_DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   600
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   601
  Load2DNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const Type *t = Type::DOUBLE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   602
    : VectorLoadNode(c,mem,adr,at,vect_type(t,2)) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   603
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   604
  virtual int store_Opcode() const { return Op_Store2D; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   605
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   606
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   607
489c9b5090e2 Initial load
duke
parents:
diff changeset
   608
489c9b5090e2 Initial load
duke
parents:
diff changeset
   609
//------------------------------VectorStoreNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   610
// Vector Store to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   611
class VectorStoreNode : public StoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   612
  virtual uint size_of() const { return sizeof(*this); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   613
489c9b5090e2 Initial load
duke
parents:
diff changeset
   614
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   615
  virtual BasicType elt_basic_type()  const = 0; // Vector element basic type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   616
489c9b5090e2 Initial load
duke
parents:
diff changeset
   617
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   618
  VectorStoreNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   619
    : StoreNode(c,mem,adr,at,val) {
10255
bab46e6f7661 7069452: Cleanup NodeFlags
kvn
parents: 9101
diff changeset
   620
    init_class_id(Class_VectorStore);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   621
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   622
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   623
489c9b5090e2 Initial load
duke
parents:
diff changeset
   624
  virtual uint  length() const = 0; // Vector length
489c9b5090e2 Initial load
duke
parents:
diff changeset
   625
489c9b5090e2 Initial load
duke
parents:
diff changeset
   626
  // Element and vector type
489c9b5090e2 Initial load
duke
parents:
diff changeset
   627
  const Type* elt_type()  const { return Type::get_const_basic_type(elt_basic_type()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   628
  const Type* vect_type() const { return VectorNode::vect_type(elt_basic_type(), length()); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   629
489c9b5090e2 Initial load
duke
parents:
diff changeset
   630
  virtual uint ideal_reg() const  { return Matcher::vector_ideal_reg(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   631
  virtual BasicType memory_type() const { return T_VOID; }
202
dc13bf0e5d5d 6633953: type2aelembytes{T_ADDRESS} should be 8 bytes in 64 bit VM
kvn
parents: 1
diff changeset
   632
  virtual int memory_size() const { return length()*type2aelembytes(elt_basic_type()); }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   633
489c9b5090e2 Initial load
duke
parents:
diff changeset
   634
  // Vector opcode from scalar opcode
489c9b5090e2 Initial load
duke
parents:
diff changeset
   635
  static int opcode(int sopc, uint vlen);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   636
489c9b5090e2 Initial load
duke
parents:
diff changeset
   637
  static VectorStoreNode* make(Compile* C, int opc, Node* ctl, Node* mem,
10255
bab46e6f7661 7069452: Cleanup NodeFlags
kvn
parents: 9101
diff changeset
   638
                               Node* adr, const TypePtr* atyp, Node* val,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   639
                               uint vlen);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   640
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   641
489c9b5090e2 Initial load
duke
parents:
diff changeset
   642
//------------------------------Store16BNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   643
// Vector store of 16 bytes (8bits signed) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   644
class Store16BNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   645
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   646
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   647
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   648
  Store16BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   649
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   650
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   651
  virtual uint length() const { return 16; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   652
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   653
489c9b5090e2 Initial load
duke
parents:
diff changeset
   654
//------------------------------Store8BNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   655
// Vector store of 8 bytes (8bits signed) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   656
class Store8BNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   657
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   658
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   659
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   660
  Store8BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   661
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   662
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   663
  virtual uint length() const { return 8; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   664
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   665
489c9b5090e2 Initial load
duke
parents:
diff changeset
   666
//------------------------------Store4BNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   667
// Vector store of 4 bytes (8bits signed) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   668
class Store4BNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   669
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   670
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   671
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   672
  Store4BNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   673
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   674
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   675
  virtual uint length() const { return 4; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   676
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   677
489c9b5090e2 Initial load
duke
parents:
diff changeset
   678
//------------------------------Store8CNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   679
// Vector store of 8 chars (16bits signed/unsigned) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   680
class Store8CNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   681
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   682
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   683
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   684
  Store8CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   685
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   686
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   687
  virtual uint length() const { return 8; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   688
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   689
489c9b5090e2 Initial load
duke
parents:
diff changeset
   690
//------------------------------Store4CNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   691
// Vector store of 4 chars (16bits signed/unsigned) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   692
class Store4CNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   693
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   694
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   695
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   696
  Store4CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   697
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   698
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   699
  virtual uint length() const { return 4; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   700
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   701
489c9b5090e2 Initial load
duke
parents:
diff changeset
   702
//------------------------------Store2CNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   703
// Vector store of 2 chars (16bits signed/unsigned) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   704
class Store2CNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   705
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   706
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   707
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   708
  Store2CNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   709
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   710
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   711
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   712
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   713
489c9b5090e2 Initial load
duke
parents:
diff changeset
   714
//------------------------------Store4INode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   715
// Vector store of 4 integers (32bits signed) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   716
class Store4INode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   717
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   718
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   719
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   720
  Store4INode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   721
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   722
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   723
  virtual uint length() const { return 4; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   724
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   725
489c9b5090e2 Initial load
duke
parents:
diff changeset
   726
//------------------------------Store2INode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   727
// Vector store of 2 integers (32bits signed) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   728
class Store2INode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   729
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   730
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   731
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   732
  Store2INode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   733
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   734
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   735
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   736
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   737
489c9b5090e2 Initial load
duke
parents:
diff changeset
   738
//------------------------------Store2LNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   739
// Vector store of 2 longs (64bits signed) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   740
class Store2LNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   741
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   742
  virtual BasicType elt_basic_type() const { return T_LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   743
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   744
  Store2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   745
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   746
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   747
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   748
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   749
489c9b5090e2 Initial load
duke
parents:
diff changeset
   750
//------------------------------Store4FNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   751
// Vector store of 4 floats (32bits) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   752
class Store4FNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   753
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   754
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   755
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   756
  Store4FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   757
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   758
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   759
  virtual uint length() const { return 4; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   760
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   761
489c9b5090e2 Initial load
duke
parents:
diff changeset
   762
//------------------------------Store2FNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   763
// Vector store of 2 floats (32bits) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   764
class Store2FNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   765
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   766
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   767
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   768
  Store2FNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   769
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   770
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   771
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   772
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   773
489c9b5090e2 Initial load
duke
parents:
diff changeset
   774
//------------------------------Store2DNode--------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   775
// Vector store of 2 doubles (64bits) to memory
489c9b5090e2 Initial load
duke
parents:
diff changeset
   776
class Store2DNode : public VectorStoreNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   777
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   778
  virtual BasicType elt_basic_type() const { return T_DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   779
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   780
  Store2DNode(Node* c, Node* mem, Node* adr, const TypePtr* at, Node* val)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   781
    : VectorStoreNode(c,mem,adr,at,val) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   782
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   783
  virtual uint length() const { return 2; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   784
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   785
489c9b5090e2 Initial load
duke
parents:
diff changeset
   786
//=========================Promote_Scalar_to_Vector====================================
489c9b5090e2 Initial load
duke
parents:
diff changeset
   787
489c9b5090e2 Initial load
duke
parents:
diff changeset
   788
//------------------------------Replicate16BNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   789
// Replicate byte scalar to be vector of 16 bytes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   790
class Replicate16BNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   791
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   792
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   793
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   794
  Replicate16BNode(Node* in1) : VectorNode(in1, 16) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   795
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   796
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   797
489c9b5090e2 Initial load
duke
parents:
diff changeset
   798
//------------------------------Replicate8BNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   799
// Replicate byte scalar to be vector of 8 bytes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   800
class Replicate8BNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   801
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   802
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   803
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   804
  Replicate8BNode(Node* in1) : VectorNode(in1, 8) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   805
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   806
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   807
489c9b5090e2 Initial load
duke
parents:
diff changeset
   808
//------------------------------Replicate4BNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   809
// Replicate byte scalar to be vector of 4 bytes
489c9b5090e2 Initial load
duke
parents:
diff changeset
   810
class Replicate4BNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   811
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   812
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   813
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   814
  Replicate4BNode(Node* in1) : VectorNode(in1, 4) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   815
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   816
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   817
489c9b5090e2 Initial load
duke
parents:
diff changeset
   818
//------------------------------Replicate8CNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   819
// Replicate char scalar to be vector of 8 chars
489c9b5090e2 Initial load
duke
parents:
diff changeset
   820
class Replicate8CNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   821
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   822
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   823
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   824
  Replicate8CNode(Node* in1) : VectorNode(in1, 8) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   825
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   826
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   827
489c9b5090e2 Initial load
duke
parents:
diff changeset
   828
//------------------------------Replicate4CNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   829
// Replicate char scalar to be vector of 4 chars
489c9b5090e2 Initial load
duke
parents:
diff changeset
   830
class Replicate4CNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   831
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   832
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   833
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   834
  Replicate4CNode(Node* in1) : VectorNode(in1, 4) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   835
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   836
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   837
489c9b5090e2 Initial load
duke
parents:
diff changeset
   838
//------------------------------Replicate2CNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   839
// Replicate char scalar to be vector of 2 chars
489c9b5090e2 Initial load
duke
parents:
diff changeset
   840
class Replicate2CNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   841
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   842
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   843
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   844
  Replicate2CNode(Node* in1) : VectorNode(in1, 2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   845
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   846
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   847
489c9b5090e2 Initial load
duke
parents:
diff changeset
   848
//------------------------------Replicate8SNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   849
// Replicate short scalar to be vector of 8 shorts
489c9b5090e2 Initial load
duke
parents:
diff changeset
   850
class Replicate8SNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   851
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   852
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   853
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   854
  Replicate8SNode(Node* in1) : VectorNode(in1, 8) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   855
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   856
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   857
489c9b5090e2 Initial load
duke
parents:
diff changeset
   858
//------------------------------Replicate4SNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   859
// Replicate short scalar to be vector of 4 shorts
489c9b5090e2 Initial load
duke
parents:
diff changeset
   860
class Replicate4SNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   861
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   862
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   863
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   864
  Replicate4SNode(Node* in1) : VectorNode(in1, 4) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   865
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   866
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   867
489c9b5090e2 Initial load
duke
parents:
diff changeset
   868
//------------------------------Replicate2SNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   869
// Replicate short scalar to be vector of 2 shorts
489c9b5090e2 Initial load
duke
parents:
diff changeset
   870
class Replicate2SNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   871
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   872
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   873
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   874
  Replicate2SNode(Node* in1) : VectorNode(in1, 2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   875
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   876
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   877
489c9b5090e2 Initial load
duke
parents:
diff changeset
   878
//------------------------------Replicate4INode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   879
// Replicate int scalar to be vector of 4 ints
489c9b5090e2 Initial load
duke
parents:
diff changeset
   880
class Replicate4INode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   881
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   882
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   883
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   884
  Replicate4INode(Node* in1) : VectorNode(in1, 4) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   885
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   886
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   887
489c9b5090e2 Initial load
duke
parents:
diff changeset
   888
//------------------------------Replicate2INode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   889
// Replicate int scalar to be vector of 2 ints
489c9b5090e2 Initial load
duke
parents:
diff changeset
   890
class Replicate2INode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   891
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   892
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   893
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   894
  Replicate2INode(Node* in1) : VectorNode(in1, 2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   895
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   896
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   897
489c9b5090e2 Initial load
duke
parents:
diff changeset
   898
//------------------------------Replicate2LNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   899
// Replicate long scalar to be vector of 2 longs
489c9b5090e2 Initial load
duke
parents:
diff changeset
   900
class Replicate2LNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   901
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   902
  virtual BasicType elt_basic_type() const { return T_LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   903
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   904
  Replicate2LNode(Node* in1) : VectorNode(in1, 2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   905
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   906
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   907
489c9b5090e2 Initial load
duke
parents:
diff changeset
   908
//------------------------------Replicate4FNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   909
// Replicate float scalar to be vector of 4 floats
489c9b5090e2 Initial load
duke
parents:
diff changeset
   910
class Replicate4FNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   911
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   912
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   913
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   914
  Replicate4FNode(Node* in1) : VectorNode(in1, 4) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   915
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   916
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   917
489c9b5090e2 Initial load
duke
parents:
diff changeset
   918
//------------------------------Replicate2FNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   919
// Replicate float scalar to be vector of 2 floats
489c9b5090e2 Initial load
duke
parents:
diff changeset
   920
class Replicate2FNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   921
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   922
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   923
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   924
  Replicate2FNode(Node* in1) : VectorNode(in1, 2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   925
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   926
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   927
489c9b5090e2 Initial load
duke
parents:
diff changeset
   928
//------------------------------Replicate2DNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   929
// Replicate double scalar to be vector of 2 doubles
489c9b5090e2 Initial load
duke
parents:
diff changeset
   930
class Replicate2DNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   931
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   932
  virtual BasicType elt_basic_type() const { return T_DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   933
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   934
  Replicate2DNode(Node* in1) : VectorNode(in1, 2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   935
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   936
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   937
489c9b5090e2 Initial load
duke
parents:
diff changeset
   938
//========================Pack_Scalars_into_a_Vector==============================
489c9b5090e2 Initial load
duke
parents:
diff changeset
   939
489c9b5090e2 Initial load
duke
parents:
diff changeset
   940
//------------------------------PackNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   941
// Pack parent class (not for code generation).
489c9b5090e2 Initial load
duke
parents:
diff changeset
   942
class PackNode : public VectorNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   943
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   944
  PackNode(Node* in1)  : VectorNode(in1, 1) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   945
  PackNode(Node* in1, Node* n2)  : VectorNode(in1, n2, 2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   946
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   947
489c9b5090e2 Initial load
duke
parents:
diff changeset
   948
  void add_opd(Node* n) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   949
    add_req(n);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   950
    _length++;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   951
    assert(_length == req() - 1, "vector length matches edge count");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   952
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   953
489c9b5090e2 Initial load
duke
parents:
diff changeset
   954
  // Create a binary tree form for Packs. [lo, hi) (half-open) range
489c9b5090e2 Initial load
duke
parents:
diff changeset
   955
  Node* binaryTreePack(Compile* C, int lo, int hi);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   956
489c9b5090e2 Initial load
duke
parents:
diff changeset
   957
  static PackNode* make(Compile* C, Node* s, const Type* elt_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   958
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   959
489c9b5090e2 Initial load
duke
parents:
diff changeset
   960
//------------------------------PackBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   961
// Pack byte scalars into vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   962
class PackBNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   963
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   964
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   965
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   966
  PackBNode(Node* in1)  : PackNode(in1) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   967
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   968
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   969
489c9b5090e2 Initial load
duke
parents:
diff changeset
   970
//------------------------------PackCNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   971
// Pack char scalars into vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   972
class PackCNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   973
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   974
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   975
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   976
  PackCNode(Node* in1)  : PackNode(in1) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   977
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   978
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   979
489c9b5090e2 Initial load
duke
parents:
diff changeset
   980
//------------------------------PackSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   981
// Pack short scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   982
class PackSNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   983
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   984
  virtual BasicType elt_basic_type() const { return T_SHORT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   985
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   986
  PackSNode(Node* in1)  : PackNode(in1) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   987
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   988
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   989
489c9b5090e2 Initial load
duke
parents:
diff changeset
   990
//------------------------------PackINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
   991
// Pack integer scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
   992
class PackINode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   993
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   994
  virtual BasicType elt_basic_type() const { return T_INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   995
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   996
  PackINode(Node* in1)  : PackNode(in1) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   997
  PackINode(Node* in1, Node* in2) : PackNode(in1, in2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   998
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   999
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1000
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1001
//------------------------------PackLNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1002
// Pack long scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1003
class PackLNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1004
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1005
  virtual BasicType elt_basic_type() const { return T_LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1006
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1007
  PackLNode(Node* in1)  : PackNode(in1) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1008
  PackLNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1009
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1010
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1011
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1012
//------------------------------PackFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1013
// Pack float scalars into vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1014
class PackFNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1015
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1016
  virtual BasicType elt_basic_type() const { return T_FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1017
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1018
  PackFNode(Node* in1)  : PackNode(in1) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1019
  PackFNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1020
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1021
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1022
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1023
//------------------------------PackDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1024
// Pack double scalars into a vector
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1025
class PackDNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1026
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1027
  virtual BasicType elt_basic_type() const { return T_DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1028
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1029
  PackDNode(Node* in1)  : PackNode(in1) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1030
  PackDNode(Node* in1, Node* in2) : PackNode(in1, in2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1031
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1032
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1033
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1034
// The Pack2xN nodes assist code generation.  They are created from
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1035
// Pack4C, etc. nodes in final_graph_reshape in the form of a
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1036
// balanced, binary tree.
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1037
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1038
//------------------------------Pack2x1BNode-----------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1039
// Pack 2 1-byte integers into vector of 2 bytes
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1040
class Pack2x1BNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1041
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1042
  virtual BasicType elt_basic_type() const { return T_BYTE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1043
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1044
  Pack2x1BNode(Node *in1, Node* in2) : PackNode(in1, in2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1045
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1046
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1047
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1048
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1049
//------------------------------Pack2x2BNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1050
// Pack 2 2-byte integers into vector of 4 bytes
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1051
class Pack2x2BNode : public PackNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1052
 protected:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1053
  virtual BasicType elt_basic_type() const { return T_CHAR; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1054
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1055
  Pack2x2BNode(Node *in1, Node* in2) : PackNode(in1, in2) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1056
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1057
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1058
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1059
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1060
//========================Extract_Scalar_from_Vector===============================
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1061
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1062
//------------------------------ExtractNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1063
// Extract a scalar from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1064
class ExtractNode : public Node {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1065
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1066
  ExtractNode(Node* src, ConINode* pos) : Node(NULL, src, (Node*)pos) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1067
    assert(in(2)->get_int() >= 0, "positive constants");
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1068
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1069
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1070
  uint  pos() const { return in(2)->get_int(); }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1071
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1072
  static Node* make(Compile* C, Node* v, uint position, const Type* opd_t);
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1073
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1074
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1075
//------------------------------ExtractBNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1076
// Extract a byte from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1077
class ExtractBNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1078
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1079
  ExtractBNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1080
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1081
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1082
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1083
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1084
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1085
//------------------------------ExtractCNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1086
// Extract a char from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1087
class ExtractCNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1088
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1089
  ExtractCNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1090
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1091
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1092
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1093
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1094
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1095
//------------------------------ExtractSNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1096
// Extract a short from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1097
class ExtractSNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1098
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1099
  ExtractSNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1100
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1101
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1102
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1103
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1104
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1105
//------------------------------ExtractINode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1106
// Extract an int from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1107
class ExtractINode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1108
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1109
  ExtractINode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1110
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1111
  virtual const Type *bottom_type() const { return TypeInt::INT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1112
  virtual uint ideal_reg() const { return Op_RegI; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1113
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1114
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1115
//------------------------------ExtractLNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1116
// Extract a long from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1117
class ExtractLNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1118
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1119
  ExtractLNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1120
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1121
  virtual const Type *bottom_type() const { return TypeLong::LONG; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1122
  virtual uint ideal_reg() const { return Op_RegL; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1123
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1124
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1125
//------------------------------ExtractFNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1126
// Extract a float from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1127
class ExtractFNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1128
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1129
  ExtractFNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1130
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1131
  virtual const Type *bottom_type() const { return Type::FLOAT; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1132
  virtual uint ideal_reg() const { return Op_RegF; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1133
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1134
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1135
//------------------------------ExtractDNode---------------------------------------
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1136
// Extract a double from a vector at position "pos"
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1137
class ExtractDNode : public ExtractNode {
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1138
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1139
  ExtractDNode(Node* src, ConINode* pos) : ExtractNode(src, pos) {}
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1140
  virtual int Opcode() const;
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1141
  virtual const Type *bottom_type() const { return Type::DOUBLE; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1142
  virtual uint ideal_reg() const { return Op_RegD; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
  1143
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
  1144
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
  1145
#endif // SHARE_VM_OPTO_VECTORNODE_HPP