Commit da7f6a68 authored by olivf@chromium.org's avatar olivf@chromium.org

Fix number tag for no-sse2.

FCmp() pops 2 arguments from the stack...

BUG=
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/18254007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5086db3d
...@@ -5069,6 +5069,7 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) { ...@@ -5069,6 +5069,7 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
XMMRegister input_reg = ToDoubleRegister(instr->value()); XMMRegister input_reg = ToDoubleRegister(instr->value());
__ ucomisd(input_reg, input_reg); __ ucomisd(input_reg, input_reg);
} else { } else {
__ fld(0);
__ fld(0); __ fld(0);
__ FCmp(); __ FCmp();
} }
...@@ -5116,16 +5117,12 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) { ...@@ -5116,16 +5117,12 @@ void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
__ jmp(deferred->entry()); __ jmp(deferred->entry());
} }
__ bind(deferred->exit()); __ bind(deferred->exit());
if (CpuFeatures::IsSupported(SSE2)) { if (use_sse2) {
CpuFeatureScope scope(masm(), SSE2); CpuFeatureScope scope(masm(), SSE2);
XMMRegister input_reg = ToDoubleRegister(instr->value()); XMMRegister input_reg = ToDoubleRegister(instr->value());
__ movdbl(FieldOperand(reg, HeapNumber::kValueOffset), input_reg); __ movdbl(FieldOperand(reg, HeapNumber::kValueOffset), input_reg);
} else { } else {
__ fst_d(FieldOperand(reg, HeapNumber::kValueOffset)); __ fstp_d(FieldOperand(reg, HeapNumber::kValueOffset));
}
if (!use_sse2) {
// clean up the stack
__ fstp(0);
} }
__ bind(&done); __ bind(&done);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment