Index: src/arm/code-stubs-arm.h |
diff --git a/src/arm/code-stubs-arm.h b/src/arm/code-stubs-arm.h |
index 75cbf6582c6bd19c8de1b0090a86c7d7fe557539..794fb936b7d5c797ba10d5551e0bb66b055c6068 100644 |
--- a/src/arm/code-stubs-arm.h |
+++ b/src/arm/code-stubs-arm.h |
@@ -469,34 +469,14 @@ class RecordWriteStub: public PlatformCodeStub { |
void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) { |
masm->stm(db_w, sp, (kCallerSaved | lr.bit()) & ~scratch1_.bit()); |
if (mode == kSaveFPRegs) { |
- // Number of d-regs not known at snapshot time. |
- ASSERT(!Serializer::enabled()); |
- masm->sub(sp, |
- sp, |
- Operand(kDoubleSize * (DwVfpRegister::NumRegisters() - 1))); |
- // Save all VFP registers except d0. |
- // TODO(hans): We should probably save d0 too. And maybe use vstm. |
- for (int i = DwVfpRegister::NumRegisters() - 1; i > 0; i--) { |
- DwVfpRegister reg = DwVfpRegister::from_code(i); |
- masm->vstr(reg, MemOperand(sp, (i - 1) * kDoubleSize)); |
- } |
+ masm->SaveFPRegs(sp, scratch0_); |
} |
} |
inline void RestoreCallerSaveRegisters(MacroAssembler*masm, |
SaveFPRegsMode mode) { |
if (mode == kSaveFPRegs) { |
- // Number of d-regs not known at snapshot time. |
- ASSERT(!Serializer::enabled()); |
- // Restore all VFP registers except d0. |
- // TODO(hans): We should probably restore d0 too. And maybe use vldm. |
- for (int i = DwVfpRegister::NumRegisters() - 1; i > 0; i--) { |
- DwVfpRegister reg = DwVfpRegister::from_code(i); |
- masm->vldr(reg, MemOperand(sp, (i - 1) * kDoubleSize)); |
- } |
- masm->add(sp, |
- sp, |
- Operand(kDoubleSize * (DwVfpRegister::NumRegisters() - 1))); |
+ masm->RestoreFPRegs(sp, scratch0_); |
} |
masm->ldm(ia_w, sp, (kCallerSaved | lr.bit()) & ~scratch1_.bit()); |
} |