]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target/hexagon/idef-parser: Use gen_tmp for LPCFG
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 27 Feb 2023 02:44:05 +0000 (16:44 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Sun, 5 Mar 2023 21:44:54 +0000 (13:44 -0800)
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>
target/hexagon/idef-parser/idef-parser.y
target/hexagon/idef-parser/parser-helpers.c
target/hexagon/idef-parser/parser-helpers.h

index fae291e5f8f6ebf5b51e03fc8601f89e34cd0089..c784726d41b1d312d957cb976d3e0a832ec6b62f 100644 (file)
@@ -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 ')'
index 6fb5f31cf76e9eb5d43db20530390467f1178f3c..be979dac863cb22ddb993d6930ae31010e082f08 100644 (file)
@@ -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,
index 4c89498f5b8372b57a13527f20d80d65c12088d2..1239d23a6ab6f7a58b2795942da7ffc38a8e7444 100644 (file)
@@ -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,