mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
tcg: Change relocation offsets to intptr_t
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
2f2f244d02
commit
2ba7fae29e
13 changed files with 40 additions and 39 deletions
|
@ -252,7 +252,7 @@ static inline int check_fit_i32(uint32_t val, unsigned int bits)
|
|||
}
|
||||
|
||||
static void patch_reloc(uint8_t *code_ptr, int type,
|
||||
tcg_target_long value, tcg_target_long addend)
|
||||
intptr_t value, intptr_t addend)
|
||||
{
|
||||
uint32_t insn;
|
||||
value += addend;
|
||||
|
@ -264,7 +264,7 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
|||
*(uint32_t *)code_ptr = value;
|
||||
break;
|
||||
case R_SPARC_WDISP16:
|
||||
value -= (long)code_ptr;
|
||||
value -= (intptr_t)code_ptr;
|
||||
if (!check_fit_tl(value >> 2, 16)) {
|
||||
tcg_abort();
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ static void patch_reloc(uint8_t *code_ptr, int type,
|
|||
*(uint32_t *)code_ptr = insn;
|
||||
break;
|
||||
case R_SPARC_WDISP19:
|
||||
value -= (long)code_ptr;
|
||||
value -= (intptr_t)code_ptr;
|
||||
if (!check_fit_tl(value >> 2, 19)) {
|
||||
tcg_abort();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue