| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 // For the rest, there are gaps on the stack, so the offsets remain the same. | 818 // For the rest, there are gaps on the stack, so the offsets remain the same. |
| 819 const int kNumberOfRegisters = Register::kNumRegisters; | 819 const int kNumberOfRegisters = Register::kNumRegisters; |
| 820 | 820 |
| 821 RegList restored_regs = kJSCallerSaved | kCalleeSaved; | 821 RegList restored_regs = kJSCallerSaved | kCalleeSaved; |
| 822 RegList saved_regs = restored_regs | sp.bit() | ra.bit(); | 822 RegList saved_regs = restored_regs | sp.bit() | ra.bit(); |
| 823 | 823 |
| 824 const int kDoubleRegsSize = | 824 const int kDoubleRegsSize = |
| 825 kDoubleSize * FPURegister::kMaxNumAllocatableRegisters; | 825 kDoubleSize * FPURegister::kMaxNumAllocatableRegisters; |
| 826 | 826 |
| 827 if (CpuFeatures::IsSupported(FPU)) { | 827 if (CpuFeatures::IsSupported(FPU)) { |
| 828 CpuFeatures::Scope scope(FPU); | 828 CpuFeatureScope scope(masm(), FPU); |
| 829 // Save all FPU registers before messing with them. | 829 // Save all FPU registers before messing with them. |
| 830 __ Subu(sp, sp, Operand(kDoubleRegsSize)); | 830 __ Subu(sp, sp, Operand(kDoubleRegsSize)); |
| 831 for (int i = 0; i < FPURegister::kMaxNumAllocatableRegisters; ++i) { | 831 for (int i = 0; i < FPURegister::kMaxNumAllocatableRegisters; ++i) { |
| 832 FPURegister fpu_reg = FPURegister::FromAllocationIndex(i); | 832 FPURegister fpu_reg = FPURegister::FromAllocationIndex(i); |
| 833 int offset = i * kDoubleSize; | 833 int offset = i * kDoubleSize; |
| 834 __ sdc1(fpu_reg, MemOperand(sp, offset)); | 834 __ sdc1(fpu_reg, MemOperand(sp, offset)); |
| 835 } | 835 } |
| 836 } else { | 836 } else { |
| 837 __ Subu(sp, sp, Operand(kDoubleRegsSize)); | 837 __ Subu(sp, sp, Operand(kDoubleRegsSize)); |
| 838 } | 838 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 __ lw(a2, MemOperand(sp, i * kPointerSize)); | 901 __ lw(a2, MemOperand(sp, i * kPointerSize)); |
| 902 __ sw(a2, MemOperand(a1, offset)); | 902 __ sw(a2, MemOperand(a1, offset)); |
| 903 } else if (FLAG_debug_code) { | 903 } else if (FLAG_debug_code) { |
| 904 __ li(a2, kDebugZapValue); | 904 __ li(a2, kDebugZapValue); |
| 905 __ sw(a2, MemOperand(a1, offset)); | 905 __ sw(a2, MemOperand(a1, offset)); |
| 906 } | 906 } |
| 907 } | 907 } |
| 908 | 908 |
| 909 int double_regs_offset = FrameDescription::double_registers_offset(); | 909 int double_regs_offset = FrameDescription::double_registers_offset(); |
| 910 if (CpuFeatures::IsSupported(FPU)) { | 910 if (CpuFeatures::IsSupported(FPU)) { |
| 911 CpuFeatures::Scope scope(FPU); | 911 CpuFeatureScope scope(masm(), FPU); |
| 912 // Copy FPU registers to | 912 // Copy FPU registers to |
| 913 // double_registers_[DoubleRegister::kNumAllocatableRegisters] | 913 // double_registers_[DoubleRegister::kNumAllocatableRegisters] |
| 914 for (int i = 0; i < FPURegister::NumAllocatableRegisters(); ++i) { | 914 for (int i = 0; i < FPURegister::NumAllocatableRegisters(); ++i) { |
| 915 int dst_offset = i * kDoubleSize + double_regs_offset; | 915 int dst_offset = i * kDoubleSize + double_regs_offset; |
| 916 int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize; | 916 int src_offset = i * kDoubleSize + kNumberOfRegisters * kPointerSize; |
| 917 __ ldc1(f0, MemOperand(sp, src_offset)); | 917 __ ldc1(f0, MemOperand(sp, src_offset)); |
| 918 __ sdc1(f0, MemOperand(a1, dst_offset)); | 918 __ sdc1(f0, MemOperand(a1, dst_offset)); |
| 919 } | 919 } |
| 920 } | 920 } |
| 921 | 921 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 __ lw(t3, MemOperand(t2, FrameDescription::frame_content_offset())); | 979 __ lw(t3, MemOperand(t2, FrameDescription::frame_content_offset())); |
| 980 __ push(t3); | 980 __ push(t3); |
| 981 __ bind(&inner_loop_header); | 981 __ bind(&inner_loop_header); |
| 982 __ Branch(&inner_push_loop, ne, a3, Operand(zero_reg)); | 982 __ Branch(&inner_push_loop, ne, a3, Operand(zero_reg)); |
| 983 | 983 |
| 984 __ Addu(t0, t0, Operand(kPointerSize)); | 984 __ Addu(t0, t0, Operand(kPointerSize)); |
| 985 __ bind(&outer_loop_header); | 985 __ bind(&outer_loop_header); |
| 986 __ Branch(&outer_push_loop, lt, t0, Operand(a1)); | 986 __ Branch(&outer_push_loop, lt, t0, Operand(a1)); |
| 987 | 987 |
| 988 if (CpuFeatures::IsSupported(FPU)) { | 988 if (CpuFeatures::IsSupported(FPU)) { |
| 989 CpuFeatures::Scope scope(FPU); | 989 CpuFeatureScope scope(masm(), FPU); |
| 990 | 990 |
| 991 __ lw(a1, MemOperand(a0, Deoptimizer::input_offset())); | 991 __ lw(a1, MemOperand(a0, Deoptimizer::input_offset())); |
| 992 for (int i = 0; i < FPURegister::kMaxNumAllocatableRegisters; ++i) { | 992 for (int i = 0; i < FPURegister::kMaxNumAllocatableRegisters; ++i) { |
| 993 const FPURegister fpu_reg = FPURegister::FromAllocationIndex(i); | 993 const FPURegister fpu_reg = FPURegister::FromAllocationIndex(i); |
| 994 int src_offset = i * kDoubleSize + double_regs_offset; | 994 int src_offset = i * kDoubleSize + double_regs_offset; |
| 995 __ ldc1(fpu_reg, MemOperand(a1, src_offset)); | 995 __ ldc1(fpu_reg, MemOperand(a1, src_offset)); |
| 996 } | 996 } |
| 997 } | 997 } |
| 998 | 998 |
| 999 // Push state, pc, and continuation from the last output frame. | 999 // Push state, pc, and continuation from the last output frame. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 } | 1068 } |
| 1069 | 1069 |
| 1070 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), | 1070 ASSERT_EQ(masm()->SizeOfCodeGeneratedSince(&table_start), |
| 1071 count() * table_entry_size_); | 1071 count() * table_entry_size_); |
| 1072 } | 1072 } |
| 1073 | 1073 |
| 1074 #undef __ | 1074 #undef __ |
| 1075 | 1075 |
| 1076 | 1076 |
| 1077 } } // namespace v8::internal | 1077 } } // namespace v8::internal |
| OLD | NEW |