From 6ac1778676f4259c10b0629ccd9df319a5d1baeb Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 30 Nov 2018 11:52:48 -0800 Subject: tcg: Return success from patch_reloc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.inc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tcg/sparc') diff --git a/tcg/sparc/tcg-target.inc.c b/tcg/sparc/tcg-target.inc.c index 8a151b9cac..55144c437c 100644 --- a/tcg/sparc/tcg-target.inc.c +++ b/tcg/sparc/tcg-target.inc.c @@ -291,7 +291,7 @@ static inline int check_fit_i32(int32_t val, unsigned int bits) # define check_fit_ptr check_fit_i32 #endif -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) { uint32_t insn = *code_ptr; @@ -316,6 +316,7 @@ static void patch_reloc(tcg_insn_unit *code_ptr, int type, } *code_ptr = insn; + return true; } /* parse target specific constraints */ -- cgit v1.2.3