* defs.h [POWERPC] (UESP, EIP, EAX, ORIG_EAX): Remove this cruft.
[LINUX && POWERPC && !__powerpc64__] (ALIGN64): New macro.
* io.c (sys_pread, sys_pwrite): Use ALIGN64.
From Anton Blanchard <anton@samba.org>.
#define __KERNEL__
#include <asm/ptrace.h>
#undef __KERNEL__
#define __KERNEL__
#include <asm/ptrace.h>
#undef __KERNEL__
-/* TEMP */
-#define UESP PT_R1
-#define EIP PT_NIP
-#define EAX PT_R3
-#define ORIG_EAX PT_ORIG_R3
#endif
#ifdef __STDC__
#ifdef LINUX
#endif
#ifdef __STDC__
#ifdef LINUX
memmove (&tcp->u_arg[arg], &tcp->u_arg[arg + 1], \
(tcp->u_nargs - arg - 1) * sizeof tcp->u_arg[0]); \
} while (0)
memmove (&tcp->u_arg[arg], &tcp->u_arg[arg + 1], \
(tcp->u_nargs - arg - 1) * sizeof tcp->u_arg[0]); \
} while (0)
+#elif defined(LINUX) && defined(POWERPC) && !defined(__powerpc64__)
+#define ALIGN64(tcp,arg) \
+do { \
+ if (!(arg % 2)) \
+ memmove (&tcp->u_arg[arg], &tcp->u_arg[arg + 1], \
+ (tcp->u_nargs - arg - 1) * sizeof tcp->u_arg[0]); \
+} while (0)
#else
#define ALIGN64(tcp,arg) do { } while (0)
#endif
#else
#define ALIGN64(tcp,arg) do { } while (0)
#endif
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
+ ALIGN64 (tcp, 2); /* PowerPC alignment restriction */
tprintf(", %lu, %llu", tcp->u_arg[2],
*(unsigned long long *)&tcp->u_arg[3]);
}
tprintf(", %lu, %llu", tcp->u_arg[2],
*(unsigned long long *)&tcp->u_arg[3]);
}
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ ALIGN64 (tcp, 2); /* PowerPC alignment restriction */
tprintf(", %lu, %llu", tcp->u_arg[2],
*(unsigned long long *)&tcp->u_arg[3]);
}
tprintf(", %lu, %llu", tcp->u_arg[2],
*(unsigned long long *)&tcp->u_arg[3]);
}