mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
sh2 drc: add mipsel backend for MIPS32 Release 1 (for JZ47xx)
This commit is contained in:
parent
1747b6712d
commit
d80a5fd2ab
13 changed files with 1922 additions and 23 deletions
|
@ -1098,11 +1098,14 @@ static inline void emith_pool_adjust(int pool_index, int move_offs)
|
|||
#define emith_jump_cond_patchable(cond, target) \
|
||||
emith_jump_cond(cond, target)
|
||||
|
||||
#define emith_jump_patch(ptr, target) do { \
|
||||
#define emith_jump_patch(ptr, target) ({ \
|
||||
u32 *ptr_ = ptr; \
|
||||
u32 val_ = (u32 *)(target) - ptr_ - 2; \
|
||||
*ptr_ = (*ptr_ & 0xff000000) | (val_ & 0x00ffffff); \
|
||||
} while (0)
|
||||
(u8 *)ptr; \
|
||||
})
|
||||
|
||||
#define emith_jump_patch_size() 4
|
||||
|
||||
#define emith_jump_at(ptr, target) do { \
|
||||
u32 val_ = (u32 *)(target) - (u32 *)(ptr) - 2; \
|
||||
|
|
1464
cpu/drc/emit_mips.c
Normal file
1464
cpu/drc/emit_mips.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -869,11 +869,14 @@ enum { xAX = 0, xCX, xDX, xBX, xSP, xBP, xSI, xDI, // x86-64,i386 common
|
|||
#define emith_jump_cond_patchable(cond, target) \
|
||||
emith_jump_cond(cond, target)
|
||||
|
||||
#define emith_jump_patch(ptr, target) do { \
|
||||
#define emith_jump_patch(ptr, target) ({ \
|
||||
u32 disp_ = (u8 *)(target) - ((u8 *)(ptr) + 4); \
|
||||
u32 offs_ = (*(u8 *)(ptr) == 0x0f) ? 2 : 1; \
|
||||
EMIT_PTR((u8 *)(ptr) + offs_, disp_ - offs_, u32); \
|
||||
} while (0)
|
||||
ptr; \
|
||||
})
|
||||
|
||||
#define emith_jump_patch_size() 6
|
||||
|
||||
#define emith_jump_at(ptr, target) do { \
|
||||
u32 disp_ = (u8 *)(target) - ((u8 *)(ptr) + 5); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue