[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 28/93] tcg/tci: Use bool in tcg_out_ri*
From: |
Richard Henderson |
Subject: |
[PATCH v2 28/93] tcg/tci: Use bool in tcg_out_ri* |
Date: |
Wed, 3 Feb 2021 15:44:04 -1000 |
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(-)
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 {
--
2.25.1
- [PATCH v2 23/93] tcg/tci: Remove dead code for TCG_TARGET_HAS_div2_*, (continued)
- [PATCH v2 23/93] tcg/tci: Remove dead code for TCG_TARGET_HAS_div2_*, Richard Henderson, 2021/02/03
- [PATCH v2 25/93] tcg/tci: Remove TODO as unused, Richard Henderson, 2021/02/03
- [PATCH v2 21/93] tcg/tci: Merge INDEX_op_{st_i32,st32_i64}, Richard Henderson, 2021/02/03
- [PATCH v2 22/93] tcg/tci: Use g_assert_not_reached, Richard Henderson, 2021/02/03
- [PATCH v2 26/93] tcg/tci: Restrict TCG_TARGET_NB_REGS to 16, Richard Henderson, 2021/02/03
- [PATCH v2 24/93] tcg/tci: Implement 64-bit division, Richard Henderson, 2021/02/03
- [PATCH v2 27/93] tcg/tci: Fix TCG_REG_R4 misusage, Richard Henderson, 2021/02/03
- [PATCH v2 35/93] tcg/tci: Remove tci_read_r32s, Richard Henderson, 2021/02/03
- [PATCH v2 28/93] tcg/tci: Use bool in tcg_out_ri*,
Richard Henderson <=
- [PATCH v2 39/93] tcg/tci: Remove ifdefs for TCG_TARGET_HAS_ext32[us]_i64, Richard Henderson, 2021/02/03
- [PATCH v2 41/93] tcg/tci: Merge mov, not and neg operations, Richard Henderson, 2021/02/03
- [PATCH v2 30/93] tcg/tci: Merge identical cases in generation, Richard Henderson, 2021/02/03
- [PATCH v2 38/93] tcg/tci: Merge extension operations, Richard Henderson, 2021/02/03
- [PATCH v2 43/93] tcg/tci: Split out tci_args_rrs, Richard Henderson, 2021/02/03
- [PATCH v2 29/93] tcg/tci: Remove TCG_CONST, Richard Henderson, 2021/02/03