| 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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; | 613 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; |
| 614 ldm(ia_w, sp, kSafepointSavedRegisters); | 614 ldm(ia_w, sp, kSafepointSavedRegisters); |
| 615 add(sp, sp, Operand(num_unsaved * kPointerSize)); | 615 add(sp, sp, Operand(num_unsaved * kPointerSize)); |
| 616 } | 616 } |
| 617 | 617 |
| 618 | 618 |
| 619 void MacroAssembler::PushSafepointRegistersAndDoubles() { | 619 void MacroAssembler::PushSafepointRegistersAndDoubles() { |
| 620 // Number of d-regs not known at snapshot time. | 620 // Number of d-regs not known at snapshot time. |
| 621 ASSERT(!Serializer::enabled()); | 621 ASSERT(!Serializer::enabled()); |
| 622 PushSafepointRegisters(); | 622 PushSafepointRegisters(); |
| 623 sub(sp, sp, Operand(DwVfpRegister::NumAllocatableRegisters() * | 623 // Only save allocatable registers. |
| 624 kDoubleSize)); | 624 ASSERT(kScratchDoubleReg.is(d15) && kDoubleRegZero.is(d14)); |
| 625 for (int i = 0; i < DwVfpRegister::NumAllocatableRegisters(); i++) { | 625 ASSERT(DwVfpRegister::NumReservedRegisters() == 2); |
| 626 vstr(DwVfpRegister::FromAllocationIndex(i), sp, i * kDoubleSize); | 626 if (CpuFeatures::IsSupported(VFP32DREGS)) { |
| 627 vstm(db_w, sp, d16, d31); |
| 627 } | 628 } |
| 629 vstm(db_w, sp, d0, d13); |
| 628 } | 630 } |
| 629 | 631 |
| 630 | 632 |
| 631 void MacroAssembler::PopSafepointRegistersAndDoubles() { | 633 void MacroAssembler::PopSafepointRegistersAndDoubles() { |
| 632 // Number of d-regs not known at snapshot time. | 634 // Number of d-regs not known at snapshot time. |
| 633 ASSERT(!Serializer::enabled()); | 635 ASSERT(!Serializer::enabled()); |
| 634 for (int i = 0; i < DwVfpRegister::NumAllocatableRegisters(); i++) { | 636 // Only save allocatable registers. |
| 635 vldr(DwVfpRegister::FromAllocationIndex(i), sp, i * kDoubleSize); | 637 ASSERT(kScratchDoubleReg.is(d15) && kDoubleRegZero.is(d14)); |
| 638 ASSERT(DwVfpRegister::NumReservedRegisters() == 2); |
| 639 vldm(ia_w, sp, d0, d13); |
| 640 if (CpuFeatures::IsSupported(VFP32DREGS)) { |
| 641 vldm(ia_w, sp, d16, d31); |
| 636 } | 642 } |
| 637 add(sp, sp, Operand(DwVfpRegister::NumAllocatableRegisters() * | |
| 638 kDoubleSize)); | |
| 639 PopSafepointRegisters(); | 643 PopSafepointRegisters(); |
| 640 } | 644 } |
| 641 | 645 |
| 642 void MacroAssembler::StoreToSafepointRegistersAndDoublesSlot(Register src, | 646 void MacroAssembler::StoreToSafepointRegistersAndDoublesSlot(Register src, |
| 643 Register dst) { | 647 Register dst) { |
| 644 str(src, SafepointRegistersAndDoublesSlot(dst)); | 648 str(src, SafepointRegistersAndDoublesSlot(dst)); |
| 645 } | 649 } |
| 646 | 650 |
| 647 | 651 |
| 648 void MacroAssembler::StoreToSafepointRegisterSlot(Register src, Register dst) { | 652 void MacroAssembler::StoreToSafepointRegisterSlot(Register src, Register dst) { |
| (...skipping 3313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3962 void CodePatcher::EmitCondition(Condition cond) { | 3966 void CodePatcher::EmitCondition(Condition cond) { |
| 3963 Instr instr = Assembler::instr_at(masm_.pc_); | 3967 Instr instr = Assembler::instr_at(masm_.pc_); |
| 3964 instr = (instr & ~kCondMask) | cond; | 3968 instr = (instr & ~kCondMask) | cond; |
| 3965 masm_.emit(instr); | 3969 masm_.emit(instr); |
| 3966 } | 3970 } |
| 3967 | 3971 |
| 3968 | 3972 |
| 3969 } } // namespace v8::internal | 3973 } } // namespace v8::internal |
| 3970 | 3974 |
| 3971 #endif // V8_TARGET_ARCH_ARM | 3975 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |