History

In gen_vla_sp_restore, use X30 rather than get_reg.

Edmund Grimley Evans committed 10 years ago

Commit 7dddd651 parent 94d8d121 file · +4 −1Browse files

Unified · Split

arm64-gen.c+4−1
@@ -1826,7 +1826,10 @@ ST_FUNC void gen_vla_sp_save(int addr) { · 1825 unmodified lines
18261826 }
18271827
18281828 ST_FUNC void gen_vla_sp_restore(int addr) {
1829− uint32_t r = intr(get_reg(RC_INT));
1829+ // Use x30 because this function can be called when there
1830+ // is a live return value in x0 but there is nothing on
1831+ // the value stack to prevent get_reg from returning x0.
1832+ uint32_t r = 30;
18301833 arm64_ldrx(0, 3, r, 29, addr);
18311834 o(0x9100001f | r << 5); // mov sp,x(r)
18321835 }

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