| Index: src/x87/code-stubs-x87.h
|
| diff --git a/src/x87/code-stubs-x87.h b/src/x87/code-stubs-x87.h
|
| index a6a2a1305735b33b78ae9da1c95a22ba8dddfe2c..39a4603626f55301fba1c12c0d5c36f2f791f1ca 100644
|
| --- a/src/x87/code-stubs-x87.h
|
| +++ b/src/x87/code-stubs-x87.h
|
| @@ -271,24 +271,12 @@ class RecordWriteStub: public PlatformCodeStub {
|
| // registers are eax, ecx and edx. The three scratch registers (incl. ecx)
|
| // will be restored by other means so we don't bother pushing them here.
|
| void SaveCallerSaveRegisters(MacroAssembler* masm, SaveFPRegsMode mode) {
|
| - if (!scratch0_.is(eax) && !scratch1_.is(eax)) masm->push(eax);
|
| - if (!scratch0_.is(edx) && !scratch1_.is(edx)) masm->push(edx);
|
| - if (mode == kSaveFPRegs) {
|
| - // Save FPU state in m108byte.
|
| - masm->sub(esp, Immediate(108));
|
| - masm->fnsave(Operand(esp, 0));
|
| - }
|
| + masm->PushCallerSaved(mode, ecx, scratch0_, scratch1_);
|
| }
|
|
|
| inline void RestoreCallerSaveRegisters(MacroAssembler* masm,
|
| SaveFPRegsMode mode) {
|
| - if (mode == kSaveFPRegs) {
|
| - // Restore FPU state in m108byte.
|
| - masm->frstor(Operand(esp, 0));
|
| - masm->add(esp, Immediate(108));
|
| - }
|
| - if (!scratch0_.is(edx) && !scratch1_.is(edx)) masm->pop(edx);
|
| - if (!scratch0_.is(eax) && !scratch1_.is(eax)) masm->pop(eax);
|
| + masm->PopCallerSaved(mode, ecx, scratch0_, scratch1_);
|
| }
|
|
|
| inline Register object() { return object_; }
|
|
|