[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/70] target/hexagon: Use tcg_constant_* for gen_constant_from_i
From: |
Richard Henderson |
Subject: |
[PATCH 15/70] target/hexagon: Use tcg_constant_* for gen_constant_from_imm |
Date: |
Sun, 26 Feb 2023 19:41:38 -1000 |
Rename from gen_tmp_value_from_imm to match gen_constant vs gen_tmp.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hexagon/idef-parser/parser-helpers.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/target/hexagon/idef-parser/parser-helpers.c
b/target/hexagon/idef-parser/parser-helpers.c
index 0b401f7dbe..6fb5f31cf7 100644
--- a/target/hexagon/idef-parser/parser-helpers.c
+++ b/target/hexagon/idef-parser/parser-helpers.c
@@ -325,9 +325,9 @@ HexValue gen_tmp_value(Context *c,
return rvalue;
}
-static HexValue gen_tmp_value_from_imm(Context *c,
- YYLTYPE *locp,
- HexValue *value)
+static HexValue gen_constant_from_imm(Context *c,
+ YYLTYPE *locp,
+ HexValue *value)
{
HexValue rvalue;
assert(value->type == IMMEDIATE);
@@ -338,11 +338,11 @@ static HexValue gen_tmp_value_from_imm(Context *c,
rvalue.is_dotnew = false;
rvalue.tmp.index = c->inst.tmp_count;
/*
- * Here we output the call to `tcg_const_i<width>` in
+ * Here we output the call to `tcg_constant_i<width>` in
* order to create the temporary value. Note, that we
* add a cast
*
- * `tcg_const_i<width>`((int<width>_t) ...)`
+ * `tcg_constant_i<width>`((int<width>_t) ...)`
*
* This cast is required to avoid implicit integer
* conversion warnings since all immediates are
@@ -350,7 +350,7 @@ static HexValue gen_tmp_value_from_imm(Context *c,
* integer is 32-bit.
*/
OUT(c, locp, "TCGv_i", &rvalue.bit_width, " tmp_", &c->inst.tmp_count);
- OUT(c, locp, " = tcg_const_i", &rvalue.bit_width,
+ OUT(c, locp, " = tcg_constant_i", &rvalue.bit_width,
"((int", &rvalue.bit_width, "_t) (", value, "));\n");
c->inst.tmp_count++;
@@ -395,8 +395,7 @@ HexValue gen_imm_qemu_tmp(Context *c, YYLTYPE *locp,
unsigned bit_width,
HexValue rvalue_materialize(Context *c, YYLTYPE *locp, HexValue *rvalue)
{
if (rvalue->type == IMMEDIATE) {
- HexValue res = gen_tmp_value_from_imm(c, locp, rvalue);
- return res;
+ return gen_constant_from_imm(c, locp, rvalue);
}
return *rvalue;
}
--
2.34.1
- [PATCH 05/70] target/arm: Create gen_set_rmode, gen_restore_rmode, (continued)
- [PATCH 05/70] target/arm: Create gen_set_rmode, gen_restore_rmode, Richard Henderson, 2023/02/27
- [PATCH 07/70] target/arm: Avoid tcg_const_ptr in gen_sve_{ldr,str}, Richard Henderson, 2023/02/27
- [PATCH 06/70] target/arm: Improve trans_BFCI, Richard Henderson, 2023/02/27
- [PATCH 08/70] target/arm: Avoid tcg_const_* in translate-mve.c, Richard Henderson, 2023/02/27
- [PATCH 09/70] target/arm: Avoid tcg_const_ptr in disas_simd_zip_trn, Richard Henderson, 2023/02/27
- [PATCH 10/70] target/arm: Avoid tcg_const_ptr in handle_vec_simd_sqshrn, Richard Henderson, 2023/02/27
- [PATCH 11/70] target/arm: Avoid tcg_const_ptr in handle_rev, Richard Henderson, 2023/02/27
- [PATCH 12/70] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS, Richard Henderson, 2023/02/27
- [PATCH 13/70] target/avr: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/02/27
- [PATCH 14/70] target/cris: Avoid use of tcg_const_i32 throughout, Richard Henderson, 2023/02/27
- [PATCH 15/70] target/hexagon: Use tcg_constant_* for gen_constant_from_imm,
Richard Henderson <=
- [PATCH 16/70] target/hexagon/idef-parser: Use gen_tmp for LPCFG, Richard Henderson, 2023/02/27
- [PATCH 17/70] target/hexagon/idef-parser: Use gen_tmp for gen_pred_assign, Richard Henderson, 2023/02/27
- [PATCH 18/70] target/hexagon/idef-parser: Use gen_tmp for gen_rvalue_pred, Richard Henderson, 2023/02/27
- [PATCH 20/70] target/hppa: Avoid tcg_const_i64 in trans_fid_f, Richard Henderson, 2023/02/27
- [PATCH 19/70] target/hexagon/idef-parser: Use gen_constant for gen_extend_tcg_width_op, Richard Henderson, 2023/02/27