Fix multiple ubsan warnings in i386-dis.c
authorAlan Modra <amodra@gmail.com>
Sat, 7 May 2022 07:40:53 +0000 (17:10 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 7 May 2022 08:02:25 +0000 (17:32 +0930)
commit69464d2267c47e91f9ba77726c745d82b8864c88
treed29006051fce81a4d5d5d959bbe831da289ed997
parent5a91f93b983184c64b3a9332f5f4339d17941d76
Fix multiple ubsan warnings in i386-dis.c

Commit 39fb369834a3 "opcodes: Make i386-dis.c thread-safe" introduced
a number of casts to bfd_signed_vma that cause undefined behaviour
with a 32-bit libbfd.  Revert those changes.

* i386-dis.c (OP_E_memory): Do not cast disp to bfd_signed_vma
for negation.
(get32, get32s): Don't use bfd_signed_vma here.
opcodes/i386-dis.c