Index: src/mips64/code-stubs-mips64.cc |
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc |
index c447a79a5daa0d1ed6e9581293f6c4cd46bb1342..d0c05ad0ccb0fc713509825e58344d0cd80213ea 100644 |
--- a/src/mips64/code-stubs-mips64.cc |
+++ b/src/mips64/code-stubs-mips64.cc |
@@ -182,8 +182,10 @@ void DoubleToIStub::Generate(MacroAssembler* masm) { |
Register input_high = scratch2; |
Register input_low = scratch3; |
- __ lw(input_low, MemOperand(input_reg, double_offset)); |
- __ lw(input_high, MemOperand(input_reg, double_offset + kIntSize)); |
+ __ lw(input_low, |
+ MemOperand(input_reg, double_offset + Register::kMantissaOffset)); |
+ __ lw(input_high, |
+ MemOperand(input_reg, double_offset + Register::kExponentOffset)); |
Label normal_exponent, restore_sign; |
// Extract the biased exponent in result. |
@@ -3309,7 +3311,7 @@ void ToNumberStub::Generate(MacroAssembler* masm) { |
Label not_string, slow_string; |
__ Branch(¬_string, hs, a1, Operand(FIRST_NONSTRING_TYPE)); |
// Check if string has a cached array index. |
- __ ld(a2, FieldMemOperand(a0, String::kHashFieldOffset)); |
+ __ lwu(a2, FieldMemOperand(a0, String::kHashFieldOffset)); |
__ And(at, a2, Operand(String::kContainsCachedArrayIndexMask)); |
__ Branch(&slow_string, ne, at, Operand(zero_reg)); |
__ IndexFromHash(a2, a0); |
@@ -5602,8 +5604,8 @@ static void CallApiFunctionStubHelper(MacroAssembler* masm, |
// -- |
// -- sp[0] : last argument |
// -- ... |
- // -- sp[(argc - 1)* 4] : first argument |
- // -- sp[argc * 4] : receiver |
+ // -- sp[(argc - 1)* 8] : first argument |
+ // -- sp[argc * 8] : receiver |
// ----------------------------------- |
Register callee = a0; |
@@ -5662,10 +5664,12 @@ static void CallApiFunctionStubHelper(MacroAssembler* masm, |
Operand((FCA::kArgsLength - 1 + argc.immediate()) * kPointerSize)); |
__ sd(at, MemOperand(a0, 1 * kPointerSize)); |
// FunctionCallbackInfo::length_ = argc |
+ // Stored as int field, 32-bit integers within struct on stack always left |
+ // justified by n64 ABI. |
__ li(at, Operand(argc.immediate())); |
- __ sd(at, MemOperand(a0, 2 * kPointerSize)); |
+ __ sw(at, MemOperand(a0, 2 * kPointerSize)); |
// FunctionCallbackInfo::is_construct_call_ = 0 |
- __ sd(zero_reg, MemOperand(a0, 3 * kPointerSize)); |
+ __ sw(zero_reg, MemOperand(a0, 2 * kPointerSize + kIntSize)); |
} else { |
// FunctionCallbackInfo::values_ |
__ dsll(at, argc.reg(), kPointerSizeLog2); |
@@ -5673,11 +5677,13 @@ static void CallApiFunctionStubHelper(MacroAssembler* masm, |
__ Daddu(at, at, Operand((FCA::kArgsLength - 1) * kPointerSize)); |
__ sd(at, MemOperand(a0, 1 * kPointerSize)); |
// FunctionCallbackInfo::length_ = argc |
- __ sd(argc.reg(), MemOperand(a0, 2 * kPointerSize)); |
+ // Stored as int field, 32-bit integers within struct on stack always left |
+ // justified by n64 ABI. |
+ __ sw(argc.reg(), MemOperand(a0, 2 * kPointerSize)); |
// FunctionCallbackInfo::is_construct_call_ |
__ Daddu(argc.reg(), argc.reg(), Operand(FCA::kArgsLength + 1)); |
__ dsll(at, argc.reg(), kPointerSizeLog2); |
- __ sd(at, MemOperand(a0, 3 * kPointerSize)); |
+ __ sw(at, MemOperand(a0, 2 * kPointerSize + kIntSize)); |
} |
ExternalReference thunk_ref = |