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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 __ Sxtw(i.OutputRegister(), i.InputRegister32(0)); | 581 __ Sxtw(i.OutputRegister(), i.InputRegister32(0)); |
582 break; | 582 break; |
583 case kArm64Ubfx: | 583 case kArm64Ubfx: |
584 __ Ubfx(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1), | 584 __ Ubfx(i.OutputRegister(), i.InputRegister(0), i.InputInt8(1), |
585 i.InputInt8(2)); | 585 i.InputInt8(2)); |
586 break; | 586 break; |
587 case kArm64Ubfx32: | 587 case kArm64Ubfx32: |
588 __ Ubfx(i.OutputRegister32(), i.InputRegister32(0), i.InputInt8(1), | 588 __ Ubfx(i.OutputRegister32(), i.InputRegister32(0), i.InputInt8(1), |
589 i.InputInt8(2)); | 589 i.InputInt8(2)); |
590 break; | 590 break; |
| 591 case kArm64Bfi: |
| 592 __ Bfi(i.OutputRegister(), i.InputRegister(1), i.InputInt6(2), |
| 593 i.InputInt6(3)); |
| 594 break; |
591 case kArm64TestAndBranch32: | 595 case kArm64TestAndBranch32: |
592 case kArm64TestAndBranch: | 596 case kArm64TestAndBranch: |
593 // Pseudo instructions turned into tbz/tbnz in AssembleArchBranch. | 597 // Pseudo instructions turned into tbz/tbnz in AssembleArchBranch. |
594 break; | 598 break; |
595 case kArm64CompareAndBranch32: | 599 case kArm64CompareAndBranch32: |
596 // Pseudo instruction turned into cbz/cbnz in AssembleArchBranch. | 600 // Pseudo instruction turned into cbz/cbnz in AssembleArchBranch. |
597 break; | 601 break; |
598 case kArm64Claim: { | 602 case kArm64Claim: { |
599 int words = MiscField::decode(instr->opcode()); | 603 int words = MiscField::decode(instr->opcode()); |
600 __ Claim(words); | 604 __ Claim(words); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 case kArm64Int32ToFloat64: | 694 case kArm64Int32ToFloat64: |
691 __ Scvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); | 695 __ Scvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); |
692 break; | 696 break; |
693 case kArm64Uint32ToFloat64: | 697 case kArm64Uint32ToFloat64: |
694 __ Ucvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); | 698 __ Ucvtf(i.OutputDoubleRegister(), i.InputRegister32(0)); |
695 break; | 699 break; |
696 case kArm64Float64ExtractLowWord32: | 700 case kArm64Float64ExtractLowWord32: |
697 __ Fmov(i.OutputRegister32(), i.InputFloat32Register(0)); | 701 __ Fmov(i.OutputRegister32(), i.InputFloat32Register(0)); |
698 break; | 702 break; |
699 case kArm64Float64ExtractHighWord32: | 703 case kArm64Float64ExtractHighWord32: |
| 704 // TODO(arm64): This should use MOV (to general) when NEON is supported. |
700 __ Fmov(i.OutputRegister(), i.InputFloat64Register(0)); | 705 __ Fmov(i.OutputRegister(), i.InputFloat64Register(0)); |
701 __ Lsr(i.OutputRegister(), i.OutputRegister(), 32); | 706 __ Lsr(i.OutputRegister(), i.OutputRegister(), 32); |
702 break; | 707 break; |
703 case kArm64Float64InsertLowWord32: { | 708 case kArm64Float64InsertLowWord32: { |
| 709 // TODO(arm64): This should use MOV (from general) when NEON is supported. |
704 UseScratchRegisterScope scope(masm()); | 710 UseScratchRegisterScope scope(masm()); |
705 Register tmp = scope.AcquireX(); | 711 Register tmp = scope.AcquireX(); |
706 __ Fmov(tmp, i.InputFloat64Register(0)); | 712 __ Fmov(tmp, i.InputFloat64Register(0)); |
707 __ Bfi(tmp, i.InputRegister(1), 0, 32); | 713 __ Bfi(tmp, i.InputRegister(1), 0, 32); |
708 __ Fmov(i.OutputFloat64Register(), tmp); | 714 __ Fmov(i.OutputFloat64Register(), tmp); |
709 break; | 715 break; |
710 } | 716 } |
711 case kArm64Float64InsertHighWord32: { | 717 case kArm64Float64InsertHighWord32: { |
| 718 // TODO(arm64): This should use MOV (from general) when NEON is supported. |
712 UseScratchRegisterScope scope(masm()); | 719 UseScratchRegisterScope scope(masm()); |
713 Register tmp = scope.AcquireX(); | 720 Register tmp = scope.AcquireX(); |
714 __ Fmov(tmp.W(), i.InputFloat32Register(0)); | 721 __ Fmov(tmp.W(), i.InputFloat32Register(0)); |
715 __ Bfi(tmp, i.InputRegister(1), 32, 32); | 722 __ Bfi(tmp, i.InputRegister(1), 32, 32); |
716 __ Fmov(i.OutputFloat64Register(), tmp); | 723 __ Fmov(i.OutputFloat64Register(), tmp); |
717 break; | 724 break; |
718 } | 725 } |
| 726 case kArm64Float64MoveU64: { |
| 727 __ Fmov(i.OutputFloat64Register(), i.InputRegister(0)); |
| 728 break; |
| 729 } |
719 case kArm64Ldrb: | 730 case kArm64Ldrb: |
720 __ Ldrb(i.OutputRegister(), i.MemoryOperand()); | 731 __ Ldrb(i.OutputRegister(), i.MemoryOperand()); |
721 break; | 732 break; |
722 case kArm64Ldrsb: | 733 case kArm64Ldrsb: |
723 __ Ldrsb(i.OutputRegister(), i.MemoryOperand()); | 734 __ Ldrsb(i.OutputRegister(), i.MemoryOperand()); |
724 break; | 735 break; |
725 case kArm64Strb: | 736 case kArm64Strb: |
726 __ Strb(i.InputRegister(2), i.MemoryOperand()); | 737 __ Strb(i.InputRegister(2), i.MemoryOperand()); |
727 break; | 738 break; |
728 case kArm64Ldrh: | 739 case kArm64Ldrh: |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 } | 1196 } |
1186 } | 1197 } |
1187 MarkLazyDeoptSite(); | 1198 MarkLazyDeoptSite(); |
1188 } | 1199 } |
1189 | 1200 |
1190 #undef __ | 1201 #undef __ |
1191 | 1202 |
1192 } // namespace compiler | 1203 } // namespace compiler |
1193 } // namespace internal | 1204 } // namespace internal |
1194 } // namespace v8 | 1205 } // namespace v8 |
OLD | NEW |