Bug 1882716 - [loongarch] Keep unsigned 32-bit parameter sign-extended in register. r=nika DONTBUILD

On loongarch64, 32-bit value in 64-bit register should be sign-extended, even
when it's type is unsigned.

Differential Revision: https://phabricator.services.mozilla.com/D204011
This commit is contained in:
Zhao Jiazhong 2024-03-11 10:13:35 +00:00
parent bbdbfcc046
commit 50d463aa31

View File

@ -44,7 +44,9 @@ extern "C" void invoke_copy_to_stack(uint64_t* gpregs, double* fpregs,
value = s->val.u16;
break;
case nsXPTType::T_U32:
value = s->val.u32;
// 32-bit values need to be sign-extended in 64-bit registers,
// so use the signed value here.
value = s->val.i32;
break;
case nsXPTType::T_U64:
value = s->val.u64;