riscv: fix 90_struct-init

indirect calls were broken.
This commit is contained in:
Michael Matz 2019-07-15 23:36:36 +02:00
parent 31ecaa7c28
commit b69c2ea2cf

View File

@ -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;