History

fixup! riscv: Implement large addend for global address

Use `t1` instead of `t0` for the cases when `rr` is not set so `t0` is used by default and this happens: lui t0, XXX add t0, t0, t0 Instead, now we do: lui t1, XXX add t0, t0, t1

Ekaitz Zarraga committed 2 years ago

Commit 0aca8611 parent 8baadb31 file · +2 −2Browse files

Unified · Split

riscv64-gen.c+2−2
@@ -193,8 +193,8 @@ static int load_symofs(int r, SValue *sv, int forstore) · 192 unmodified lines
193 if (doload) {193 if (doload) {
194 EI(0x03, 3, rr, rr, 0); // ld RR, 0(RR)194 EI(0x03, 3, rr, rr, 0); // ld RR, 0(RR)
195 if (large_addend) {195 if (large_addend) {
196 o(0x37 | (5 << 7) | ((0x800 + fc) & 0xfffff000)); //lui t0, high(fc)196 o(0x37 | (6 << 7) | ((0x800 + fc) & 0xfffff000)); //lui t1, high(fc)
197 ER(0x33, 0, rr, rr, 5, 0); // add RR, RR, t0197 ER(0x33, 0, rr, rr, 6, 0); // add RR, RR, t1
198 sv->c.i = fc << 20 >> 20;198 sv->c.i = fc << 20 >> 20;
199 }199 }
200 }200 }

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