fixed endian bug in generate_branch_patch_conditional
This commit is contained in:
parent
e272a2d4b3
commit
0ef6851c63
1 changed files with 9 additions and 0 deletions
|
@ -224,9 +224,18 @@ u32 arm_to_mips_reg[] =
|
|||
mips_emit_addiu(reg_cycles, reg_cycles, -cycle_count); \
|
||||
cycle_count = 0 \
|
||||
|
||||
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
||||
|
||||
#define generate_branch_patch_conditional(dest, offset) \
|
||||
*(((u16 *)(dest)) + 1) = mips_relative_offset(dest, offset) \
|
||||
|
||||
#else
|
||||
|
||||
#define generate_branch_patch_conditional(dest, offset) \
|
||||
*((u16 *)(dest)) = mips_relative_offset(dest, offset) \
|
||||
|
||||
#endif
|
||||
|
||||
#define generate_branch_patch_unconditional(dest, offset) \
|
||||
*((u32 *)(dest)) = (mips_opcode_j << 26) | \
|
||||
((mips_absolute_offset(offset)) & 0x3FFFFFF) \
|
||||
|
|
Loading…
Add table
Reference in a new issue