Bug 1170859- MIPS64: Fix copy u32 type arg to argument register. r=froydnj
authorHeiher <r@hev.cc>
Tue, 02 Jun 2015 18:49:00 -0400
changeset 246961 42417785fae03fd72cc7501aabcb4f356dd590fe
parent 246960 21b703601d17ab2a796bb3d676e9fee0cab268b8
child 246962 1a41e3cf04b32b71086d377031e6e4065e30247e
push id60582
push userryanvm@gmail.com
push dateWed, 03 Jun 2015 15:16:58 +0000
treeherdermozilla-inbound@1a41e3cf04b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1170859
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1170859- MIPS64: Fix copy u32 type arg to argument register. r=froydnj
xpcom/reflect/xptcall/md/unix/xptcinvoke_mips64.cpp
--- a/xpcom/reflect/xptcall/md/unix/xptcinvoke_mips64.cpp
+++ b/xpcom/reflect/xptcall/md/unix/xptcinvoke_mips64.cpp
@@ -72,17 +72,19 @@ invoke_copy_to_stack(uint64_t* d, uint32
         case nsXPTType::T_U16:
             if (i < N_ARG_REGS)
                 regs[i] = s->val.u16;
             else
                 *d++ = s->val.u16;
             break;
         case nsXPTType::T_U32:
             if (i < N_ARG_REGS)
-                regs[i] = s->val.u32;
+		// 32-bit values need to be sign-extended
+		// in register, so use the signed value.
+                regs[i] = s->val.i32;
             else
                 *d++ = s->val.u32;
             break;
         case nsXPTType::T_U64:
             if (i < N_ARG_REGS)
                 regs[i] = s->val.u64;
             else
                 *d++ = s->val.u64;