on 64-bit machines, the unions in the ureg.h can lead to
internal padding. (power64 avoids this issue because everything
is 64-bit aligned anyway.) to sidestep the issue, i think
it might make sense to use #defines. for example, for arm
the conversion would look something like this:
typedef struct Ureg {
ulong r0;
ulong r1;
ulong r2;
ulong r3;
ulong r4;
ulong r5;
ulong r6;
ulong r7;
ulong r8;
ulong r9;
ulong r10;
ulong r11;
ulong r12; /* sb */
ulong r13;
#define sp r13
ulong r14;
#define link r14
ulong type; /* of exception */
ulong psr;
ulong pc; /* interrupted addr */
} Ureg;
is there any reason not to do this?
- erik