[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 32/44] target/hexagon: fix = vs. == mishap
|
From: |
Taylor Simpson |
|
Subject: |
[PULL 32/44] target/hexagon: fix = vs. == mishap |
|
Date: |
Fri, 12 May 2023 14:46:54 -0700 |
From: Paolo Bonzini <pbonzini@redhat.com>
**** Changes in v2 ****
Fix yyassert's for sign and zero extends
Coverity reports a parameter that is "set but never used". This is caused
by an assignment operator being used instead of equality.
Co-authored-by: Taylor Simpson <tsimpson@quicinc.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Tested-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20230428204411.1400931-1-tsimpson@quicinc.com>
---
target/hexagon/idef-parser/parser-helpers.c | 2 +-
target/hexagon/idef-parser/idef-parser.y | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/hexagon/idef-parser/parser-helpers.c
b/target/hexagon/idef-parser/parser-helpers.c
index 9550097269..7b5ebafec2 100644
--- a/target/hexagon/idef-parser/parser-helpers.c
+++ b/target/hexagon/idef-parser/parser-helpers.c
@@ -1120,7 +1120,7 @@ HexValue gen_extend_op(Context *c,
HexValue *value,
HexSignedness signedness)
{
- unsigned bit_width = (dst_width = 64) ? 64 : 32;
+ unsigned bit_width = (dst_width == 64) ? 64 : 32;
HexValue value_m = *value;
HexValue src_width_m = *src_width;
diff --git a/target/hexagon/idef-parser/idef-parser.y
b/target/hexagon/idef-parser/idef-parser.y
index 5f3907eb28..5c983954ed 100644
--- a/target/hexagon/idef-parser/idef-parser.y
+++ b/target/hexagon/idef-parser/idef-parser.y
@@ -683,7 +683,7 @@ rvalue : FAIL
yyassert(c, &@1, $5.type == IMMEDIATE &&
$5.imm.type == VALUE,
"SXT expects immediate values\n");
- $$ = gen_extend_op(c, &@1, &$3, $5.imm.value, &$7, SIGNED);
+ $$ = gen_extend_op(c, &@1, &$3, 64, &$7, SIGNED);
}
| ZXT '(' rvalue ',' IMM ',' rvalue ')'
{
@@ -691,7 +691,7 @@ rvalue : FAIL
yyassert(c, &@1, $5.type == IMMEDIATE &&
$5.imm.type == VALUE,
"ZXT expects immediate values\n");
- $$ = gen_extend_op(c, &@1, &$3, $5.imm.value, &$7, UNSIGNED);
+ $$ = gen_extend_op(c, &@1, &$3, 64, &$7, UNSIGNED);
}
| '(' rvalue ')'
{
--
2.25.1
- [PULL 00/44] Hexagon update, Taylor Simpson, 2023/05/12
- [PULL 37/44] Hexagon (decode): look for pkts with multiple insns at the same slot, Taylor Simpson, 2023/05/12
- [PULL 38/44] Remove test_vshuff from hvx_misc tests, Taylor Simpson, 2023/05/12
- [PULL 12/44] Hexagon (target/hexagon) Add overrides for loop setup instructions, Taylor Simpson, 2023/05/12
- [PULL 32/44] target/hexagon: fix = vs. == mishap,
Taylor Simpson <=
- [PULL 05/44] Hexagon (tests/tcg/hexagon) Add v68 HVX tests, Taylor Simpson, 2023/05/12
- [PULL 14/44] Hexagon (target/hexagon) Add overrides for clr[tf]new, Taylor Simpson, 2023/05/12
- [PULL 36/44] Hexagon (iclass): update J4_hintjumpr slot constraints, Taylor Simpson, 2023/05/12
- [PULL 17/44] Hexagon (target/hexagon) Clean up pred_written usage, Taylor Simpson, 2023/05/12
- [PULL 06/44] Hexagon (target/hexagon) Add v69 HVX instructions, Taylor Simpson, 2023/05/12
- [PULL 01/44] Hexagon (target/hexagon) Add support for v68/v69/v71/v73, Taylor Simpson, 2023/05/12
- [PULL 23/44] Hexagon (target/hexagon) Short-circuit more HVX single instruction packets, Taylor Simpson, 2023/05/12
- [PULL 02/44] Hexagon (target/hexagon) Add v68 scalar instructions, Taylor Simpson, 2023/05/12
- [PULL 08/44] Hexagon (target/hexagon) Add v73 scalar instructions, Taylor Simpson, 2023/05/12
- [PULL 03/44] Hexagon (tests/tcg/hexagon) Add v68 scalar tests, Taylor Simpson, 2023/05/12