X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fdrc%2Femit_arm.c;h=8627734a2cafe52507e309d6dfd333b9f096648b;hb=44e6452e0247e4a926eba8a233080aec5dd7b29b;hp=b1e3ded82725e7d2d5a88701b80863279e6ae1d4;hpb=25eb407c56c95255fc1b88afe084bd5ae393193d;p=picodrive.git diff --git a/cpu/drc/emit_arm.c b/cpu/drc/emit_arm.c index b1e3ded..8627734 100644 --- a/cpu/drc/emit_arm.c +++ b/cpu/drc/emit_arm.c @@ -625,16 +625,19 @@ static int emith_xbranch(int cond, void *target, int is_call) #define emith_jump(target) \ emith_jump_cond(A_COND_AL, target) +#define emith_jump_patchable(target) \ + emith_jump(target) + #define emith_jump_cond(cond, target) \ emith_xbranch(cond, target, 0) -#define emith_jump_patchable(cond) \ - emith_jump_cond(cond, 0) +#define emith_jump_cond_patchable(cond, target) \ + emith_jump_cond(cond, target) #define emith_jump_patch(ptr, target) do { \ u32 *ptr_ = ptr; \ - u32 val = (u32 *)(target) - (u32 *)ptr_ - 2; \ - *ptr_ = (*ptr_ & 0xff000000) | (val & 0x00ffffff); \ + u32 val_ = (u32 *)(target) - ptr_ - 2; \ + *ptr_ = (*ptr_ & 0xff000000) | (val_ & 0x00ffffff); \ } while (0) #define emith_jump_reg_c(cond, r) \