cgen: fix riscv64 closure thunk (use floating point register) (#24315)

This commit is contained in:
Mike 2025-04-25 15:24:52 +03:00 committed by GitHub
parent ce00dc738b
commit 0bcfd0f9ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -127,11 +127,12 @@ static char __CLOSURE_GET_DATA_BYTES[] = {
static char __closure_thunk[] = {
0x97, 0xCF, 0xFF, 0xFF, // auipc t6, 0xffffc
0x03, 0xBF, 0x8F, 0x00, // ld t5, 8(t6)
0x67, 0x00, 0x0F, 0x00 // jr t5
0x07, 0xB3, 0x0F, 0x00, // fld ft6, 0(t6)
0x67, 0x00, 0x0F, 0x00, // jr t5
};
static char __CLOSURE_GET_DATA_BYTES[] = {
0x03, 0xb5, 0x0f, 0x00, // ld a0, 0(t6)
0x67, 0x80, 0x00, 0x00 // ret
0x53, 0x05, 0x03, 0xE2, // fmv.x.d a0, ft6
0x67, 0x80, 0x00, 0x00, // ret
};
#elif defined (__V_rv32)
static char __closure_thunk[] = {