aboutsummaryrefslogtreecommitdiff
path: root/cpu/xstormy16.cpu
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-16 10:00:07 +1030
committerAlan Modra <amodra@gmail.com>2019-12-16 17:35:13 +1030
commite6ced26afd50b0d74b8ea14ca1cd62cdc5d11ae8 (patch)
treeac662714d50d455e71e8f2f73101b06c284cb7d3 /cpu/xstormy16.cpu
parent84e098cdea4eb6a5ddc525a2145ffe66475fa2af (diff)
downloadgdb-e6ced26afd50b0d74b8ea14ca1cd62cdc5d11ae8.zip
gdb-e6ced26afd50b0d74b8ea14ca1cd62cdc5d11ae8.tar.gz
gdb-e6ced26afd50b0d74b8ea14ca1cd62cdc5d11ae8.tar.bz2
ubsan: xstormy16: left shift of negative value
cpu/ * xstormy16.cpu (f-rel12a): Avoid signed overflow. opcodes/ * xstormy16-ibld.c: Regenerate.
Diffstat (limited to 'cpu/xstormy16.cpu')
-rw-r--r--cpu/xstormy16.cpu2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu/xstormy16.cpu b/cpu/xstormy16.cpu
index ae7e042..aa5a464 100644
--- a/cpu/xstormy16.cpu
+++ b/cpu/xstormy16.cpu
@@ -393,7 +393,7 @@
(length 11)
(mode INT)
(encode (value pc) (sra SI (sub SI value (add SI pc 2)) 1))
- (decode (value pc) (add SI (sll value 1) (add SI pc 2)))
+ (decode (value pc) (add SI (mul value 2) (add SI pc 2)))
)
(dnop rel12a "12 bit relative address" () h-uint f-rel12a)