mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 23:22:12 -06:00
target/hexagon: reduce scope of def_regnum, remove dead assignment
This is intended to address a coverity finding: CID 1527408. Signed-off-by: Brian Cain <bcain@quicinc.com> Reviewed-by: Matheus Tavares Bernardino <quic_mathbern@quicinc.com> Message-Id: <20240114234453.4114587-1-bcain@quicinc.com>
This commit is contained in:
parent
cbb9d7157d
commit
bbe4209c8b
1 changed files with 1 additions and 3 deletions
|
@ -33,7 +33,6 @@ check_new_value(Packet *pkt)
|
||||||
const char *dststr = NULL;
|
const char *dststr = NULL;
|
||||||
uint16_t def_opcode;
|
uint16_t def_opcode;
|
||||||
char letter;
|
char letter;
|
||||||
int def_regnum;
|
|
||||||
|
|
||||||
for (i = 1; i < pkt->num_insns; i++) {
|
for (i = 1; i < pkt->num_insns; i++) {
|
||||||
uint16_t use_opcode = pkt->insn[i].opcode;
|
uint16_t use_opcode = pkt->insn[i].opcode;
|
||||||
|
@ -78,7 +77,6 @@ check_new_value(Packet *pkt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((dststr == NULL) && GET_ATTRIB(def_opcode, A_CVI_GATHER)) {
|
if ((dststr == NULL) && GET_ATTRIB(def_opcode, A_CVI_GATHER)) {
|
||||||
def_regnum = 0;
|
|
||||||
pkt->insn[i].regno[use_regidx] = def_oreg;
|
pkt->insn[i].regno[use_regidx] = def_oreg;
|
||||||
pkt->insn[i].new_value_producer_slot = pkt->insn[def_idx].slot;
|
pkt->insn[i].new_value_producer_slot = pkt->insn[def_idx].slot;
|
||||||
} else {
|
} else {
|
||||||
|
@ -86,7 +84,7 @@ check_new_value(Packet *pkt)
|
||||||
/* still not there, we have a bad packet */
|
/* still not there, we have a bad packet */
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
}
|
}
|
||||||
def_regnum = pkt->insn[def_idx].regno[dststr - reginfo];
|
int def_regnum = pkt->insn[def_idx].regno[dststr - reginfo];
|
||||||
/* Now patch up the consumer with the register number */
|
/* Now patch up the consumer with the register number */
|
||||||
pkt->insn[i].regno[use_regidx] = def_regnum ^ def_oreg;
|
pkt->insn[i].regno[use_regidx] = def_regnum ^ def_oreg;
|
||||||
/* special case for (Vx,Vy) */
|
/* special case for (Vx,Vy) */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue