qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PULL 01/15] tcg: Replace if + tcg_abort with tcg_debug_assert
Date: Sun, 23 Apr 2023 11:19:36 +0100	[thread overview]
Message-ID: <20230423101950.817899-2-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230423101950.817899-1-richard.henderson@linaro.org>

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/tcg.c                 | 4 +---
 tcg/i386/tcg-target.c.inc | 8 +++-----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/tcg/tcg.c b/tcg/tcg.c
index bb52bc060b..100f81edb2 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -1174,9 +1174,7 @@ static TCGTemp *tcg_global_reg_new_internal(TCGContext *s, TCGType type,
 {
     TCGTemp *ts;
 
-    if (TCG_TARGET_REG_BITS == 32 && type != TCG_TYPE_I32) {
-        tcg_abort();
-    }
+    tcg_debug_assert(TCG_TARGET_REG_BITS == 64 || type == TCG_TYPE_I32);
 
     ts = tcg_global_alloc(s);
     ts->base_type = type;
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index 5a151fe64a..dfd41c7bf1 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -1369,8 +1369,8 @@ static void tcg_out_addi(TCGContext *s, int reg, tcg_target_long val)
     }
 }
 
-/* Use SMALL != 0 to force a short forward branch.  */
-static void tcg_out_jxx(TCGContext *s, int opc, TCGLabel *l, int small)
+/* Set SMALL to force a short forward branch.  */
+static void tcg_out_jxx(TCGContext *s, int opc, TCGLabel *l, bool small)
 {
     int32_t val, val1;
 
@@ -1385,9 +1385,7 @@ static void tcg_out_jxx(TCGContext *s, int opc, TCGLabel *l, int small)
             }
             tcg_out8(s, val1);
         } else {
-            if (small) {
-                tcg_abort();
-            }
+            tcg_debug_assert(!small);
             if (opc == -1) {
                 tcg_out8(s, OPC_JMP_long);
                 tcg_out32(s, val - 5);
-- 
2.34.1



  reply	other threads:[~2023-04-23 10:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 10:19 [PULL 00/15] tcg patch queue Richard Henderson
2023-04-23 10:19 ` Richard Henderson [this message]
2023-04-23 10:19 ` [PULL 02/15] tcg: Replace tcg_abort with g_assert_not_reached Richard Henderson
2023-04-23 10:19 ` [PULL 03/15] tcg: Split out tcg_out_ext8s Richard Henderson
2023-04-23 10:19 ` [PULL 04/15] tcg: Split out tcg_out_ext8u Richard Henderson
2023-04-23 10:19 ` [PULL 05/15] tcg: Split out tcg_out_ext16s Richard Henderson
2023-04-23 10:19 ` [PULL 06/15] tcg: Split out tcg_out_ext16u Richard Henderson
2023-04-23 10:19 ` [PULL 07/15] tcg: Split out tcg_out_ext32s Richard Henderson
2023-04-23 10:19 ` [PULL 08/15] tcg: Split out tcg_out_ext32u Richard Henderson
2023-04-23 10:19 ` [PULL 09/15] tcg: Split out tcg_out_exts_i32_i64 Richard Henderson
2023-04-23 10:19 ` [PULL 10/15] tcg: Split out tcg_out_extu_i32_i64 Richard Henderson
2023-04-23 10:19 ` [PULL 11/15] tcg: Split out tcg_out_extrl_i64_i32 Richard Henderson
2023-04-23 10:19 ` [PULL 12/15] tcg: Introduce tcg_out_movext Richard Henderson
2023-04-23 10:19 ` [PULL 13/15] tcg: Introduce tcg_out_xchg Richard Henderson
2023-04-23 10:19 ` [PULL 14/15] tcg: Clear TCGLabelQemuLdst on allocation Richard Henderson
2023-04-23 10:19 ` [PULL 15/15] tcg/riscv: Conditionalize tcg_out_exts_i32_i64 Richard Henderson
2023-04-23 14:55 ` [PULL 00/15] tcg patch queue Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230423101950.817899-2-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).