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 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm64/macro-assembler-arm64.h" | 7 #include "src/arm64/macro-assembler-arm64.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 break; | 389 break; |
390 case kArm64Float64ToUint32: | 390 case kArm64Float64ToUint32: |
391 __ Fcvtzu(i.OutputRegister32(), i.InputDoubleRegister(0)); | 391 __ Fcvtzu(i.OutputRegister32(), i.InputDoubleRegister(0)); |
392 break; | 392 break; |
393 case kArm64Int32ToFloat64: | 393 case kArm64Int32ToFloat64: |
394 __ Scvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); | 394 __ Scvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); |
395 break; | 395 break; |
396 case kArm64Uint32ToFloat64: | 396 case kArm64Uint32ToFloat64: |
397 __ Ucvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); | 397 __ Ucvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); |
398 break; | 398 break; |
399 case kArm64LoadWord8: | 399 case kArm64Ldrb: |
400 __ Ldrb(i.OutputRegister(), i.MemoryOperand()); | 400 __ Ldrb(i.OutputRegister(), i.MemoryOperand()); |
401 break; | 401 break; |
402 case kArm64StoreWord8: | 402 case kArm64Ldrsb: |
| 403 __ Ldrsb(i.OutputRegister(), i.MemoryOperand()); |
| 404 break; |
| 405 case kArm64Strb: |
403 __ Strb(i.InputRegister(2), i.MemoryOperand()); | 406 __ Strb(i.InputRegister(2), i.MemoryOperand()); |
404 break; | 407 break; |
405 case kArm64LoadWord16: | 408 case kArm64Ldrh: |
406 __ Ldrh(i.OutputRegister(), i.MemoryOperand()); | 409 __ Ldrh(i.OutputRegister(), i.MemoryOperand()); |
407 break; | 410 break; |
408 case kArm64StoreWord16: | 411 case kArm64Ldrsh: |
| 412 __ Ldrsh(i.OutputRegister(), i.MemoryOperand()); |
| 413 break; |
| 414 case kArm64Strh: |
409 __ Strh(i.InputRegister(2), i.MemoryOperand()); | 415 __ Strh(i.InputRegister(2), i.MemoryOperand()); |
410 break; | 416 break; |
411 case kArm64LoadWord32: | 417 case kArm64LdrW: |
412 __ Ldr(i.OutputRegister32(), i.MemoryOperand()); | 418 __ Ldr(i.OutputRegister32(), i.MemoryOperand()); |
413 break; | 419 break; |
414 case kArm64StoreWord32: | 420 case kArm64StrW: |
415 __ Str(i.InputRegister32(2), i.MemoryOperand()); | 421 __ Str(i.InputRegister32(2), i.MemoryOperand()); |
416 break; | 422 break; |
417 case kArm64LoadWord64: | 423 case kArm64Ldr: |
418 __ Ldr(i.OutputRegister(), i.MemoryOperand()); | 424 __ Ldr(i.OutputRegister(), i.MemoryOperand()); |
419 break; | 425 break; |
420 case kArm64StoreWord64: | 426 case kArm64Str: |
421 __ Str(i.InputRegister(2), i.MemoryOperand()); | 427 __ Str(i.InputRegister(2), i.MemoryOperand()); |
422 break; | 428 break; |
423 case kArm64Float64Load: | 429 case kArm64LdrD: |
424 __ Ldr(i.OutputDoubleRegister(), i.MemoryOperand()); | 430 __ Ldr(i.OutputDoubleRegister(), i.MemoryOperand()); |
425 break; | 431 break; |
426 case kArm64Float64Store: | 432 case kArm64StrD: |
427 __ Str(i.InputDoubleRegister(2), i.MemoryOperand()); | 433 __ Str(i.InputDoubleRegister(2), i.MemoryOperand()); |
428 break; | 434 break; |
429 case kArm64StoreWriteBarrier: { | 435 case kArm64StoreWriteBarrier: { |
430 Register object = i.InputRegister(0); | 436 Register object = i.InputRegister(0); |
431 Register index = i.InputRegister(1); | 437 Register index = i.InputRegister(1); |
432 Register value = i.InputRegister(2); | 438 Register value = i.InputRegister(2); |
433 __ Add(index, object, Operand(index, SXTW)); | 439 __ Add(index, object, Operand(index, SXTW)); |
434 __ Str(value, MemOperand(index)); | 440 __ Str(value, MemOperand(index)); |
435 SaveFPRegsMode mode = code_->frame()->DidAllocateDoubleRegisters() | 441 SaveFPRegsMode mode = code_->frame()->DidAllocateDoubleRegisters() |
436 ? kSaveFPRegs | 442 ? kSaveFPRegs |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 } | 833 } |
828 | 834 |
829 | 835 |
830 void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); } | 836 void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); } |
831 | 837 |
832 #undef __ | 838 #undef __ |
833 | 839 |
834 } // namespace compiler | 840 } // namespace compiler |
835 } // namespace internal | 841 } // namespace internal |
836 } // namespace v8 | 842 } // namespace v8 |
OLD | NEW |