ubsan: h8300: left shift cannot be represented in type 'int'
authorAlan Modra <amodra@gmail.com>
Tue, 10 Dec 2019 13:23:57 +0000 (23:53 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 11 Dec 2019 01:09:25 +0000 (11:39 +1030)
commitf8a87c78e671b6e89c1d6dccdb2f99a34ddc23be
treeba4cfe8e96d39b324ab7dccb454cf320ba296923
parent159653d8c0bcc45b479e4329c2e5f304fa942280
ubsan: h8300: left shift cannot be represented in type 'int'

This is
  *cst = (data[0] << 24) + (data[1] << 16) + (data[2] << 8) + data[3];
data is unsigned char which promotes to int.

* h8300-dis.c (extract_immediate): Avoid signed overflow.
(bfd_h8_disassemble): Likewise.
opcodes/ChangeLog
opcodes/h8300-dis.c