| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_RAW_MACHINE_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| 7 | 7 |
| 8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 Node* Projection(int index, Node* a) { | 105 Node* Projection(int index, Node* a) { |
| 106 return AddNode(common()->Projection(index), a); | 106 return AddNode(common()->Projection(index), a); |
| 107 } | 107 } |
| 108 | 108 |
| 109 // Memory Operations. | 109 // Memory Operations. |
| 110 Node* Load(MachineType rep, Node* base) { | 110 Node* Load(MachineType rep, Node* base) { |
| 111 return Load(rep, base, IntPtrConstant(0)); | 111 return Load(rep, base, IntPtrConstant(0)); |
| 112 } | 112 } |
| 113 Node* Load(MachineType rep, Node* base, Node* index) { | 113 Node* Load(MachineType rep, Node* base, Node* index) { |
| 114 return AddNode(machine()->Load(rep), base, index, graph()->start(), | 114 return AddNode(machine()->Load(rep), base, index); |
| 115 graph()->start()); | |
| 116 } | 115 } |
| 117 Node* Store(MachineType rep, Node* base, Node* value, | 116 Node* Store(MachineType rep, Node* base, Node* value, |
| 118 WriteBarrierKind write_barrier) { | 117 WriteBarrierKind write_barrier) { |
| 119 return Store(rep, base, IntPtrConstant(0), value, write_barrier); | 118 return Store(rep, base, IntPtrConstant(0), value, write_barrier); |
| 120 } | 119 } |
| 121 Node* Store(MachineType rep, Node* base, Node* index, Node* value, | 120 Node* Store(MachineType rep, Node* base, Node* index, Node* value, |
| 122 WriteBarrierKind write_barrier) { | 121 WriteBarrierKind write_barrier) { |
| 123 return AddNode(machine()->Store(StoreRepresentation(rep, write_barrier)), | 122 return AddNode(machine()->Store(StoreRepresentation(rep, write_barrier)), |
| 124 base, index, value, graph()->start(), graph()->start()); | 123 base, index, value); |
| 125 } | 124 } |
| 126 | 125 |
| 127 // Arithmetic Operations. | 126 // Arithmetic Operations. |
| 128 Node* WordAnd(Node* a, Node* b) { | 127 Node* WordAnd(Node* a, Node* b) { |
| 129 return AddNode(machine()->WordAnd(), a, b); | 128 return AddNode(machine()->WordAnd(), a, b); |
| 130 } | 129 } |
| 131 Node* WordOr(Node* a, Node* b) { return AddNode(machine()->WordOr(), a, b); } | 130 Node* WordOr(Node* a, Node* b) { return AddNode(machine()->WordOr(), a, b); } |
| 132 Node* WordXor(Node* a, Node* b) { | 131 Node* WordXor(Node* a, Node* b) { |
| 133 return AddNode(machine()->WordXor(), a, b); | 132 return AddNode(machine()->WordXor(), a, b); |
| 134 } | 133 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 Node* Int32SubWithOverflow(Node* a, Node* b) { | 238 Node* Int32SubWithOverflow(Node* a, Node* b) { |
| 240 return AddNode(machine()->Int32SubWithOverflow(), a, b); | 239 return AddNode(machine()->Int32SubWithOverflow(), a, b); |
| 241 } | 240 } |
| 242 Node* Int32Mul(Node* a, Node* b) { | 241 Node* Int32Mul(Node* a, Node* b) { |
| 243 return AddNode(machine()->Int32Mul(), a, b); | 242 return AddNode(machine()->Int32Mul(), a, b); |
| 244 } | 243 } |
| 245 Node* Int32MulHigh(Node* a, Node* b) { | 244 Node* Int32MulHigh(Node* a, Node* b) { |
| 246 return AddNode(machine()->Int32MulHigh(), a, b); | 245 return AddNode(machine()->Int32MulHigh(), a, b); |
| 247 } | 246 } |
| 248 Node* Int32Div(Node* a, Node* b) { | 247 Node* Int32Div(Node* a, Node* b) { |
| 249 return AddNode(machine()->Int32Div(), a, b, graph()->start()); | 248 return AddNode(machine()->Int32Div(), a, b); |
| 250 } | 249 } |
| 251 Node* Int32Mod(Node* a, Node* b) { | 250 Node* Int32Mod(Node* a, Node* b) { |
| 252 return AddNode(machine()->Int32Mod(), a, b, graph()->start()); | 251 return AddNode(machine()->Int32Mod(), a, b); |
| 253 } | 252 } |
| 254 Node* Int32LessThan(Node* a, Node* b) { | 253 Node* Int32LessThan(Node* a, Node* b) { |
| 255 return AddNode(machine()->Int32LessThan(), a, b); | 254 return AddNode(machine()->Int32LessThan(), a, b); |
| 256 } | 255 } |
| 257 Node* Int32LessThanOrEqual(Node* a, Node* b) { | 256 Node* Int32LessThanOrEqual(Node* a, Node* b) { |
| 258 return AddNode(machine()->Int32LessThanOrEqual(), a, b); | 257 return AddNode(machine()->Int32LessThanOrEqual(), a, b); |
| 259 } | 258 } |
| 260 Node* Uint32Div(Node* a, Node* b) { | 259 Node* Uint32Div(Node* a, Node* b) { |
| 261 return AddNode(machine()->Uint32Div(), a, b, graph()->start()); | 260 return AddNode(machine()->Uint32Div(), a, b); |
| 262 } | 261 } |
| 263 Node* Uint32LessThan(Node* a, Node* b) { | 262 Node* Uint32LessThan(Node* a, Node* b) { |
| 264 return AddNode(machine()->Uint32LessThan(), a, b); | 263 return AddNode(machine()->Uint32LessThan(), a, b); |
| 265 } | 264 } |
| 266 Node* Uint32LessThanOrEqual(Node* a, Node* b) { | 265 Node* Uint32LessThanOrEqual(Node* a, Node* b) { |
| 267 return AddNode(machine()->Uint32LessThanOrEqual(), a, b); | 266 return AddNode(machine()->Uint32LessThanOrEqual(), a, b); |
| 268 } | 267 } |
| 269 Node* Uint32Mod(Node* a, Node* b) { | 268 Node* Uint32Mod(Node* a, Node* b) { |
| 270 return AddNode(machine()->Uint32Mod(), a, b, graph()->start()); | 269 return AddNode(machine()->Uint32Mod(), a, b); |
| 271 } | 270 } |
| 272 Node* Uint32MulHigh(Node* a, Node* b) { | 271 Node* Uint32MulHigh(Node* a, Node* b) { |
| 273 return AddNode(machine()->Uint32MulHigh(), a, b); | 272 return AddNode(machine()->Uint32MulHigh(), a, b); |
| 274 } | 273 } |
| 275 Node* Int32GreaterThan(Node* a, Node* b) { return Int32LessThan(b, a); } | 274 Node* Int32GreaterThan(Node* a, Node* b) { return Int32LessThan(b, a); } |
| 276 Node* Int32GreaterThanOrEqual(Node* a, Node* b) { | 275 Node* Int32GreaterThanOrEqual(Node* a, Node* b) { |
| 277 return Int32LessThanOrEqual(b, a); | 276 return Int32LessThanOrEqual(b, a); |
| 278 } | 277 } |
| 279 Node* Int32Neg(Node* a) { return Int32Sub(Int32Constant(0), a); } | 278 Node* Int32Neg(Node* a) { return Int32Sub(Int32Constant(0), a); } |
| 280 | 279 |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 bool bound_; | 668 bool bound_; |
| 670 friend class RawMachineAssembler; | 669 friend class RawMachineAssembler; |
| 671 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); | 670 DISALLOW_COPY_AND_ASSIGN(RawMachineLabel); |
| 672 }; | 671 }; |
| 673 | 672 |
| 674 } // namespace compiler | 673 } // namespace compiler |
| 675 } // namespace internal | 674 } // namespace internal |
| 676 } // namespace v8 | 675 } // namespace v8 |
| 677 | 676 |
| 678 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 677 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| OLD | NEW |