mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
tcg: Return success from patch_reloc
This will move the assert for success from within (subroutines of) patch_reloc into the callers. It will also let new code do something different when a relocation is out of range. For the moment, all backends are trivially converted to return true. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
8c1b079279
commit
6ac1778676
9 changed files with 21 additions and 11 deletions
|
@ -168,12 +168,13 @@ static inline void reloc_26(tcg_insn_unit *pc, tcg_insn_unit *target)
|
|||
*pc = deposit32(*pc, 0, 26, reloc_26_val(pc, target));
|
||||
}
|
||||
|
||||
static void patch_reloc(tcg_insn_unit *code_ptr, int type,
|
||||
static bool patch_reloc(tcg_insn_unit *code_ptr, int type,
|
||||
intptr_t value, intptr_t addend)
|
||||
{
|
||||
tcg_debug_assert(type == R_MIPS_PC16);
|
||||
tcg_debug_assert(addend == 0);
|
||||
reloc_pc16(code_ptr, (tcg_insn_unit *)value);
|
||||
return true;
|
||||
}
|
||||
|
||||
#define TCG_CT_CONST_ZERO 0x100
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue