mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-01 13:26:47 +08:00
ubsan: xtensa: left shift cannot be represented in type 'int'
* xtensa-isa.c (xtensa_insnbuf_from_chars): Avoid signed overflow.
This commit is contained in:
parent
15d2859fdd
commit
e76832f125
@ -1,3 +1,7 @@
|
||||
2019-12-20 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* xtensa-isa.c (xtensa_insnbuf_from_chars): Avoid signed overflow.
|
||||
|
||||
2019-12-20 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* libhppa.h (hppa_field_adjust, bfd_hppa_insn2fmt): Delete forward
|
||||
|
@ -223,7 +223,7 @@ xtensa_insnbuf_from_chars (xtensa_isa isa,
|
||||
int word_inx = byte_to_word_index (i);
|
||||
int bit_inx = byte_to_bit_index (i);
|
||||
|
||||
insn[word_inx] |= (*cp & 0xff) << bit_inx;
|
||||
insn[word_inx] |= (unsigned) (*cp & 0xff) << bit_inx;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user