Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 01011ef692713d179024edf9bcccdc91454373b4..4fce133647dd72a11e9d38a53f7a8a37e3385585 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -36,6 +36,14 @@ namespace v8 { |
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 { |
public: |
SafepointGenerator(LCodeGen* codegen, |
@@ -238,7 +246,12 @@ bool LCodeGen::GeneratePrologue() { |
__ str(r0, target); |
// Update the write barrier. This clobbers r3 and r0. |
__ RecordWriteContextSlot( |
- cp, target.offset(), r0, r3, GetLinkRegisterState(), kSaveFPRegs); |
+ cp, |
+ target.offset(), |
+ r0, |
+ r3, |
+ GetLinkRegisterState(), |
+ GetSaveFPRegsMode()); |
} |
} |
Comment(";;; End allocate local context"); |
@@ -3069,7 +3082,7 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
value, |
scratch, |
GetLinkRegisterState(), |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
EMIT_REMEMBERED_SET, |
check_needed); |
} |
@@ -4258,7 +4271,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
scratch, |
temp, |
GetLinkRegisterState(), |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
OMIT_REMEMBERED_SET, |
OMIT_SMI_CHECK); |
} |
@@ -4277,7 +4290,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
value, |
scratch, |
GetLinkRegisterState(), |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
EMIT_REMEMBERED_SET, |
check_needed); |
} |
@@ -4292,7 +4305,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
value, |
object, |
GetLinkRegisterState(), |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
EMIT_REMEMBERED_SET, |
check_needed); |
} |
@@ -4486,7 +4499,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) { |
key, |
value, |
GetLinkRegisterState(), |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
EMIT_REMEMBERED_SET, |
check_needed); |
} |