PR26449, PR26450 UBSAN: frv-ibld.c:135 left shift
authorAlan Modra <amodra@gmail.com>
Fri, 28 Aug 2020 14:13:16 +0000 (23:43 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 28 Aug 2020 14:22:26 +0000 (23:52 +0930)
commita1e60a1bdce8f555f45b5f94c059d83abf883567
tree5537dd112ecf11c9b73f5e87023915a73846177a
parented2ed4dcf4ae20b9a7c38ffdf379fef383c6b8f9
PR26449, PR26450 UBSAN: frv-ibld.c:135 left shift

Eh well, I guess the code didn't quite live up to the comment.

PR 26449
PR 26450
* cgen-ibld.in (insert_1): Use 1UL in forming mask.
(extract_normal): Likewise.
(insert_normal): Likewise, and move past zero length test.
(put_insn_int_value): Handle mask for zero length, use 1UL.
* bpf-ibld.c, * epiphany-ibld.c, * fr30-ibld.c, * frv-ibld.c,
* ip2k-ibld.c, * iq2000-ibld.c, * lm32-ibld.c, * m32c-ibld.c,
* m32r-ibld.c, * mep-ibld.c, * mt-ibld.c, * or1k-ibld.c,
* xc16x-ibld.c, * xstormy16-ibld.c: Regenerate.
16 files changed:
opcodes/ChangeLog
opcodes/bpf-ibld.c
opcodes/cgen-ibld.in
opcodes/epiphany-ibld.c
opcodes/fr30-ibld.c
opcodes/frv-ibld.c
opcodes/ip2k-ibld.c
opcodes/iq2000-ibld.c
opcodes/lm32-ibld.c
opcodes/m32c-ibld.c
opcodes/m32r-ibld.c
opcodes/mep-ibld.c
opcodes/mt-ibld.c
opcodes/or1k-ibld.c
opcodes/xc16x-ibld.c
opcodes/xstormy16-ibld.c