Commit 4a2a4b86 authored by danno@chromium.org's avatar danno@chromium.org

MIPS: Fix ARM bug introduced in r12604 that caused crashes on ARM on crypto-md5 from SunSpider.

Port r12623 (22002351)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10979066
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 1fe673a6
...@@ -7767,7 +7767,9 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) { ...@@ -7767,7 +7767,9 @@ void StoreArrayLiteralElementStub::Generate(MacroAssembler* masm) {
// Array literal has ElementsKind of FAST_*_DOUBLE_ELEMENTS. // Array literal has ElementsKind of FAST_*_DOUBLE_ELEMENTS.
__ bind(&double_elements); __ bind(&double_elements);
__ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset)); __ lw(t1, FieldMemOperand(a1, JSObject::kElementsOffset));
__ StoreNumberToDoubleElements(a0, a3, a1, t1, t2, t3, t5, a2, __ StoreNumberToDoubleElements(a0, a3, a1,
// Overwrites all regs after this.
t1, t2, t3, t5, a2,
&slow_elements); &slow_elements);
__ Ret(USE_DELAY_SLOT); __ Ret(USE_DELAY_SLOT);
__ mov(v0, a0); __ mov(v0, a0);
......
...@@ -1269,8 +1269,8 @@ static void KeyedStoreGenerateGenericHelper( ...@@ -1269,8 +1269,8 @@ static void KeyedStoreGenerateGenericHelper(
__ StoreNumberToDoubleElements(value, __ StoreNumberToDoubleElements(value,
key, key,
receiver, receiver,
elements, elements, // Overwritten.
a3, a3, // Scratch regs...
t0, t0,
t1, t1,
t2, t2,
......
...@@ -3445,7 +3445,7 @@ void MacroAssembler::StoreNumberToDoubleElements(Register value_reg, ...@@ -3445,7 +3445,7 @@ void MacroAssembler::StoreNumberToDoubleElements(Register value_reg,
destination = FloatingPointHelper::kCoreRegisters; destination = FloatingPointHelper::kCoreRegisters;
} }
Register untagged_value = receiver_reg; Register untagged_value = elements_reg;
SmiUntag(untagged_value, value_reg); SmiUntag(untagged_value, value_reg);
FloatingPointHelper::ConvertIntToDouble(this, FloatingPointHelper::ConvertIntToDouble(this,
untagged_value, untagged_value,
......
...@@ -973,6 +973,7 @@ class MacroAssembler: public Assembler { ...@@ -973,6 +973,7 @@ class MacroAssembler: public Assembler {
void StoreNumberToDoubleElements(Register value_reg, void StoreNumberToDoubleElements(Register value_reg,
Register key_reg, Register key_reg,
Register receiver_reg, Register receiver_reg,
// All regs below here overwritten.
Register elements_reg, Register elements_reg,
Register scratch1, Register scratch1,
Register scratch2, Register scratch2,
......
...@@ -4748,6 +4748,7 @@ void KeyedStoreStubCompiler::GenerateStoreFastDoubleElement( ...@@ -4748,6 +4748,7 @@ void KeyedStoreStubCompiler::GenerateStoreFastDoubleElement(
__ StoreNumberToDoubleElements(value_reg, __ StoreNumberToDoubleElements(value_reg,
key_reg, key_reg,
receiver_reg, receiver_reg,
// All registers after this are overwritten.
elements_reg, elements_reg,
scratch1, scratch1,
scratch2, scratch2,
......
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