From: jkummerow@chromium.org Date: Wed, 26 Jun 2013 12:03:22 +0000 (+0000) Subject: ia32: Restore missing temp register for LNumberTagU X-Git-Tag: upstream/4.7.83~13676 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3634b61d21b5c7889c155f0eb306dc3a830ed956;p=platform%2Fupstream%2Fv8.git ia32: Restore missing temp register for LNumberTagU BUG=v8:2692 R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/17865002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index c388fe7..963894b 100644 --- a/src/ia32/lithium-codegen-ia32.cc +++ b/src/ia32/lithium-codegen-ia32.cc @@ -4853,7 +4853,8 @@ void LCodeGen::DoDeferredNumberTagI(LInstruction* instr, } else { if (CpuFeatures::IsSupported(SSE2)) { CpuFeatureScope feature_scope(masm(), SSE2); - __ LoadUint32(xmm0, reg, xmm1); + __ LoadUint32(xmm0, reg, + ToDoubleRegister(LNumberTagU::cast(instr)->temp())); } else { // There's no fild variant for unsigned values, so zero-extend to a 64-bit // int manually. diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc index 0a786e5..bf98242 100644 --- a/src/ia32/lithium-ia32.cc +++ b/src/ia32/lithium-ia32.cc @@ -2006,7 +2006,9 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) { if (val->HasRange() && val->range()->IsInSmiRange()) { return DefineSameAsFirst(new(zone()) LSmiTag(value)); } else if (val->CheckFlag(HInstruction::kUint32)) { - LNumberTagU* result = new(zone()) LNumberTagU(value); + LOperand* temp = CpuFeatures::IsSupported(SSE2) ? FixedTemp(xmm1) + : NULL; + LNumberTagU* result = new(zone()) LNumberTagU(value, temp); return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); } else { LNumberTagI* result = new(zone()) LNumberTagI(value); diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h index 2c71b63..212a496 100644 --- a/src/ia32/lithium-ia32.h +++ b/src/ia32/lithium-ia32.h @@ -2068,13 +2068,15 @@ class LNumberTagI: public LTemplateInstruction<1, 1, 0> { }; -class LNumberTagU: public LTemplateInstruction<1, 1, 0> { +class LNumberTagU: public LTemplateInstruction<1, 1, 1> { public: - explicit LNumberTagU(LOperand* value) { + LNumberTagU(LOperand* value, LOperand* temp) { inputs_[0] = value; + temps_[0] = temp; } LOperand* value() { return inputs_[0]; } + LOperand* temp() { return temps_[0]; } DECLARE_CONCRETE_INSTRUCTION(NumberTagU, "number-tag-u") };