]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - sim/m32r/traps.c
sim: m32r: fixup some of the int<->pointer casts
authorMike Frysinger <vapier@gentoo.org>
Thu, 11 Jan 2024 03:25:51 +0000 (22:25 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 11 Jan 2024 03:37:03 +0000 (22:37 -0500)
commit08a7937f3a7301254e0ee98a93d94010e4ce5c5a
treea811637e83fc126ccfd8ee86927d7ff9d21d9390
parentdbd4aebe5ba95f95735e333e5483ad4a80726a08
sim: m32r: fixup some of the int<->pointer casts

The m32r trap code was written for a 32-bit Linux host (and really, one
whose Linux ABI matched pretty exactly).  This has lead to conversions
between integers and pointers which breaks down hard on 64-bit hosts.

Clean up some of the functions where possible to avoid unnecessary
conversions, use uintptr_t to cast 32-bit target pointers to host
pointers in some places, and just stub out a few functions that can't
easily be salvaged currently when sizeof(void*) is not 32-bits.  This
is a bit ugly, but lets us enable warnings for the whole file.
sim/config.h.in
sim/configure
sim/m32r/traps.c
sim/m4/sim_ac_platform.m4