OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 case kArchStackPointer: | 636 case kArchStackPointer: |
637 __ movq(i.OutputRegister(), rsp); | 637 __ movq(i.OutputRegister(), rsp); |
638 break; | 638 break; |
639 case kArchFramePointer: | 639 case kArchFramePointer: |
640 __ movq(i.OutputRegister(), rbp); | 640 __ movq(i.OutputRegister(), rbp); |
641 break; | 641 break; |
642 case kArchTruncateDoubleToI: { | 642 case kArchTruncateDoubleToI: { |
643 auto result = i.OutputRegister(); | 643 auto result = i.OutputRegister(); |
644 auto input = i.InputDoubleRegister(0); | 644 auto input = i.InputDoubleRegister(0); |
645 auto ool = new (zone()) OutOfLineTruncateDoubleToI(this, result, input); | 645 auto ool = new (zone()) OutOfLineTruncateDoubleToI(this, result, input); |
646 __ cvttsd2siq(result, input); | 646 __ Cvttsd2siq(result, input); |
647 __ cmpq(result, Immediate(1)); | 647 __ cmpq(result, Immediate(1)); |
648 __ j(overflow, ool->entry()); | 648 __ j(overflow, ool->entry()); |
649 __ bind(ool->exit()); | 649 __ bind(ool->exit()); |
650 break; | 650 break; |
651 } | 651 } |
652 case kX64Add32: | 652 case kX64Add32: |
653 ASSEMBLE_BINOP(addl); | 653 ASSEMBLE_BINOP(addl); |
654 break; | 654 break; |
655 case kX64Add: | 655 case kX64Add: |
656 ASSEMBLE_BINOP(addq); | 656 ASSEMBLE_BINOP(addq); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 RoundingMode const mode = | 906 RoundingMode const mode = |
907 static_cast<RoundingMode>(MiscField::decode(instr->opcode())); | 907 static_cast<RoundingMode>(MiscField::decode(instr->opcode())); |
908 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode); | 908 __ roundsd(i.OutputDoubleRegister(), i.InputDoubleRegister(0), mode); |
909 break; | 909 break; |
910 } | 910 } |
911 case kSSEFloat64ToFloat32: | 911 case kSSEFloat64ToFloat32: |
912 ASSEMBLE_SSE_UNOP(cvtsd2ss); | 912 ASSEMBLE_SSE_UNOP(cvtsd2ss); |
913 break; | 913 break; |
914 case kSSEFloat64ToInt32: | 914 case kSSEFloat64ToInt32: |
915 if (instr->InputAt(0)->IsDoubleRegister()) { | 915 if (instr->InputAt(0)->IsDoubleRegister()) { |
916 __ cvttsd2si(i.OutputRegister(), i.InputDoubleRegister(0)); | 916 __ Cvttsd2si(i.OutputRegister(), i.InputDoubleRegister(0)); |
917 } else { | 917 } else { |
918 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); | 918 __ Cvttsd2si(i.OutputRegister(), i.InputOperand(0)); |
919 } | 919 } |
920 break; | 920 break; |
921 case kSSEFloat64ToUint32: { | 921 case kSSEFloat64ToUint32: { |
922 if (instr->InputAt(0)->IsDoubleRegister()) { | 922 if (instr->InputAt(0)->IsDoubleRegister()) { |
923 __ cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); | 923 __ Cvttsd2siq(i.OutputRegister(), i.InputDoubleRegister(0)); |
924 } else { | 924 } else { |
925 __ cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); | 925 __ Cvttsd2siq(i.OutputRegister(), i.InputOperand(0)); |
926 } | 926 } |
927 __ AssertZeroExtended(i.OutputRegister()); | 927 __ AssertZeroExtended(i.OutputRegister()); |
928 break; | 928 break; |
929 } | 929 } |
930 case kSSEInt32ToFloat64: | 930 case kSSEInt32ToFloat64: |
931 if (instr->InputAt(0)->IsRegister()) { | 931 if (instr->InputAt(0)->IsRegister()) { |
932 __ Cvtlsi2sd(i.OutputDoubleRegister(), i.InputRegister(0)); | 932 __ Cvtlsi2sd(i.OutputDoubleRegister(), i.InputRegister(0)); |
933 } else { | 933 } else { |
934 __ Cvtlsi2sd(i.OutputDoubleRegister(), i.InputOperand(0)); | 934 __ Cvtlsi2sd(i.OutputDoubleRegister(), i.InputOperand(0)); |
935 } | 935 } |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1826 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 1826 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
1827 __ Nop(padding_size); | 1827 __ Nop(padding_size); |
1828 } | 1828 } |
1829 } | 1829 } |
1830 | 1830 |
1831 #undef __ | 1831 #undef __ |
1832 | 1832 |
1833 } // namespace compiler | 1833 } // namespace compiler |
1834 } // namespace internal | 1834 } // namespace internal |
1835 } // namespace v8 | 1835 } // namespace v8 |
OLD | NEW |