History

riscv: fix 90_struct-init

indirect calls were broken.

Michael Matz committed 7 years ago

Commit b69c2ea1 parent 31ecaa71 file · +2 −2Browse files

Unified · Split

riscv64-gen.c+2−2
@@ -359,8 +359,8 @@ static void gcall(void) · 358 unmodified lines
359359 R_RISCV_CALL_PLT, (int)vtop->c.i);
360360 o(0x17 | (1 << 7)); // auipc ra, 0 %call(func)
361361 o(0x80e7); // jalr ra, 0 %call(func)
362− } else if ((vtop->r & VT_VALMASK) < VT_CONST) {
363− int r = ireg(vtop->r & VT_VALMASK);
362+ } else if (vtop->r < VT_CONST) {
363+ int r = ireg(vtop->r);
364364 EI(0x67, 0, 1, r, 0); // jalr ra, 0(R)
365365 } else {
366366 int r = TREG_RA;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t