diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-02 10:44:32 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-02 16:30:44 +0930 |
commit | caf4537af57320ce15c66d61e4db91073b715236 (patch) | |
tree | 119d7fa4d28644e55dd4af1a4fdeb286b33e32b1 /opcodes | |
parent | 3c5097eae4a9a7e09b67bb3e1713c16ccef5faeb (diff) | |
download | gdb-caf4537af57320ce15c66d61e4db91073b715236.zip gdb-caf4537af57320ce15c66d61e4db91073b715236.tar.gz gdb-caf4537af57320ce15c66d61e4db91073b715236.tar.bz2 |
ubsan: csky-dis.c:1038 left shift cannot be represented
* csky-dis.c (print_insn_csky): Use unsigned type for "given".
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 4 | ||||
-rw-r--r-- | opcodes/csky-dis.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index d89ad9d..20ff6c0 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,5 +1,9 @@ 2020-09-02 Alan Modra <amodra@gmail.com> + * csky-dis.c (print_insn_csky): Use unsigned type for "given". + +2020-09-02 Alan Modra <amodra@gmail.com> + * crx-dis.c: Whitespace. (print_arg): Use unsigned type for longdisp and mask variables, and for left shift constant. diff --git a/opcodes/csky-dis.c b/opcodes/csky-dis.c index 09eed4b..f815679 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; |