Saving Hydrogen code stubs in the snapshot requires us to respect the availability of VFP32DREGS.

BUG=

Review URL: https://codereview.chromium.org/13878011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent ddfa5634
...@@ -36,6 +36,14 @@ namespace v8 { ...@@ -36,6 +36,14 @@ namespace v8 {
namespace internal { namespace internal {
static SaveFPRegsMode GetSaveFPRegsMode() {
// We don't need to save floating point regs when generating the snapshot
return CpuFeatures::IsSafeForSnapshot(VFP32DREGS)
? kSaveFPRegs
: kDontSaveFPRegs;
}
class SafepointGenerator : public CallWrapper { class SafepointGenerator : public CallWrapper {
public: public:
SafepointGenerator(LCodeGen* codegen, SafepointGenerator(LCodeGen* codegen,
...@@ -238,7 +246,12 @@ bool LCodeGen::GeneratePrologue() { ...@@ -238,7 +246,12 @@ bool LCodeGen::GeneratePrologue() {
__ str(r0, target); __ str(r0, target);
// Update the write barrier. This clobbers r3 and r0. // Update the write barrier. This clobbers r3 and r0.
__ RecordWriteContextSlot( __ RecordWriteContextSlot(
cp, target.offset(), r0, r3, GetLinkRegisterState(), kSaveFPRegs); cp,
target.offset(),
r0,
r3,
GetLinkRegisterState(),
GetSaveFPRegsMode());
} }
} }
Comment(";;; End allocate local context"); Comment(";;; End allocate local context");
...@@ -3067,7 +3080,7 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { ...@@ -3067,7 +3080,7 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
value, value,
scratch, scratch,
GetLinkRegisterState(), GetLinkRegisterState(),
kSaveFPRegs, GetSaveFPRegsMode(),
EMIT_REMEMBERED_SET, EMIT_REMEMBERED_SET,
check_needed); check_needed);
} }
...@@ -4256,7 +4269,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -4256,7 +4269,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
scratch, scratch,
temp, temp,
GetLinkRegisterState(), GetLinkRegisterState(),
kSaveFPRegs, GetSaveFPRegsMode(),
OMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET,
OMIT_SMI_CHECK); OMIT_SMI_CHECK);
} }
...@@ -4275,7 +4288,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -4275,7 +4288,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
value, value,
scratch, scratch,
GetLinkRegisterState(), GetLinkRegisterState(),
kSaveFPRegs, GetSaveFPRegsMode(),
EMIT_REMEMBERED_SET, EMIT_REMEMBERED_SET,
check_needed); check_needed);
} }
...@@ -4290,7 +4303,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { ...@@ -4290,7 +4303,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
value, value,
object, object,
GetLinkRegisterState(), GetLinkRegisterState(),
kSaveFPRegs, GetSaveFPRegsMode(),
EMIT_REMEMBERED_SET, EMIT_REMEMBERED_SET,
check_needed); check_needed);
} }
...@@ -4484,7 +4497,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) { ...@@ -4484,7 +4497,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) {
key, key,
value, value,
GetLinkRegisterState(), GetLinkRegisterState(),
kSaveFPRegs, GetSaveFPRegsMode(),
EMIT_REMEMBERED_SET, EMIT_REMEMBERED_SET,
check_needed); check_needed);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment