Index: src/x87/stub-cache-x87.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/x87/stub-cache-x87.cc |
similarity index 98% |
copy from src/ia32/stub-cache-ia32.cc |
copy to src/x87/stub-cache-x87.cc |
index 3f3fd0dcb32960f8f38072db35ed3b9297d3cc99..a954545aafe57c5b4f2ddab34ea2a53a14eee7d5 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/x87/stub-cache-x87.cc |
@@ -4,7 +4,7 @@ |
#include "v8.h" |
-#if V8_TARGET_ARCH_IA32 |
+#if V8_TARGET_ARCH_X87 |
#include "ic-inl.h" |
#include "codegen.h" |
@@ -527,17 +527,19 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, |
__ JumpIfNotSmi(value_reg, &heap_number); |
__ SmiUntag(value_reg); |
- __ Cvtsi2sd(xmm0, value_reg); |
+ __ push(value_reg); |
+ __ fild_s(Operand(esp, 0)); |
+ __ pop(value_reg); |
__ SmiTag(value_reg); |
__ jmp(&do_store); |
__ bind(&heap_number); |
__ CheckMap(value_reg, masm->isolate()->factory()->heap_number_map(), |
miss_label, DONT_DO_SMI_CHECK); |
- __ movsd(xmm0, FieldOperand(value_reg, HeapNumber::kValueOffset)); |
+ __ fld_d(FieldOperand(value_reg, HeapNumber::kValueOffset)); |
__ bind(&do_store); |
- __ movsd(FieldOperand(storage_reg, HeapNumber::kValueOffset), xmm0); |
+ __ fstp_d(FieldOperand(storage_reg, HeapNumber::kValueOffset)); |
} |
// Stub never generated for non-global objects that require access |
@@ -571,7 +573,6 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, |
HeapObject::kMapOffset, |
scratch1, |
scratch2, |
- kDontSaveFPRegs, |
OMIT_REMEMBERED_SET, |
OMIT_SMI_CHECK); |
@@ -610,7 +611,6 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, |
offset, |
storage_reg, |
scratch1, |
- kDontSaveFPRegs, |
EMIT_REMEMBERED_SET, |
smi_check); |
} |
@@ -634,7 +634,6 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, |
offset, |
storage_reg, |
receiver_reg, |
- kDontSaveFPRegs, |
EMIT_REMEMBERED_SET, |
smi_check); |
} |
@@ -704,15 +703,17 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm, |
Label do_store, heap_number; |
__ JumpIfNotSmi(value_reg, &heap_number); |
__ SmiUntag(value_reg); |
- __ Cvtsi2sd(xmm0, value_reg); |
+ __ push(value_reg); |
+ __ fild_s(Operand(esp, 0)); |
+ __ pop(value_reg); |
__ SmiTag(value_reg); |
__ jmp(&do_store); |
__ bind(&heap_number); |
__ CheckMap(value_reg, masm->isolate()->factory()->heap_number_map(), |
miss_label, DONT_DO_SMI_CHECK); |
- __ movsd(xmm0, FieldOperand(value_reg, HeapNumber::kValueOffset)); |
+ __ fld_d(FieldOperand(value_reg, HeapNumber::kValueOffset)); |
__ bind(&do_store); |
- __ movsd(FieldOperand(scratch1, HeapNumber::kValueOffset), xmm0); |
+ __ fstp_d(FieldOperand(scratch1, HeapNumber::kValueOffset)); |
// Return the value (register eax). |
ASSERT(value_reg.is(eax)); |
__ ret(0); |
@@ -736,7 +737,6 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm, |
offset, |
name_reg, |
scratch1, |
- kDontSaveFPRegs, |
EMIT_REMEMBERED_SET, |
smi_check); |
} |
@@ -755,7 +755,6 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm, |
offset, |
name_reg, |
receiver_reg, |
- kDontSaveFPRegs, |
EMIT_REMEMBERED_SET, |
smi_check); |
} |
@@ -1506,4 +1505,4 @@ void KeyedLoadStubCompiler::GenerateLoadDictionaryElement( |
} } // namespace v8::internal |
-#endif // V8_TARGET_ARCH_IA32 |
+#endif // V8_TARGET_ARCH_X87 |