Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(582)

Unified Diff: src/x87/code-stubs-x87.h

Issue 579713002: X87: enable the crankshaft compiler for X87 port. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: rebase code Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/code-stubs-x87.h
diff --git a/src/x87/code-stubs-x87.h b/src/x87/code-stubs-x87.h
index 49462bc5c4622a29b5552345ba4ed301517aab3c..18ae09c4de6a0382f72da838ba379a250006ea2c 100644
--- a/src/x87/code-stubs-x87.h
+++ b/src/x87/code-stubs-x87.h
@@ -120,7 +120,8 @@ class RecordWriteStub: public PlatformCodeStub {
Register object,
Register value,
Register address,
- RememberedSetAction remembered_set_action)
+ RememberedSetAction remembered_set_action,
+ SaveFPRegsMode fp_mode)
: PlatformCodeStub(isolate),
regs_(object, // An input reg.
address, // An input reg.
@@ -128,7 +129,8 @@ class RecordWriteStub: public PlatformCodeStub {
minor_key_ = ObjectBits::encode(object.code()) |
ValueBits::encode(value.code()) |
AddressBits::encode(address.code()) |
- RememberedSetActionBits::encode(remembered_set_action);
+ RememberedSetActionBits::encode(remembered_set_action) |
+ SaveFPRegsModeBits::encode(fp_mode);
}
RecordWriteStub(uint32_t key, Isolate* isolate)
@@ -271,12 +273,23 @@ class RecordWriteStub: public PlatformCodeStub {
// saved registers that were not already preserved. The caller saved
// 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) {
+ 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));
+ }
}
- inline void RestoreCallerSaveRegisters(MacroAssembler*masm) {
+ 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);
}
@@ -348,10 +361,15 @@ class RecordWriteStub: public PlatformCodeStub {
return RememberedSetActionBits::decode(minor_key_);
}
+ SaveFPRegsMode save_fp_regs_mode() const {
+ return SaveFPRegsModeBits::decode(minor_key_);
+ }
+
class ObjectBits: public BitField<int, 0, 3> {};
class ValueBits: public BitField<int, 3, 3> {};
class AddressBits: public BitField<int, 6, 3> {};
class RememberedSetActionBits: public BitField<RememberedSetAction, 9, 1> {};
+ class SaveFPRegsModeBits: public BitField<SaveFPRegsMode, 10, 1> {};
RegisterAllocation regs_;
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698