Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 22947006: Add signMask getter to Float32x4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 V(::, min, MathMin, 1584022354) \ 87 V(::, min, MathMin, 1584022354) \
88 V(::, max, MathMax, 328632232) \ 88 V(::, max, MathMax, 328632232) \
89 V(Float32x4, Float32x4., Float32x4Constructor, 1876089990) \ 89 V(Float32x4, Float32x4., Float32x4Constructor, 1876089990) \
90 V(Float32x4, Float32x4.zero, Float32x4Zero, 1903586222) \ 90 V(Float32x4, Float32x4.zero, Float32x4Zero, 1903586222) \
91 V(Float32x4, Float32x4.splat, Float32x4Splat, 38462589) \ 91 V(Float32x4, Float32x4.splat, Float32x4Splat, 38462589) \
92 V(_Float32x4, _shuffle, Float32x4Shuffle, 2044955136) \ 92 V(_Float32x4, _shuffle, Float32x4Shuffle, 2044955136) \
93 V(_Float32x4, get:x, Float32x4ShuffleX, 1019523296) \ 93 V(_Float32x4, get:x, Float32x4ShuffleX, 1019523296) \
94 V(_Float32x4, get:y, Float32x4ShuffleY, 710282243) \ 94 V(_Float32x4, get:y, Float32x4ShuffleY, 710282243) \
95 V(_Float32x4, get:z, Float32x4ShuffleZ, 1612806041) \ 95 V(_Float32x4, get:z, Float32x4ShuffleZ, 1612806041) \
96 V(_Float32x4, get:w, Float32x4ShuffleW, 1113701403) \ 96 V(_Float32x4, get:w, Float32x4ShuffleW, 1113701403) \
97 V(_Float32x4, get:signMask, Float32x4GetSignMask, 465347632) \
97 V(_Float32x4, _cmpequal, Float32x4Equal, 1559121703) \ 98 V(_Float32x4, _cmpequal, Float32x4Equal, 1559121703) \
98 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 1959692892) \ 99 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 1959692892) \
99 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 2128251808) \ 100 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 2128251808) \
100 V(_Float32x4, _cmplt, Float32x4LessThan, 405464198) \ 101 V(_Float32x4, _cmplt, Float32x4LessThan, 405464198) \
101 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 1217836152) \ 102 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 1217836152) \
102 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 498820440) \ 103 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 498820440) \
103 V(_Float32x4, _min, Float32x4Min, 1354880316) \ 104 V(_Float32x4, _min, Float32x4Min, 1354880316) \
104 V(_Float32x4, _max, Float32x4Max, 171574145) \ 105 V(_Float32x4, _max, Float32x4Max, 171574145) \
105 V(_Float32x4, _scale, Float32x4Scale, 1553559438) \ 106 V(_Float32x4, _scale, Float32x4Scale, 1553559438) \
106 V(_Float32x4, _sqrt, Float32x4Sqrt, 612006112) \ 107 V(_Float32x4, _sqrt, Float32x4Sqrt, 612006112) \
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 M(ShiftMintOp) \ 607 M(ShiftMintOp) \
607 M(UnaryMintOp) \ 608 M(UnaryMintOp) \
608 M(CheckArrayBound) \ 609 M(CheckArrayBound) \
609 M(Constraint) \ 610 M(Constraint) \
610 M(StringFromCharCode) \ 611 M(StringFromCharCode) \
611 M(InvokeMathCFunction) \ 612 M(InvokeMathCFunction) \
612 M(GuardField) \ 613 M(GuardField) \
613 M(IfThenElse) \ 614 M(IfThenElse) \
614 M(BinaryFloat32x4Op) \ 615 M(BinaryFloat32x4Op) \
615 M(Float32x4Shuffle) \ 616 M(Float32x4Shuffle) \
617 M(Float32x4GetSignMask) \
616 M(Float32x4Constructor) \ 618 M(Float32x4Constructor) \
617 M(Float32x4Zero) \ 619 M(Float32x4Zero) \
618 M(Float32x4Splat) \ 620 M(Float32x4Splat) \
619 M(Float32x4Comparison) \ 621 M(Float32x4Comparison) \
620 M(Float32x4MinMax) \ 622 M(Float32x4MinMax) \
621 M(Float32x4Scale) \ 623 M(Float32x4Scale) \
622 M(Float32x4Sqrt) \ 624 M(Float32x4Sqrt) \
623 M(Float32x4ZeroArg) \ 625 M(Float32x4ZeroArg) \
624 M(Float32x4Clamp) \ 626 M(Float32x4Clamp) \
625 M(Float32x4With) \ 627 M(Float32x4With) \
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 // Classes that set or read deopt_id_. 897 // Classes that set or read deopt_id_.
896 friend class UnboxIntegerInstr; 898 friend class UnboxIntegerInstr;
897 friend class UnboxDoubleInstr; 899 friend class UnboxDoubleInstr;
898 friend class UnboxFloat32x4Instr; 900 friend class UnboxFloat32x4Instr;
899 friend class UnboxUint32x4Instr; 901 friend class UnboxUint32x4Instr;
900 friend class BinaryDoubleOpInstr; 902 friend class BinaryDoubleOpInstr;
901 friend class BinaryFloat32x4OpInstr; 903 friend class BinaryFloat32x4OpInstr;
902 friend class Float32x4ZeroInstr; 904 friend class Float32x4ZeroInstr;
903 friend class Float32x4SplatInstr; 905 friend class Float32x4SplatInstr;
904 friend class Float32x4ShuffleInstr; 906 friend class Float32x4ShuffleInstr;
907 friend class Float32x4GetSignMaskInstr;
905 friend class Float32x4ConstructorInstr; 908 friend class Float32x4ConstructorInstr;
906 friend class Float32x4ComparisonInstr; 909 friend class Float32x4ComparisonInstr;
907 friend class Float32x4MinMaxInstr; 910 friend class Float32x4MinMaxInstr;
908 friend class Float32x4ScaleInstr; 911 friend class Float32x4ScaleInstr;
909 friend class Float32x4SqrtInstr; 912 friend class Float32x4SqrtInstr;
910 friend class Float32x4ZeroArgInstr; 913 friend class Float32x4ZeroArgInstr;
911 friend class Float32x4ClampInstr; 914 friend class Float32x4ClampInstr;
912 friend class Float32x4WithInstr; 915 friend class Float32x4WithInstr;
913 friend class Float32x4ToUint32x4Instr; 916 friend class Float32x4ToUint32x4Instr;
914 friend class Float32x4TwoArgShuffleInstr; 917 friend class Float32x4TwoArgShuffleInstr;
(...skipping 4605 matching lines...) Expand 10 before | Expand all | Expand 10 after
5520 5523
5521 virtual bool MayThrow() const { return false; } 5524 virtual bool MayThrow() const { return false; }
5522 5525
5523 private: 5526 private:
5524 const MethodRecognizer::Kind op_kind_; 5527 const MethodRecognizer::Kind op_kind_;
5525 5528
5526 DISALLOW_COPY_AND_ASSIGN(Uint32x4GetFlagInstr); 5529 DISALLOW_COPY_AND_ASSIGN(Uint32x4GetFlagInstr);
5527 }; 5530 };
5528 5531
5529 5532
5533 class Float32x4GetSignMaskInstr : public TemplateDefinition<1> {
5534 public:
5535 Float32x4GetSignMaskInstr(Value* value, intptr_t deopt_id) {
5536 SetInputAt(0, value);
5537 deopt_id_ = deopt_id;
5538 }
5539
5540 Value* value() const { return inputs_[0]; }
5541
5542 virtual void PrintOperandsTo(BufferFormatter* f) const;
5543
5544 virtual bool CanDeoptimize() const { return false; }
5545
5546 virtual Representation representation() const {
5547 return kTagged;
5548 }
5549
5550 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5551 ASSERT(idx == 0);
5552 return kUnboxedFloat32x4;
5553 }
5554
5555 virtual intptr_t DeoptimizationTarget() const {
5556 // Direct access since this instruction cannot deoptimize, and the deopt-id
5557 // was inherited from another instruction that could deoptimize.
5558 return deopt_id_;
5559 }
5560
5561 DECLARE_INSTRUCTION(Float32x4GetSignMask)
5562 virtual CompileType ComputeType() const;
5563
5564 virtual bool AllowsCSE() const { return true; }
5565 virtual EffectSet Effects() const { return EffectSet::None(); }
5566 virtual EffectSet Dependencies() const { return EffectSet::None(); }
5567 virtual bool AttributesEqual(Instruction* other) const {
5568 return true;
5569 }
5570
5571 virtual bool MayThrow() const { return false; }
5572
5573 private:
5574 DISALLOW_COPY_AND_ASSIGN(Float32x4GetSignMaskInstr);
5575 };
5576
5577
5530 class Float32x4TwoArgShuffleInstr : public TemplateDefinition<2> { 5578 class Float32x4TwoArgShuffleInstr : public TemplateDefinition<2> {
5531 public: 5579 public:
5532 Float32x4TwoArgShuffleInstr(MethodRecognizer::Kind op_kind, Value* left, 5580 Float32x4TwoArgShuffleInstr(MethodRecognizer::Kind op_kind, Value* left,
5533 Value* right, intptr_t deopt_id) 5581 Value* right, intptr_t deopt_id)
5534 : op_kind_(op_kind) { 5582 : op_kind_(op_kind) {
5535 SetInputAt(0, left); 5583 SetInputAt(0, left);
5536 SetInputAt(1, right); 5584 SetInputAt(1, right);
5537 deopt_id_ = deopt_id; 5585 deopt_id_ = deopt_id;
5538 } 5586 }
5539 5587
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
6675 ForwardInstructionIterator* current_iterator_; 6723 ForwardInstructionIterator* current_iterator_;
6676 6724
6677 private: 6725 private:
6678 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6726 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6679 }; 6727 };
6680 6728
6681 6729
6682 } // namespace dart 6730 } // namespace dart
6683 6731
6684 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6732 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698