diff mbox series

[v3,12/16] tcg/i386: Return false on failure from patch_reloc

Message ID 20181130215221.20554-13-richard.henderson@linaro.org
State Superseded
Headers show
Series tcg: Assorted cleanups | expand

Commit Message

Richard Henderson Nov. 30, 2018, 9:52 p.m. UTC
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 tcg/i386/tcg-target.inc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.17.2

Comments

Alex Bennée Dec. 3, 2018, 10:40 a.m. UTC | #1
Richard Henderson <richard.henderson@linaro.org> writes:

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


> ---

>  tcg/i386/tcg-target.inc.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

>

> diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c

> index 5c88f1f36b..28192f4608 100644

> --- a/tcg/i386/tcg-target.inc.c

> +++ b/tcg/i386/tcg-target.inc.c

> @@ -175,7 +175,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:

> @@ -184,7 +184,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;



--
Alex Bennée
diff mbox series

Patch

diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c
index 5c88f1f36b..28192f4608 100644
--- a/tcg/i386/tcg-target.inc.c
+++ b/tcg/i386/tcg-target.inc.c
@@ -175,7 +175,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:
@@ -184,7 +184,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;