mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 19:00:58 +00:00
tcg/i386: Return false on failure from patch_reloc
Backports commit bec3afd5fc6ab0b6e9d8a01575d58db8d1ad82ce from qemu
This commit is contained in:
parent
46189d87b3
commit
fc86fd34ff
|
@ -182,7 +182,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
|
|||
case R_386_PC32:
|
||||
value -= (uintptr_t)code_ptr;
|
||||
if (value != (int32_t)value) {
|
||||
tcg_abort();
|
||||
return false;
|
||||
}
|
||||
/* FALLTHRU */
|
||||
case R_386_32:
|
||||
|
@ -191,7 +191,7 @@ static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
|
|||
case R_386_PC8:
|
||||
value -= (uintptr_t)code_ptr;
|
||||
if (value != (int8_t)value) {
|
||||
tcg_abort();
|
||||
return false;
|
||||
}
|
||||
tcg_patch8(code_ptr, value);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue