aboutsummaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-12-17 14:26:39 +1030
committerAlan Modra <amodra@gmail.com>2019-12-17 14:32:23 +1030
commit62e6599087efba193e0156d89ee65fb74fc99cb2 (patch)
treee6316a78fdde602c597410a4dfa4b09815c6724a /cpu
parent45d735237b7edf282131d570a7a9f6aa9ee1bd9c (diff)
downloadgdb-62e6599087efba193e0156d89ee65fb74fc99cb2.zip
gdb-62e6599087efba193e0156d89ee65fb74fc99cb2.tar.gz
gdb-62e6599087efba193e0156d89ee65fb74fc99cb2.tar.bz2
ubsan: bpf: left shift cannot be represented in type 'DI' (aka 'long')
cpu/ * bpf.cpu (f-imm64): Avoid signed overflow. opcodes/ * bpf-ibld.c: Regenerate.
Diffstat (limited to 'cpu')
-rw-r--r--cpu/ChangeLog4
-rw-r--r--cpu/bpf.cpu4
2 files changed, 6 insertions, 2 deletions
diff --git a/cpu/ChangeLog b/cpu/ChangeLog
index 688c596..8755ee7 100644
--- a/cpu/ChangeLog
+++ b/cpu/ChangeLog
@@ -1,3 +1,7 @@
+2019-12-17 Alan Modra <amodra@gmail.com>
+
+ * bpf.cpu (f-imm64): Avoid signed overflow.
+
2019-12-16 Alan Modra <amodra@gmail.com>
* xstormy16.cpu (f-rel12a): Avoid signed overflow.
diff --git a/cpu/bpf.cpu b/cpu/bpf.cpu
index db2301c..d5a8eac 100644
--- a/cpu/bpf.cpu
+++ b/cpu/bpf.cpu
@@ -288,8 +288,8 @@
(set (ifield f-imm64-a) (and (ifield f-imm64) (const #xffffffff)))))
(extract (sequence ()
(set (ifield f-imm64)
- (or (sll DI (zext DI (ifield f-imm64-c)) (const 32))
- (zext DI (ifield f-imm64-a)))))))
+ (or (sll UDI (zext UDI (ifield f-imm64-c)) (const 32))
+ (zext UDI (ifield f-imm64-a)))))))
;;; Operands