aboutsummaryrefslogtreecommitdiff
path: root/opcodes/iq2000-ibld.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-23 18:04:12 +1030
committerAlan Modra <amodra@gmail.com>2019-12-23 18:04:12 +1030
commit3e1056a1a6336f289d3f0def8f6a3632c8a75393 (patch)
tree179580314154fe4df22e7b2ea548366f999aca28 /opcodes/iq2000-ibld.c
parent1a1e2852a56da48da1f3b5c80d23c3998a9000fc (diff)
downloadgdb-3e1056a1a6336f289d3f0def8f6a3632c8a75393.zip
gdb-3e1056a1a6336f289d3f0def8f6a3632c8a75393.tar.gz
gdb-3e1056a1a6336f289d3f0def8f6a3632c8a75393.tar.bz2
ubsan: iq2000: left shift of negative value
cpu/ * iq2000.cpu (f-offset): Avoid left shift of negative values. opcodes/ * iq2000-ibld.c: Regenerate.
Diffstat (limited to 'opcodes/iq2000-ibld.c')
-rw-r--r--opcodes/iq2000-ibld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/iq2000-ibld.c b/opcodes/iq2000-ibld.c
index 34482b3..3059fe1 100644
--- a/opcodes/iq2000-ibld.c
+++ b/opcodes/iq2000-ibld.c
@@ -838,7 +838,7 @@ iq2000_cgen_extract_operand (CGEN_CPU_DESC cd,
{
long value;
length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 15, 16, 32, total_length, pc, & value);
- value = ((((value) << (2))) + (((pc) + (4))));
+ value = ((((value) * (4))) + (((pc) + (4))));
fields->f_offset = value;
}
break;