OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ | 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ |
6 #define V8_COMPILER_MACHINE_OPERATOR_H_ | 6 #define V8_COMPILER_MACHINE_OPERATOR_H_ |
7 | 7 |
8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
10 #include "src/zone.h" | 10 #include "src/zone.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 Operator::kAssociative | Operator::kCommutative | Operator::kPure, 2, \ | 80 Operator::kAssociative | Operator::kCommutative | Operator::kPure, 2, \ |
81 2) | 81 2) |
82 #define UNOP(name) SIMPLE(name, Operator::kPure, 1, 1) | 82 #define UNOP(name) SIMPLE(name, Operator::kPure, 1, 1) |
83 | 83 |
84 #define WORD_SIZE(x) return is64() ? Word64##x() : Word32##x() | 84 #define WORD_SIZE(x) return is64() ? Word64##x() : Word32##x() |
85 | 85 |
86 Operator* Load(MachineRepresentation rep) { // load [base + index] | 86 Operator* Load(MachineRepresentation rep) { // load [base + index] |
87 OP1(Load, MachineRepresentation, rep, Operator::kNoWrite, 2, 1); | 87 OP1(Load, MachineRepresentation, rep, Operator::kNoWrite, 2, 1); |
88 } | 88 } |
89 // store [base + index], value | 89 // store [base + index], value |
90 Operator* Store(MachineRepresentation rep, | 90 Operator* Store(MachineRepresentation rep, WriteBarrierKind kind) { |
91 WriteBarrierKind kind = kNoWriteBarrier) { | |
92 StoreRepresentation store_rep = {rep, kind}; | 91 StoreRepresentation store_rep = {rep, kind}; |
93 OP1(Store, StoreRepresentation, store_rep, Operator::kNoRead, 3, 0); | 92 OP1(Store, StoreRepresentation, store_rep, Operator::kNoRead, 3, 0); |
94 } | 93 } |
95 | 94 |
96 Operator* WordAnd() { WORD_SIZE(And); } | 95 Operator* WordAnd() { WORD_SIZE(And); } |
97 Operator* WordOr() { WORD_SIZE(Or); } | 96 Operator* WordOr() { WORD_SIZE(Or); } |
98 Operator* WordXor() { WORD_SIZE(Xor); } | 97 Operator* WordXor() { WORD_SIZE(Xor); } |
99 Operator* WordShl() { WORD_SIZE(Shl); } | 98 Operator* WordShl() { WORD_SIZE(Shl); } |
100 Operator* WordShr() { WORD_SIZE(Shr); } | 99 Operator* WordShr() { WORD_SIZE(Shr); } |
101 Operator* WordSar() { WORD_SIZE(Sar); } | 100 Operator* WordSar() { WORD_SIZE(Sar); } |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 181 |
183 private: | 182 private: |
184 Zone* zone_; | 183 Zone* zone_; |
185 MachineRepresentation word_; | 184 MachineRepresentation word_; |
186 }; | 185 }; |
187 } | 186 } |
188 } | 187 } |
189 } // namespace v8::internal::compiler | 188 } // namespace v8::internal::compiler |
190 | 189 |
191 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 190 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
OLD | NEW |