| 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/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 } | 221 } |
| 222 Node* Int32SubWithOverflow(Node* a, Node* b) { | 222 Node* Int32SubWithOverflow(Node* a, Node* b) { |
| 223 return NewNode(machine()->Int32SubWithOverflow(), a, b); | 223 return NewNode(machine()->Int32SubWithOverflow(), a, b); |
| 224 } | 224 } |
| 225 Node* Int32Mul(Node* a, Node* b) { | 225 Node* Int32Mul(Node* a, Node* b) { |
| 226 return NewNode(machine()->Int32Mul(), a, b); | 226 return NewNode(machine()->Int32Mul(), a, b); |
| 227 } | 227 } |
| 228 Node* Int32Div(Node* a, Node* b) { | 228 Node* Int32Div(Node* a, Node* b) { |
| 229 return NewNode(machine()->Int32Div(), a, b); | 229 return NewNode(machine()->Int32Div(), a, b); |
| 230 } | 230 } |
| 231 Node* Int32UDiv(Node* a, Node* b) { | |
| 232 return NewNode(machine()->Int32UDiv(), a, b); | |
| 233 } | |
| 234 Node* Int32Mod(Node* a, Node* b) { | 231 Node* Int32Mod(Node* a, Node* b) { |
| 235 return NewNode(machine()->Int32Mod(), a, b); | 232 return NewNode(machine()->Int32Mod(), a, b); |
| 236 } | 233 } |
| 237 Node* Int32UMod(Node* a, Node* b) { | |
| 238 return NewNode(machine()->Int32UMod(), a, b); | |
| 239 } | |
| 240 Node* Int32LessThan(Node* a, Node* b) { | 234 Node* Int32LessThan(Node* a, Node* b) { |
| 241 return NewNode(machine()->Int32LessThan(), a, b); | 235 return NewNode(machine()->Int32LessThan(), a, b); |
| 242 } | 236 } |
| 243 Node* Int32LessThanOrEqual(Node* a, Node* b) { | 237 Node* Int32LessThanOrEqual(Node* a, Node* b) { |
| 244 return NewNode(machine()->Int32LessThanOrEqual(), a, b); | 238 return NewNode(machine()->Int32LessThanOrEqual(), a, b); |
| 245 } | 239 } |
| 240 Node* Uint32Div(Node* a, Node* b) { |
| 241 return NewNode(machine()->Uint32Div(), a, b); |
| 242 } |
| 246 Node* Uint32LessThan(Node* a, Node* b) { | 243 Node* Uint32LessThan(Node* a, Node* b) { |
| 247 return NewNode(machine()->Uint32LessThan(), a, b); | 244 return NewNode(machine()->Uint32LessThan(), a, b); |
| 248 } | 245 } |
| 249 Node* Uint32LessThanOrEqual(Node* a, Node* b) { | 246 Node* Uint32LessThanOrEqual(Node* a, Node* b) { |
| 250 return NewNode(machine()->Uint32LessThanOrEqual(), a, b); | 247 return NewNode(machine()->Uint32LessThanOrEqual(), a, b); |
| 251 } | 248 } |
| 249 Node* Uint32Mod(Node* a, Node* b) { |
| 250 return NewNode(machine()->Uint32Mod(), a, b); |
| 251 } |
| 252 Node* Int32GreaterThan(Node* a, Node* b) { return Int32LessThan(b, a); } | 252 Node* Int32GreaterThan(Node* a, Node* b) { return Int32LessThan(b, a); } |
| 253 Node* Int32GreaterThanOrEqual(Node* a, Node* b) { | 253 Node* Int32GreaterThanOrEqual(Node* a, Node* b) { |
| 254 return Int32LessThanOrEqual(b, a); | 254 return Int32LessThanOrEqual(b, a); |
| 255 } | 255 } |
| 256 Node* Int32Neg(Node* a) { return Int32Sub(Int32Constant(0), a); } | 256 Node* Int32Neg(Node* a) { return Int32Sub(Int32Constant(0), a); } |
| 257 | 257 |
| 258 Node* Int64Add(Node* a, Node* b) { | 258 Node* Int64Add(Node* a, Node* b) { |
| 259 return NewNode(machine()->Int64Add(), a, b); | 259 return NewNode(machine()->Int64Add(), a, b); |
| 260 } | 260 } |
| 261 Node* Int64Sub(Node* a, Node* b) { | 261 Node* Int64Sub(Node* a, Node* b) { |
| 262 return NewNode(machine()->Int64Sub(), a, b); | 262 return NewNode(machine()->Int64Sub(), a, b); |
| 263 } | 263 } |
| 264 Node* Int64Mul(Node* a, Node* b) { | 264 Node* Int64Mul(Node* a, Node* b) { |
| 265 return NewNode(machine()->Int64Mul(), a, b); | 265 return NewNode(machine()->Int64Mul(), a, b); |
| 266 } | 266 } |
| 267 Node* Int64Div(Node* a, Node* b) { | 267 Node* Int64Div(Node* a, Node* b) { |
| 268 return NewNode(machine()->Int64Div(), a, b); | 268 return NewNode(machine()->Int64Div(), a, b); |
| 269 } | 269 } |
| 270 Node* Int64UDiv(Node* a, Node* b) { | |
| 271 return NewNode(machine()->Int64UDiv(), a, b); | |
| 272 } | |
| 273 Node* Int64Mod(Node* a, Node* b) { | 270 Node* Int64Mod(Node* a, Node* b) { |
| 274 return NewNode(machine()->Int64Mod(), a, b); | 271 return NewNode(machine()->Int64Mod(), a, b); |
| 275 } | 272 } |
| 276 Node* Int64UMod(Node* a, Node* b) { | |
| 277 return NewNode(machine()->Int64UMod(), a, b); | |
| 278 } | |
| 279 Node* Int64Neg(Node* a) { return Int64Sub(Int64Constant(0), a); } | 273 Node* Int64Neg(Node* a) { return Int64Sub(Int64Constant(0), a); } |
| 280 Node* Int64LessThan(Node* a, Node* b) { | 274 Node* Int64LessThan(Node* a, Node* b) { |
| 281 return NewNode(machine()->Int64LessThan(), a, b); | 275 return NewNode(machine()->Int64LessThan(), a, b); |
| 282 } | 276 } |
| 283 Node* Int64LessThanOrEqual(Node* a, Node* b) { | 277 Node* Int64LessThanOrEqual(Node* a, Node* b) { |
| 284 return NewNode(machine()->Int64LessThanOrEqual(), a, b); | 278 return NewNode(machine()->Int64LessThanOrEqual(), a, b); |
| 285 } | 279 } |
| 286 Node* Int64GreaterThan(Node* a, Node* b) { return Int64LessThan(b, a); } | 280 Node* Int64GreaterThan(Node* a, Node* b) { return Int64LessThan(b, a); } |
| 287 Node* Int64GreaterThanOrEqual(Node* a, Node* b) { | 281 Node* Int64GreaterThanOrEqual(Node* a, Node* b) { |
| 288 return Int64LessThanOrEqual(b, a); | 282 return Int64LessThanOrEqual(b, a); |
| 289 } | 283 } |
| 284 Node* Uint64Div(Node* a, Node* b) { |
| 285 return NewNode(machine()->Uint64Div(), a, b); |
| 286 } |
| 287 Node* Uint64Mod(Node* a, Node* b) { |
| 288 return NewNode(machine()->Uint64Mod(), a, b); |
| 289 } |
| 290 | 290 |
| 291 // TODO(turbofan): What is this used for? | 291 // TODO(turbofan): What is this used for? |
| 292 Node* ConvertIntPtrToInt32(Node* a) { | 292 Node* ConvertIntPtrToInt32(Node* a) { |
| 293 return kPointerSize == 8 ? NewNode(machine()->TruncateInt64ToInt32(), a) | 293 return kPointerSize == 8 ? NewNode(machine()->TruncateInt64ToInt32(), a) |
| 294 : a; | 294 : a; |
| 295 } | 295 } |
| 296 Node* ConvertInt32ToIntPtr(Node* a) { | 296 Node* ConvertInt32ToIntPtr(Node* a) { |
| 297 return kPointerSize == 8 ? NewNode(machine()->ChangeInt32ToInt64(), a) : a; | 297 return kPointerSize == 8 ? NewNode(machine()->ChangeInt32ToInt64(), a) : a; |
| 298 } | 298 } |
| 299 | 299 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 BasicBlock* current_block_; | 438 BasicBlock* current_block_; |
| 439 | 439 |
| 440 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); | 440 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); |
| 441 }; | 441 }; |
| 442 | 442 |
| 443 } // namespace compiler | 443 } // namespace compiler |
| 444 } // namespace internal | 444 } // namespace internal |
| 445 } // namespace v8 | 445 } // namespace v8 |
| 446 | 446 |
| 447 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ | 447 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ |
| OLD | NEW |