summaryrefslogtreecommitdiff
path: root/deps/v8/src/x87/code-stubs-x87.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/x87/code-stubs-x87.h')
-rw-r--r--deps/v8/src/x87/code-stubs-x87.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/deps/v8/src/x87/code-stubs-x87.h b/deps/v8/src/x87/code-stubs-x87.h
index a6a2a13057..39a4603626 100644
--- a/deps/v8/src/x87/code-stubs-x87.h
+++ b/deps/v8/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_; }