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

Unified Diff: src/ia32/lithium-codegen-ia32.cc

Issue 12391033: Make sure that on x86 we don't generate SSE2 code in the snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New method CpuFeatures::IsSafeForSnapshot(). Created 7 years, 9 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/ia32/code-stubs-ia32.cc ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698