diff mbox series

[v2,28/93] tcg/tci: Use bool in tcg_out_ri*

Message ID 20210204014509.882821-29-richard.henderson@linaro.org
State New
Headers show
Series TCI fixes and cleanups | expand

Commit Message

Richard Henderson Feb. 4, 2021, 1:44 a.m. UTC
This is the intended behavior. Remove the assert on
the specific value passed, which can now never be
anything besides false/true (0/1).

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

---
 tcg/tci/tcg-target.c.inc | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

-- 
2.25.1

Comments

Alex Bennée Feb. 4, 2021, 3:11 p.m. UTC | #1
Richard Henderson <richard.henderson@linaro.org> writes:

> This is the intended behavior. Remove the assert on

> the specific value passed, which can now never be

> anything besides false/true (0/1).

>

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


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


-- 
Alex Bennée
Alex Bennée Feb. 4, 2021, 3:15 p.m. UTC | #2
Richard Henderson <richard.henderson@linaro.org> writes:

> This is the intended behavior. Remove the assert on

> the specific value passed, which can now never be

> anything besides false/true (0/1).

>

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


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


-- 
Alex Bennée
diff mbox series

Patch

diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc
index aba7f75ad1..1b66368c94 100644
--- a/tcg/tci/tcg-target.c.inc
+++ b/tcg/tci/tcg-target.c.inc
@@ -295,10 +295,9 @@  static void tcg_out_r(TCGContext *s, TCGArg t0)
 }
 
 /* Write register or constant (native size). */
-static void tcg_out_ri(TCGContext *s, int const_arg, TCGArg arg)
+static void tcg_out_ri(TCGContext *s, bool const_arg, TCGArg arg)
 {
     if (const_arg) {
-        tcg_debug_assert(const_arg == 1);
         tcg_out8(s, TCG_CONST);
         tcg_out_i(s, arg);
     } else {
@@ -307,10 +306,9 @@  static void tcg_out_ri(TCGContext *s, int const_arg, TCGArg arg)
 }
 
 /* Write register or constant (32 bit). */
-static void tcg_out_ri32(TCGContext *s, int const_arg, TCGArg arg)
+static void tcg_out_ri32(TCGContext *s, bool const_arg, TCGArg arg)
 {
     if (const_arg) {
-        tcg_debug_assert(const_arg == 1);
         tcg_out8(s, TCG_CONST);
         tcg_out32(s, arg);
     } else {
@@ -320,10 +318,9 @@  static void tcg_out_ri32(TCGContext *s, int const_arg, TCGArg arg)
 
 #if TCG_TARGET_REG_BITS == 64
 /* Write register or constant (64 bit). */
-static void tcg_out_ri64(TCGContext *s, int const_arg, TCGArg arg)
+static void tcg_out_ri64(TCGContext *s, bool const_arg, TCGArg arg)
 {
     if (const_arg) {
-        tcg_debug_assert(const_arg == 1);
         tcg_out8(s, TCG_CONST);
         tcg_out64(s, arg);
     } else {