[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/70] target/hexagon/idef-parser: Use gen_tmp for LPCFG
From: |
Richard Henderson |
Subject: |
[PATCH 16/70] target/hexagon/idef-parser: Use gen_tmp for LPCFG |
Date: |
Sun, 26 Feb 2023 19:41:39 -1000 |
The GET_USR_FIELD macro initializes the output, so the initial assignment
of zero is discarded. This is the only use of get_tmp_value outside of
parser-helper.c, so make it static.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hexagon/idef-parser/parser-helpers.h | 6 ------
target/hexagon/idef-parser/parser-helpers.c | 2 +-
target/hexagon/idef-parser/idef-parser.y | 2 +-
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/target/hexagon/idef-parser/parser-helpers.h
b/target/hexagon/idef-parser/parser-helpers.h
index 4c89498f5b..1239d23a6a 100644
--- a/target/hexagon/idef-parser/parser-helpers.h
+++ b/target/hexagon/idef-parser/parser-helpers.h
@@ -154,12 +154,6 @@ HexValue gen_tmp(Context *c,
unsigned bit_width,
HexSignedness signedness);
-HexValue gen_tmp_value(Context *c,
- YYLTYPE *locp,
- const char *value,
- unsigned bit_width,
- HexSignedness signedness);
-
HexValue gen_imm_value(Context *c __attribute__((unused)),
YYLTYPE *locp,
int value,
diff --git a/target/hexagon/idef-parser/parser-helpers.c
b/target/hexagon/idef-parser/parser-helpers.c
index 6fb5f31cf7..be979dac86 100644
--- a/target/hexagon/idef-parser/parser-helpers.c
+++ b/target/hexagon/idef-parser/parser-helpers.c
@@ -305,7 +305,7 @@ HexValue gen_tmp(Context *c,
return rvalue;
}
-HexValue gen_tmp_value(Context *c,
+static HexValue gen_tmp_value(Context *c,
YYLTYPE *locp,
const char *value,
unsigned bit_width,
diff --git a/target/hexagon/idef-parser/idef-parser.y
b/target/hexagon/idef-parser/idef-parser.y
index fae291e5f8..c784726d41 100644
--- a/target/hexagon/idef-parser/idef-parser.y
+++ b/target/hexagon/idef-parser/idef-parser.y
@@ -783,7 +783,7 @@ rvalue : FAIL
}
| LPCFG
{
- $$ = gen_tmp_value(c, &@1, "0", 32, UNSIGNED);
+ $$ = gen_tmp(c, &@1, 32, UNSIGNED);
OUT(c, &@1, "GET_USR_FIELD(USR_LPCFG, ", &$$, ");\n");
}
| EXTRACT '(' rvalue ',' rvalue ')'
--
2.34.1
- [PATCH 07/70] target/arm: Avoid tcg_const_ptr in gen_sve_{ldr,str}, (continued)
- [PATCH 07/70] target/arm: Avoid tcg_const_ptr in gen_sve_{ldr,str}, 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 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 12/70] target/avr: Avoid use of tcg_const_i32 in SBIC, SBIS, Richard Henderson, 2023/02/27
- [PATCH 15/70] target/hexagon: Use tcg_constant_* for gen_constant_from_imm, Richard Henderson, 2023/02/27
- [PATCH 16/70] target/hexagon/idef-parser: Use gen_tmp for LPCFG,
Richard Henderson <=
- [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 19/70] target/hexagon/idef-parser: Use gen_constant for gen_extend_tcg_width_op, Richard Henderson, 2023/02/27
- [PATCH 20/70] target/hppa: Avoid tcg_const_i64 in trans_fid_f, Richard Henderson, 2023/02/27