This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
ubsan: bpf: left shift cannot be represented in type 'DI' (aka 'long')
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 17 Dec 2019 16:37:57 +1030
- Subject: 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.
diff --git a/cpu/bpf.cpu b/cpu/bpf.cpu
index db2301c495..d5a8eacc05 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
--
Alan Modra
Australia Development Lab, IBM