Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 6fa1c4243f4ca71a950a65e26f418618386cb58e..7ce2f2d1256a86c9bcde861f3c0305338b51a27a 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -40,6 +40,12 @@ namespace v8 { |
namespace internal { |
+static SaveFPRegsMode GetSaveFPRegsMode() { |
+ // We don't need to save floating point regs when generating the snapshot |
+ return CpuFeatures::IsSafeForSnapshot(SSE2) ? kSaveFPRegs : kDontSaveFPRegs; |
+} |
+ |
+ |
// When invoking builtins, we need to record the safepoint in the middle of |
// the invoke instruction sequence generated by the macro assembler. |
class SafepointGenerator : public CallWrapper { |
@@ -2847,7 +2853,7 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
offset, |
value, |
temp, |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
EMIT_REMEMBERED_SET, |
check_needed); |
} |
@@ -4179,7 +4185,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
HeapObject::kMapOffset, |
temp_map, |
temp, |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
OMIT_REMEMBERED_SET, |
OMIT_SMI_CHECK); |
} |
@@ -4198,7 +4204,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
offset, |
value, |
temp, |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
EMIT_REMEMBERED_SET, |
check_needed); |
} |
@@ -4213,7 +4219,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { |
offset, |
value, |
object, |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
EMIT_REMEMBERED_SET, |
check_needed); |
} |
@@ -4360,7 +4366,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) { |
__ RecordWrite(elements, |
key, |
value, |
- kSaveFPRegs, |
+ GetSaveFPRegsMode(), |
EMIT_REMEMBERED_SET, |
check_needed); |
} |