mirror of
https://github.com/frida/tinycc
synced 2025-01-18 09:19:22 +03:00
riscv: fix 90_struct-init
indirect calls were broken.
This commit is contained in:
parent
31ecaa7c28
commit
b69c2ea2cf
@ -359,8 +359,8 @@ static void gcall(void)
|
||||
R_RISCV_CALL_PLT, (int)vtop->c.i);
|
||||
o(0x17 | (1 << 7)); // auipc ra, 0 %call(func)
|
||||
o(0x80e7); // jalr ra, 0 %call(func)
|
||||
} else if ((vtop->r & VT_VALMASK) < VT_CONST) {
|
||||
int r = ireg(vtop->r & VT_VALMASK);
|
||||
} else if (vtop->r < VT_CONST) {
|
||||
int r = ireg(vtop->r);
|
||||
EI(0x67, 0, 1, r, 0); // jalr ra, 0(R)
|
||||
} else {
|
||||
int r = TREG_RA;
|
||||
|
Loading…
Reference in New Issue
Block a user