Files
binutils-gdb/sim
Mike Frysinger dcc6c863ed sim: ppc: switch register read/writes to union to avoid aliasing issues
This code creates a small buffer on the stack w/alloca, then proceeds to
write to it with a cast to a pointer type based on the register type, then
reads from it with a cast to a pointer type based on the register size.
gcc will flags only one of these lines as "maybe used uninitialized", but
it seems to track back to this memory abuse.

Create a large union with all the possible types that this code will read
or write as, and then use those.  It's a bit ugly, but is probably better
than using raw memcpy's everywhere.
2024-01-18 01:46:27 -05:00
..
2024-01-12 21:48:25 +02:00