Index: src/ic/x87/handler-compiler-x87.cc |
diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/x87/handler-compiler-x87.cc |
similarity index 95% |
copy from src/ic/ia32/handler-compiler-ia32.cc |
copy to src/ic/x87/handler-compiler-x87.cc |
index 48b8adc52d26c407e19b72a511fd609c7d78a310..ea324cce16310f263565556ca4dfe78d50e02601 100644 |
--- a/src/ic/ia32/handler-compiler-ia32.cc |
+++ b/src/ic/x87/handler-compiler-x87.cc |
@@ -1,10 +1,10 @@ |
-// Copyright 2014 the V8 project authors. All rights reserved. |
+// Copyright 2012 the V8 project authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
#include "src/v8.h" |
-#if V8_TARGET_ARCH_IA32 |
+#if V8_TARGET_ARCH_X87 |
#include "src/ic/call-optimization.h" |
#include "src/ic/handler-compiler.h" |
@@ -326,41 +326,6 @@ static void CompileCallLoadPropertyWithInterceptor( |
} |
-static void StoreIC_PushArgs(MacroAssembler* masm) { |
- Register receiver = StoreIC::ReceiverRegister(); |
- Register name = StoreIC::NameRegister(); |
- Register value = StoreIC::ValueRegister(); |
- |
- DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value)); |
- |
- __ pop(ebx); |
- __ push(receiver); |
- __ push(name); |
- __ push(value); |
- __ push(ebx); |
-} |
- |
- |
-void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { |
- // Return address is on the stack. |
- StoreIC_PushArgs(masm); |
- |
- // Do tail-call to runtime routine. |
- ExternalReference ref(IC_Utility(IC::kStoreIC_Slow), masm->isolate()); |
- __ TailCallExternalReference(ref, 3, 1); |
-} |
- |
- |
-void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { |
- // Return address is on the stack. |
- StoreIC_PushArgs(masm); |
- |
- // Do tail-call to runtime routine. |
- ExternalReference ref(IC_Utility(IC::kKeyedStoreIC_Slow), masm->isolate()); |
- __ TailCallExternalReference(ref, 3, 1); |
-} |
- |
- |
#undef __ |
#define __ ACCESS_MASM(masm()) |
@@ -415,17 +380,19 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
__ 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, 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 objects that require access checks. |
@@ -454,7 +421,7 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
// Update the write barrier for the map field. |
__ RecordWriteField(receiver_reg, HeapObject::kMapOffset, scratch1, scratch2, |
- kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
+ OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
if (details.type() == CONSTANT) { |
DCHECK(value_reg.is(eax)); |
@@ -488,7 +455,7 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
__ mov(storage_reg, value_reg); |
} |
__ RecordWriteField(receiver_reg, offset, storage_reg, scratch1, |
- kDontSaveFPRegs, EMIT_REMEMBERED_SET, smi_check); |
+ EMIT_REMEMBERED_SET, smi_check); |
} |
} else { |
// Write to the properties array. |
@@ -507,7 +474,7 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
__ mov(storage_reg, value_reg); |
} |
__ RecordWriteField(scratch1, offset, storage_reg, receiver_reg, |
- kDontSaveFPRegs, EMIT_REMEMBERED_SET, smi_check); |
+ EMIT_REMEMBERED_SET, smi_check); |
} |
} |
@@ -894,4 +861,4 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( |
} |
} // namespace v8::internal |
-#endif // V8_TARGET_ARCH_IA32 |
+#endif // V8_TARGET_ARCH_X87 |