54 |
54 |
55 static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t); |
55 static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t); |
56 |
56 |
57 static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt); |
57 static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt); |
58 |
58 |
59 static int opcode(int opc, uint vlen, BasicType bt); |
59 static int opcode(int opc, BasicType bt); |
60 static bool implemented(int opc, uint vlen, BasicType bt); |
60 static bool implemented(int opc, uint vlen, BasicType bt); |
61 static bool is_shift(Node* n); |
61 static bool is_shift(Node* n); |
62 static bool is_invariant_vector(Node* n); |
62 static bool is_invariant_vector(Node* n); |
|
63 // [Start, end) half-open range defining which operands are vectors |
|
64 static void vector_operands(Node* n, uint* start, uint* end); |
63 }; |
65 }; |
64 |
66 |
65 //===========================Vector=ALU=Operations==================================== |
67 //===========================Vector=ALU=Operations==================================== |
66 |
68 |
67 //------------------------------AddVBNode--------------------------------------- |
69 //------------------------------AddVBNode--------------------------------------- |
438 public: |
440 public: |
439 PackNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
441 PackNode(Node* in1, const TypeVect* vt) : VectorNode(in1, vt) {} |
440 PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {} |
442 PackNode(Node* in1, Node* n2, const TypeVect* vt) : VectorNode(in1, n2, vt) {} |
441 virtual int Opcode() const; |
443 virtual int Opcode() const; |
442 |
444 |
443 void add_opd(uint i, Node* n) { |
445 void add_opd(Node* n) { |
444 init_req(i+1, n); |
446 add_req(n); |
445 } |
447 } |
446 |
448 |
447 // Create a binary tree form for Packs. [lo, hi) (half-open) range |
449 // Create a binary tree form for Packs. [lo, hi) (half-open) range |
448 Node* binaryTreePack(Compile* C, int lo, int hi); |
450 PackNode* binary_tree_pack(Compile* C, int lo, int hi); |
449 |
451 |
450 static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt); |
452 static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt); |
451 }; |
453 }; |
452 |
454 |
453 //------------------------------PackBNode--------------------------------------- |
455 //------------------------------PackBNode--------------------------------------- |