OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #include "src/compiler/int64-lowering.h" | 5 #include "src/compiler/int64-lowering.h" |
6 #include "src/compiler/common-operator.h" | 6 #include "src/compiler/common-operator.h" |
7 #include "src/compiler/linkage.h" | 7 #include "src/compiler/linkage.h" |
8 #include "src/compiler/machine-operator.h" | 8 #include "src/compiler/machine-operator.h" |
9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
10 | 10 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 IsInt32Constant(low_word_value(2)), | 287 IsInt32Constant(low_word_value(2)), |
288 IsInt32Constant(high_word_value(2)), start(), start()), | 288 IsInt32Constant(high_word_value(2)), start(), start()), |
289 start(), start())); | 289 start(), start())); |
290 | 290 |
291 CompareCallDescriptors( | 291 CompareCallDescriptors( |
292 OpParameter<const CallDescriptor*>( | 292 OpParameter<const CallDescriptor*>( |
293 graph()->end()->InputAt(1)->InputAt(0)), | 293 graph()->end()->InputAt(1)->InputAt(0)), |
294 wasm::ModuleEnv::GetI32WasmCallDescriptor(zone(), desc)); | 294 wasm::ModuleEnv::GetI32WasmCallDescriptor(zone(), desc)); |
295 } | 295 } |
296 | 296 |
| 297 // todo(ahaas): I added a list of missing instructions here to make merging |
| 298 // easier when I do them one by one. |
| 299 // kExprI64Add: |
| 300 // kExprI64Sub: |
| 301 // kExprI64Mul: |
| 302 // kExprI64DivS: |
| 303 // kExprI64DivU: |
| 304 // kExprI64RemS: |
| 305 // kExprI64RemU: |
| 306 // kExprI64And: |
| 307 // kExprI64Ior: |
| 308 TEST_F(Int64LoweringTest, Int64Ior) { |
| 309 if (4 != kPointerSize) return; |
| 310 |
| 311 LowerGraph(graph()->NewNode(machine()->Word64Or(), Int64Constant(value(0)), |
| 312 Int64Constant(value(1))), |
| 313 MachineRepresentation::kWord64); |
| 314 EXPECT_THAT(graph()->end()->InputAt(1), |
| 315 IsReturn2(IsWord32Or(IsInt32Constant(low_word_value(0)), |
| 316 IsInt32Constant(low_word_value(1))), |
| 317 IsWord32Or(IsInt32Constant(high_word_value(0)), |
| 318 IsInt32Constant(high_word_value(1))), |
| 319 start(), start())); |
| 320 } |
| 321 |
| 322 // kExprI64Xor: |
| 323 // kExprI64Shl: |
| 324 // kExprI64ShrU: |
| 325 // kExprI64ShrS: |
| 326 // kExprI64Eq: |
| 327 // kExprI64Ne: |
| 328 // kExprI64LtS: |
| 329 // kExprI64LeS: |
| 330 // kExprI64LtU: |
| 331 // kExprI64LeU: |
| 332 // kExprI64GtS: |
| 333 // kExprI64GeS: |
| 334 // kExprI64GtU: |
| 335 // kExprI64GeU: |
| 336 |
| 337 // kExprI32ConvertI64: |
| 338 // kExprI64SConvertI32: |
| 339 // kExprI64UConvertI32: |
| 340 |
| 341 // kExprF64ReinterpretI64: |
| 342 // kExprI64ReinterpretF64: |
| 343 |
| 344 // kExprI64Clz: |
| 345 // kExprI64Ctz: |
| 346 // kExprI64Popcnt: |
| 347 |
| 348 // kExprF32SConvertI64: |
| 349 // kExprF32UConvertI64: |
| 350 // kExprF64SConvertI64: |
| 351 // kExprF64UConvertI64: |
| 352 // kExprI64SConvertF32: |
| 353 // kExprI64SConvertF64: |
| 354 // kExprI64UConvertF32: |
| 355 // kExprI64UConvertF64: |
| 356 |
297 } // namespace compiler | 357 } // namespace compiler |
298 } // namespace internal | 358 } // namespace internal |
299 } // namespace v8 | 359 } // namespace v8 |
OLD | NEW |