From caf4537af57320ce15c66d61e4db91073b715236 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 2 Sep 2020 10:44:32 +0930 Subject: [PATCH] ubsan: csky-dis.c:1038 left shift cannot be represented * csky-dis.c (print_insn_csky): Use unsigned type for "given". --- opcodes/ChangeLog | 4 ++++ opcodes/csky-dis.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index d89ad9dd9a4..20ff6c0bb04 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2020-09-02 Alan Modra + + * csky-dis.c (print_insn_csky): Use unsigned type for "given". + 2020-09-02 Alan Modra * crx-dis.c: Whitespace. diff --git a/opcodes/csky-dis.c b/opcodes/csky-dis.c index 09eed4b8253..f815679e37b 100644 --- a/opcodes/csky-dis.c +++ b/opcodes/csky-dis.c @@ -944,7 +944,7 @@ print_insn_csky (bfd_vma memaddr, struct disassemble_info *info) CSKY_INST_TYPE inst = 0; int status; char str[256]; - long given; + unsigned long given; int is_data = FALSE; void (*printer) (bfd_vma, struct disassemble_info *, long); unsigned int size = 4; -- 2.30.2