diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-02-26 16:44:05 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-03-05 13:44:54 -0800 |
commit | 93f367bb7fd94a52c4ba9bcc8029881f6cab1bb0 (patch) | |
tree | 9faf1e3a695c40a17d7e65b8c23d44216dda587e /target/hexagon/idef-parser | |
parent | 2c3cee6bd75e8547b5266b8b688c9eeb0ae2211e (diff) | |
download | qemu-93f367bb7fd94a52c4ba9bcc8029881f6cab1bb0.zip qemu-93f367bb7fd94a52c4ba9bcc8029881f6cab1bb0.tar.gz qemu-93f367bb7fd94a52c4ba9bcc8029881f6cab1bb0.tar.bz2 |
target/hexagon/idef-parser: Use gen_tmp for LPCFG
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.
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/hexagon/idef-parser')
-rw-r--r-- | target/hexagon/idef-parser/idef-parser.y | 2 | ||||
-rw-r--r-- | target/hexagon/idef-parser/parser-helpers.c | 2 | ||||
-rw-r--r-- | target/hexagon/idef-parser/parser-helpers.h | 6 |
3 files changed, 2 insertions, 8 deletions
diff --git a/target/hexagon/idef-parser/idef-parser.y b/target/hexagon/idef-parser/idef-parser.y index fae291e..c784726 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 ')' diff --git a/target/hexagon/idef-parser/parser-helpers.c b/target/hexagon/idef-parser/parser-helpers.c index 6fb5f31..be979da 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/parser-helpers.h b/target/hexagon/idef-parser/parser-helpers.h index 4c89498..1239d23 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, |