aboutsummaryrefslogtreecommitdiff
path: root/opcodes
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
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')
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/iq2000-ibld.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 1c5592a..c3a9752 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,9 @@
2019-12-23 Alan Modra <amodra@gmail.com>
+ * iq2000-ibld.c: Regenerate.
+
+2019-12-23 Alan Modra <amodra@gmail.com>
+
* d30v-dis.c (extract_value): Make num param a uint64_t, constify
oper. Use unsigned vars.
(print_insn): Make num var uint64_t. Constify oper and remove now
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;