| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 // store the registers in any particular way, but we do have to store and | 892 // store the registers in any particular way, but we do have to store and |
| 893 // restore them. | 893 // restore them. |
| 894 for (int i = 0; i < kNumberOfSavedRegs; i++) { | 894 for (int i = 0; i < kNumberOfSavedRegs; i++) { |
| 895 Register reg = saved_regs[i]; | 895 Register reg = saved_regs[i]; |
| 896 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { | 896 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { |
| 897 push(reg); | 897 push(reg); |
| 898 } | 898 } |
| 899 } | 899 } |
| 900 // R12 to r15 are callee save on all platforms. | 900 // R12 to r15 are callee save on all platforms. |
| 901 if (fp_mode == kSaveFPRegs) { | 901 if (fp_mode == kSaveFPRegs) { |
| 902 CpuFeatureScope scope(this, SSE2); | |
| 903 subq(rsp, Immediate(kDoubleSize * XMMRegister::kMaxNumRegisters)); | 902 subq(rsp, Immediate(kDoubleSize * XMMRegister::kMaxNumRegisters)); |
| 904 for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) { | 903 for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) { |
| 905 XMMRegister reg = XMMRegister::from_code(i); | 904 XMMRegister reg = XMMRegister::from_code(i); |
| 906 movsd(Operand(rsp, i * kDoubleSize), reg); | 905 movsd(Operand(rsp, i * kDoubleSize), reg); |
| 907 } | 906 } |
| 908 } | 907 } |
| 909 } | 908 } |
| 910 | 909 |
| 911 | 910 |
| 912 void MacroAssembler::PopCallerSaved(SaveFPRegsMode fp_mode, | 911 void MacroAssembler::PopCallerSaved(SaveFPRegsMode fp_mode, |
| 913 Register exclusion1, | 912 Register exclusion1, |
| 914 Register exclusion2, | 913 Register exclusion2, |
| 915 Register exclusion3) { | 914 Register exclusion3) { |
| 916 if (fp_mode == kSaveFPRegs) { | 915 if (fp_mode == kSaveFPRegs) { |
| 917 CpuFeatureScope scope(this, SSE2); | |
| 918 for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) { | 916 for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) { |
| 919 XMMRegister reg = XMMRegister::from_code(i); | 917 XMMRegister reg = XMMRegister::from_code(i); |
| 920 movsd(reg, Operand(rsp, i * kDoubleSize)); | 918 movsd(reg, Operand(rsp, i * kDoubleSize)); |
| 921 } | 919 } |
| 922 addq(rsp, Immediate(kDoubleSize * XMMRegister::kMaxNumRegisters)); | 920 addq(rsp, Immediate(kDoubleSize * XMMRegister::kMaxNumRegisters)); |
| 923 } | 921 } |
| 924 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { | 922 for (int i = kNumberOfSavedRegs - 1; i >= 0; i--) { |
| 925 Register reg = saved_regs[i]; | 923 Register reg = saved_regs[i]; |
| 926 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { | 924 if (!reg.is(exclusion1) && !reg.is(exclusion2) && !reg.is(exclusion3)) { |
| 927 pop(reg); | 925 pop(reg); |
| (...skipping 3705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4633 j(greater, &no_info_available); | 4631 j(greater, &no_info_available); |
| 4634 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), | 4632 CompareRoot(MemOperand(scratch_reg, -AllocationSiteInfo::kSize), |
| 4635 Heap::kAllocationSiteInfoMapRootIndex); | 4633 Heap::kAllocationSiteInfoMapRootIndex); |
| 4636 bind(&no_info_available); | 4634 bind(&no_info_available); |
| 4637 } | 4635 } |
| 4638 | 4636 |
| 4639 | 4637 |
| 4640 } } // namespace v8::internal | 4638 } } // namespace v8::internal |
| 4641 | 4639 |
| 4642 #endif // V8_TARGET_ARCH_X64 | 4640 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |