mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 07:38:05 -04:00
sh2 drc: bug fixing and optimization in register cache and branch handling
This commit is contained in:
parent
32818177bd
commit
a0f5ba4067
3 changed files with 104 additions and 129 deletions
|
@ -1249,11 +1249,11 @@ static int emith_cond_check(int cond, int *r)
|
|||
#define emith_push_ret(r) do { \
|
||||
emith_sub_r_imm(SP, 8+16); /* reserve new arg save area (16) */ \
|
||||
emith_write_r_r_offs(LR, SP, 4+16); \
|
||||
if ((r) >= 0) emith_write_r_r_offs(r, SP, 0+16); \
|
||||
if ((r) > 0) emith_write_r_r_offs(r, SP, 0+16); \
|
||||
} while (0)
|
||||
|
||||
#define emith_pop_and_ret(r) do { \
|
||||
if ((r) >= 0) emith_read_r_r_offs(r, SP, 0+16); \
|
||||
if ((r) > 0) emith_read_r_r_offs(r, SP, 0+16); \
|
||||
emith_read_r_r_offs(LR, SP, 4+16); \
|
||||
emith_add_r_imm(SP, 8+16); \
|
||||
emith_ret(); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue