PowerPC Linux support from ericvh.

Mainly adding va_copy/va_end.
Also fix bug in sprint wrapping
around top of memory.
This commit is contained in:
rsc 2004-08-22 15:39:56 +00:00
parent c8c0df440f
commit 984e353160
16 changed files with 54 additions and 17 deletions

View file

@ -40,6 +40,21 @@ struct Label
ulong sp; /* %o6 */
ulong link; /* %o7 */
};
#elif defined(__powerpc__)
struct Label
{
ulong pc; /* lr */
ulong cr; /* mfcr */
ulong ctr; /* mfcr */
ulong xer; /* mfcr */
ulong sp; /* callee saved: r1 */
ulong toc; /* callee saved: r2 */
ulong gpr[19]; /* callee saved: r13-r31 */
// XXX: currently do not save vector registers or floating-point state
// ulong pad;
// uvlong fpr[18]; /* callee saved: f14-f31 */
// ulong vr[4*12]; /* callee saved: v20-v31, 256-bits each */
};
#else
#error "Unknown or unsupported architecture"
#endif

View file

@ -53,6 +53,7 @@ trend: trend.$O $PLAN9/lib/$LIB
CLEANFILES=$CLEANFILES tprimes texec
asm-Linux-ppc.$O: asm-Linux-386.s
asm-Linux-386.$O: asm-FreeBSD-386.s
asm-NetBSD-386.$O: asm-FreeBSD-386.s
asm-OpenBSD-386.$O: asm-FreeBSD-386.s