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

On riscv64, 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/D215989
This commit is contained in:
Lu Yahan 2024-07-12 08:17:17 +00:00
Родитель 97f2515e1f
Коммит ec2e4db3e2
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -48,7 +48,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;
// On RISC-V, 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;