summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorbriggs <briggs>2001-01-09 16:14:20 +0000
committerbriggs <briggs>2001-01-09 16:14:20 +0000
commit86f187294be27fb834b2ab38305f8e9a11f8d44f (patch)
tree99e3fc8b9c6bbdae42c9624fec8a2edb3e1320f7 /devel
parentacb007f97c187b4227de039b8829f9ecca1e3f72 (diff)
downloadpkgsrc-86f187294be27fb834b2ab38305f8e9a11f8d44f.tar.gz
Add support for the PowerPC.
Diffstat (limited to 'devel')
-rw-r--r--devel/unproven-pthreads/Makefile4
-rw-r--r--devel/unproven-pthreads/files/patch-sum9
-rw-r--r--devel/unproven-pthreads/patches/patch-ai14
-rw-r--r--devel/unproven-pthreads/patches/patch-aj16
-rw-r--r--devel/unproven-pthreads/patches/patch-ak18
-rw-r--r--devel/unproven-pthreads/patches/patch-al140
-rw-r--r--devel/unproven-pthreads/patches/patch-am211
-rw-r--r--devel/unproven-pthreads/patches/patch-an190
-rw-r--r--devel/unproven-pthreads/patches/patch-ao50
9 files changed, 649 insertions, 3 deletions
diff --git a/devel/unproven-pthreads/Makefile b/devel/unproven-pthreads/Makefile
index d6951484a5f..4bd9d139ccd 100644
--- a/devel/unproven-pthreads/Makefile
+++ b/devel/unproven-pthreads/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.18 2000/12/28 03:56:52 wiz Exp $
+# $NetBSD: Makefile,v 1.19 2001/01/09 16:14:20 briggs Exp $
#
DISTNAME= unproven-pthreads-0.17
@@ -10,7 +10,7 @@ MAINTAINER= explorer@netbsd.org
#ONLY_FOR_PLATFORM= NetBSD-*-sparc
ONLY_FOR_PLATFORM= NetBSD-*-alpha NetBSD-*-arm32 NetBSD-*-i386 \
- NetBSD-*-m68k
+ NetBSD-*-m68k NetBSD-*-powerpc
CONFLICTS+= mit-pthreads-*
HAS_CONFIGURE= yes
diff --git a/devel/unproven-pthreads/files/patch-sum b/devel/unproven-pthreads/files/patch-sum
index 75605206be4..36589883507 100644
--- a/devel/unproven-pthreads/files/patch-sum
+++ b/devel/unproven-pthreads/files/patch-sum
@@ -1,4 +1,4 @@
-$NetBSD: patch-sum,v 1.5 2000/12/28 03:56:53 wiz Exp $
+$NetBSD: patch-sum,v 1.6 2001/01/09 16:14:20 briggs Exp $
MD5 (patch-aa) = c22d3df041130ba62d48208de1f281c5
MD5 (patch-ab) = 1e5276b89be447be4bb0983f6be81569
@@ -8,3 +8,10 @@ MD5 (patch-ae) = 7766b977f14b40509b56ac14ee0b767f
MD5 (patch-af) = 6e42849e7483fa1b99871f4b274182dc
MD5 (patch-ag) = c004c08ab5f156eb66f747c4f56d004d
MD5 (patch-ah) = 8ab61f9ea67a6dd50e6af66f4ca07c5d
+MD5 (patch-ai) = 77f44d15c0a3a0a83e50443e0105c52c
+MD5 (patch-aj) = 441a7e4d630f1aacd405a4c8f28aca03
+MD5 (patch-ak) = bc07a9d4237009d3f327a62047633041
+MD5 (patch-al) = ec6839839009fb5897f3dd0dc94c3eeb
+MD5 (patch-am) = 1535b6eb6ffa7af13cdb16b9d5b3e4fc
+MD5 (patch-an) = 249de01870ab2895ee24ba84a7884fa0
+MD5 (patch-ao) = 83e4f278aa81c2fb9a2b583514c7dde9
diff --git a/devel/unproven-pthreads/patches/patch-ai b/devel/unproven-pthreads/patches/patch-ai
new file mode 100644
index 00000000000..e8c18792397
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-ai
@@ -0,0 +1,14 @@
+$NetBSD: patch-ai,v 1.1 2001/01/09 16:14:20 briggs Exp $
+
+--- config/config.guess.orig Sat Nov 6 18:32:27 1999
++++ config/config.guess Mon Jan 8 23:02:15 2001
+@@ -292,7 +292,8 @@
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:NetBSD:*:*)
+- echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
++ UNAME_PROCESSOR=`uname -p 2>/dev/null` || UNAME_PROCESSOR=$UNAME_MACHINE
++ echo ${UNAME_PROCESSOR}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
diff --git a/devel/unproven-pthreads/patches/patch-aj b/devel/unproven-pthreads/patches/patch-aj
new file mode 100644
index 00000000000..2c30b16f340
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-aj
@@ -0,0 +1,16 @@
+$NetBSD: patch-aj,v 1.1 2001/01/09 16:14:20 briggs Exp $
+
+--- config/configure.orig Mon Jan 8 17:43:59 2001
++++ config/configure Mon Jan 8 23:15:28 2001
+@@ -1161,6 +1161,11 @@
+ except="fork lseek ftruncate pipe fstat"
+ available_syscalls="sigsuspend sigaction sigprocmask"
+ ;;
++ powerpc-*-netbsd1.*)
++ name=powerpc-netbsd
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigprocmask sigaction sigsuspend"
++ ;;
+ sparc-*-netbsd1.4*)
+ name=sparc-netbsd-1.3
+ except="fork lseek ftruncate pipe fstat"
diff --git a/devel/unproven-pthreads/patches/patch-ak b/devel/unproven-pthreads/patches/patch-ak
new file mode 100644
index 00000000000..7311805f4ae
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-ak
@@ -0,0 +1,18 @@
+$NetBSD: patch-ak,v 1.1 2001/01/09 16:14:21 briggs Exp $
+
+--- config/configure.in.orig Mon Jan 8 17:43:57 2001
++++ config/configure.in Mon Jan 8 23:15:34 2001
+@@ -97,6 +97,13 @@
+ ;;
+ changequote([,])dnl
+ changequote(,)dnl
++ powerpc-*-netbsd1.*)
++ name=powerpc-netbsd
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigprocmask sigaction sigsuspend"
++ ;;
++changequote([,])dnl
++changequote(,)dnl
+ sparc-*-netbsd1.4*)
+ name=sparc-netbsd-1.3
+ except="fork lseek ftruncate pipe fstat"
diff --git a/devel/unproven-pthreads/patches/patch-al b/devel/unproven-pthreads/patches/patch-al
new file mode 100644
index 00000000000..47cb7dec07c
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-al
@@ -0,0 +1,140 @@
+$NetBSD: patch-al,v 1.1 2001/01/09 16:14:21 briggs Exp $
+
+--- /dev/null Wed Dec 31 19:00:00 1969
++++ machdep/engine-powerpc-netbsd.c Tue Jan 9 10:43:05 2001
+@@ -0,0 +1,135 @@
++/* ==== machdep.c ============================================================
++ * Copyright (c) 1993, 1994 Chris Provenzano, proven@athena.mit.edu
++ *
++ * Description : Machine dependent functions for NetBSD/PowerPC (1.5+)
++ *
++ * 1.00 93/08/04 proven
++ * -Started coding this file.
++ *
++ * 2001/01/10 briggs
++ * -Modified to make it go with NetBSD/PowerPC
++ */
++
++#ifndef lint
++static const char rcsid[] = "engine-alpha-osf1.c,v 1.4.4.1 1995/12/13 05:41:37 proven Exp";
++#endif
++
++#include <pthread.h>
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <sys/syscall.h>
++#include <stdlib.h>
++#include <fcntl.h>
++#include <stdio.h>
++
++/* ==========================================================================
++ * machdep_pthread_start()
++ */
++void machdep_pthread_start(void)
++{
++ context_switch_done();
++ pthread_sched_resume ();
++
++ /* XXXMLG
++ * This is EXTREMELY bogus, but it seems that this function is called
++ * with the pthread kernel locked. If this happens, __errno() will
++ * return the wrong address until after the first context switch.
++ *
++ * Clearly there is a leak of pthread_kernel somewhere, but until
++ * it is found, we force a context switch here, just before calling
++ * the thread start routine. When we return from pthread_yield
++ * the kernel will be unlocked.
++ */
++ pthread_yield();
++
++ /* Run current threads start routine with argument */
++ pthread_exit(pthread_run->machdep_data.start_routine
++ (pthread_run->machdep_data.start_argument));
++
++ /* should never reach here */
++ PANIC("setitimer failed");
++}
++
++/* ==========================================================================
++ * __machdep_pthread_create()
++ */
++void __machdep_pthread_create(struct machdep_pthread *machdep_pthread,
++ void *(* start_routine)(void *), void *start_argument,
++ long stack_size, long nsec, long flags)
++{
++ machdep_pthread->start_routine = start_routine;
++ machdep_pthread->start_argument = start_argument;
++
++ machdep_pthread->machdep_timer.it_value.tv_sec = 0;
++ machdep_pthread->machdep_timer.it_interval.tv_sec = 0;
++ machdep_pthread->machdep_timer.it_interval.tv_usec = 0;
++ machdep_pthread->machdep_timer.it_value.tv_usec = nsec / 1000;
++
++ /* Set up new stack frame so that it looks like it returned from a
++ longjmp() to the beginning of machdep_pthread_start(). */
++ /* state is sigmask, then r8-r31 where r11 is the LR
++ * So, istate[3] is r10, which is the SP
++ * So, istate[4] is r11, which is the LR
++ * So, istate[5] is r12, which is the CR
++ */
++ machdep_pthread->machdep_istate[4] = (long)machdep_pthread_start;
++ machdep_pthread->machdep_istate[5] = 0;
++
++ /* PowerPC stack starts high and builds down, and needs to be 16-byte
++ aligned. */
++ machdep_pthread->machdep_istate[3] =
++ ((long) machdep_pthread->machdep_stack + stack_size) & ~0xf;
++}
++
++/* ==========================================================================
++ * machdep_save_state()
++ */
++int machdep_save_state(void)
++{
++ return( _setjmp(pthread_run->machdep_data.machdep_istate) );
++}
++
++void machdep_restore_state(void)
++{
++ _longjmp(pthread_run->machdep_data.machdep_istate, 1);
++}
++
++void machdep_save_float_state (struct pthread *pthread)
++{
++ __machdep_save_fp_state(pthread->machdep_data.machdep_fstate);
++}
++
++void machdep_restore_float_state (void)
++{
++ __machdep_restore_fp_state(pthread_run->machdep_data.machdep_fstate);
++}
++
++/* ==========================================================================
++ * machdep_set_thread_timer()
++ */
++void machdep_set_thread_timer(struct machdep_pthread *machdep_pthread)
++{
++ if (setitimer(ITIMER_VIRTUAL, &(machdep_pthread->machdep_timer), NULL)) {
++ PANIC("setitimer failed");
++ }
++}
++
++/* ==========================================================================
++ * machdep_unset_thread_timer()
++ */
++void machdep_unset_thread_timer(struct machdep_pthread *machdep_pthread)
++{
++ struct itimerval zeroval = { { 0, 0 }, { 0, 0} };
++
++ if (setitimer(ITIMER_VIRTUAL, &zeroval, NULL)) {
++ PANIC("setitimer failed");
++ }
++}
++
++/* ==========================================================================
++ * machdep_pthread_cleanup()
++ */
++void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread)
++{
++ return(machdep_pthread->machdep_stack);
++}
diff --git a/devel/unproven-pthreads/patches/patch-am b/devel/unproven-pthreads/patches/patch-am
new file mode 100644
index 00000000000..c1fe579e1a4
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-am
@@ -0,0 +1,211 @@
+$NetBSD: patch-am,v 1.1 2001/01/09 16:14:21 briggs Exp $
+
+--- /dev/null Wed Dec 31 19:00:00 1969
++++ machdep/engine-powerpc-netbsd.h Tue Jan 9 02:42:26 2001
+@@ -0,0 +1,206 @@
++/* ==== machdep.h ============================================================
++ * Copyright (c) 1994 Chris Provenzano (proven@athena.mit.edu) and
++ * Ken Raeburn (raeburn@mit.edu).
++ *
++ * engine-alpha-osf1.h,v 1.4.4.1 1995/12/13 05:41:42 proven Exp
++ *
++ */
++
++#include <unistd.h>
++#include <setjmp.h>
++#include <sys/time.h>
++#include <sys/cdefs.h>
++#include <sys/signal.h> /* for _NSIG */
++#include <sys/syscall.h>
++
++#include <unistd.h>
++#include <setjmp.h>
++#include <stdlib.h>
++#include <fcntl.h>
++
++#include <pthread/sysfunc.h>
++
++/*
++ * The first machine dependent functions are the SEMAPHORES
++ * needing the test and set instruction.
++ */
++#define SEMAPHORE_CLEAR 0
++#define SEMAPHORE_SET 0xffff
++
++#define SEMAPHORE_TEST_AND_SET(lock) \
++({ \
++ volatile long t1, temp = SEMAPHORE_SET; \
++ __asm__ volatile( \
++ "1: lwarx %0,0,%1; \
++ cmpwi %0, 0; \
++ bne 2f; \
++ stwcx. %2,0,%1; \
++ bne- 1b; \
++ 2: " \
++ :"=r" (t1) \
++ :"m" (lock), "r" (temp)); \
++ t1; \
++})
++
++#define SEMAPHORE_RESET(lock) *lock = SEMAPHORE_CLEAR
++
++/*
++ * New types
++ */
++typedef int semaphore;
++
++/*
++ * sigset_t macros
++ */
++#define SIG_ANY(sig) (sig)
++#define SIGMAX (_NSIG-1)
++
++/*
++ * New Strutures
++ */
++struct machdep_pthread {
++ void *(*start_routine)(void *);
++ void *start_argument;
++ void *machdep_stack;
++ struct itimerval machdep_timer;
++ jmp_buf machdep_istate;
++ unsigned long machdep_fstate[66];
++ /* 64-bit fp regs 0-31 + fpscr */
++ /* We pretend the fpscr is 64 bits */
++};
++
++/*
++ * Static machdep_pthread initialization values.
++ * For initial thread only.
++ */
++#define MACHDEP_PTHREAD_INIT \
++ { NULL, NULL, NULL, { { 0, 0 }, { 0, 100000 } }, { 0 }, { 0 } }
++
++/*
++ * Minimum stack size
++ */
++#define PTHREAD_STACK_MIN 2048
++
++/*
++ * Some fd flag defines that are necessary to distinguish between posix
++ * behavior and bsd4.3 behavior.
++ */
++#define __FD_NONBLOCK O_NONBLOCK
++
++/*
++ * New functions
++ */
++
++__BEGIN_DECLS
++
++#if defined(PTHREAD_KERNEL)
++
++#define __machdep_stack_get(x) (x)->machdep_stack
++#define __machdep_stack_set(x, y) (x)->machdep_stack = y
++#define __machdep_stack_repl(x, y) \
++{ \
++ if ((stack = __machdep_stack_get(x))) { \
++ __machdep_stack_free(stack); \
++ } \
++ __machdep_stack_set(x, y); \
++}
++
++int machdep_save_state(void);
++
++void __machdep_save_fp_state(unsigned long *);
++void __machdep_restore_fp_state(unsigned long *);
++
++void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread);
++void machdep_pthread_start(void);
++
++/* ==========================================================================
++ * __machdep_stack_free()
++ */
++inline static
++void __machdep_stack_free(void * stack)
++{
++ free(stack);
++}
++
++/* ==========================================================================
++ * __machdep_stack_alloc()
++ */
++inline static
++void * __machdep_stack_alloc(size_t size)
++{
++ return(malloc(size));
++}
++
++/* ==========================================================================
++ * machdep_sys_creat()
++ */
++static inline int
++machdep_sys_creat(char * path, int mode)
++{
++ return(machdep_sys_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode));
++}
++
++/* ==========================================================================
++ * machdep_sys_wait3()
++ */
++static inline int
++machdep_sys_wait3(int * b, int c, struct rusage *d)
++{
++ return(machdep_sys_wait4(0, b, c, d));
++}
++
++/* ==========================================================================
++ * machdep_sys_waitpid()
++ */
++static inline int
++machdep_sys_waitpid(int a, int * b, int c)
++{
++ return(machdep_sys_wait4(a, b, c, NULL));
++}
++
++/* ==========================================================================
++ * machdep_sys_getdtablesize()
++ */
++static inline int
++machdep_sys_getdtablesize(void)
++{
++ return(sysconf(_SC_OPEN_MAX));
++}
++
++/* ==========================================================================
++ * machdep_sys_lseek()
++ */
++static inline
++off_t machdep_sys_lseek(int fd, off_t offset, int whence)
++{
++ return(__syscall((quad_t)SYS_lseek, fd, 0, offset, whence));
++}
++
++static inline
++int machdep_sys_ftruncate( int fd, off_t length)
++{
++ quad_t q;
++ int rv;
++
++ q = __syscall((quad_t)SYS_ftruncate, fd,0, length);
++ if( /* LINTED constant */ sizeof( quad_t ) == sizeof( register_t ) ||
++ /* LINTED constant */ BYTE_ORDER == LITTLE_ENDIAN )
++ rv = (int)q;
++ else
++ rv = (int)((u_quad_t)q >> 32);
++
++ return rv;
++}
++
++
++/* ==========================================================================
++ * machdep_sys_getdirentries()
++ */
++static inline int
++machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
++{
++ return(machdep_sys_getdents(fd, buf, len));
++}
++#endif
++
++__END_DECLS
diff --git a/devel/unproven-pthreads/patches/patch-an b/devel/unproven-pthreads/patches/patch-an
new file mode 100644
index 00000000000..bba10d18944
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-an
@@ -0,0 +1,190 @@
+$NetBSD: patch-an,v 1.1 2001/01/09 16:14:22 briggs Exp $
+
+--- /dev/null Wed Dec 31 19:00:00 1969
++++ machdep/syscall-powerpc-netbsd.S Tue Jan 9 10:42:07 2001
+@@ -0,0 +1,185 @@
++#include <machine/asm.h>
++#define COMPAT_43
++#include <sys/syscall.h>
++#ifndef __CONCAT
++#include <sys/cdefs.h>
++#endif
++#define CONCAT __CONCAT
++
++#undef SYSCALL
++
++/* Kernel syscall interface:
++ Input:
++ 0 - system call number
++ 3-8 - arguments, as in C
++ Output:
++ so - (summary overflow) clear iff successful
++
++ This macro is similar to SYSCALL in asm.h, but not completely.
++ There's room for optimization, if we assume this will continue to
++ be assembled as one file.
++
++ This macro expansions does not include the return instruction.
++ If there's no other work to be done, use something like:
++ SYSCALL(foo) ; ret
++ If there is other work to do (in fork, maybe?), do it after the
++ SYSCALL invocation. */
++
++ENTRY(machdep_cerror)
++ mflr 0 # Save LR in 0
++ stwu 1,-16(1) # allocate new stack frame
++ stw 0,20(1) # Stash 0 in stack
++ stw 31,8(1) # Stash 31 in stack (since it's callee-saved
++ mr 31,3 # and we stash return there)
++ bl PIC_PLT(_C_LABEL(__errno))
++ stw 31,0(3) # *errno() = err
++ lwz 0,20(1) # Restore LR from stack to 0
++ neg 3,31 # return -errno to 3
++ lwz 31,8(1) # Restore 31 from stack
++ mtlr 0
++ la 1,16(1) # Restore stack frame
++ li 4,-1 # Put -1 in r4 for those syscalls that return
++ blr # two values
++
++/* The fork system call is special... */
++ENTRY(machdep_sys_fork)
++ li 0, SYS_fork
++ sc
++ bso _C_LABEL(machdep_cerror)
++ addi 4,4,-1
++ blr
++
++/* The pipe system call is special... */
++ENTRY(machdep_sys_pipe)
++ mr 5,3
++ li 0,SYS_pipe
++ sc
++ bso _C_LABEL(machdep_cerror)
++ stw 3,0(5) # Success, store fds
++ stw 4,4(5)
++ li 3,0
++ blr # And return 0
++
++#ifndef SYS___sigsuspend14
++/* The sigsuspend system call is special... */
++ENTRY(machdep_sys_sigsuspend)
++ lwz 3,0(3)
++ li 0,SYS_compat_13_sigsuspend13
++ sc
++ b _C_LABEL(machdep_cerror)
++#endif /* SYS_sigsuspend14 */
++
++#ifndef SYS___sigprocmask14
++/* The sigprocmask system call is special... */
++ENTRY(machdep_sys_sigprocmask)
++ or. 4,4,4 # Set == NULL ?
++ li 6,1 # how = SIG_BLOCK
++ beq Ldoit
++ lwz 4,0(4) # if not, replace it in r4 with #set
++ mr 6,3
++Ldoit: mr 3,6 # ... using sigprocmask(SIG_BLOCK)
++ li 0,SYS_compat_13_sigprocmask13
++ sc
++ bso _C_LABEL(machdep_cerror)
++ or. 5,5,5 # Check to see if oset requested
++ beq Ldone # if oset != NULL
++ stw 3,0(5) # *oset = oldmask
++Ldone:
++ li 3,0 # return 0
++ blr
++#endif /* SYS_sigprocmask14 */
++
++/* More stuff ... */
++
++/* For fstat() we actually syscall fstat13. */
++ENTRY(machdep_sys_fstat)
++ li 0, SYS___fstat13
++ sc
++ bnslr
++ b _C_LABEL(machdep_cerror)
++
++/* Do we need to save the entire floating point state? I think so... */
++ENTRY(__machdep_save_fp_state)
++ stwu 1,-8(1)
++ stw 3,4(1)
++ stfd 0,0(3)
++ stfdu 1,8(3)
++ stfdu 2,8(3)
++ stfdu 3,8(3)
++ stfdu 4,8(3)
++ stfdu 5,8(3)
++ stfdu 6,8(3)
++ stfdu 7,8(3)
++ stfdu 8,8(3)
++ stfdu 9,8(3)
++ stfdu 10,8(3)
++ stfdu 11,8(3)
++ stfdu 12,8(3)
++ stfdu 13,8(3)
++ stfdu 14,8(3)
++ stfdu 15,8(3)
++ stfdu 16,8(3)
++ stfdu 17,8(3)
++ stfdu 18,8(3)
++ stfdu 19,8(3)
++ stfdu 20,8(3)
++ stfdu 21,8(3)
++ stfdu 22,8(3)
++ stfdu 23,8(3)
++ stfdu 24,8(3)
++ stfdu 25,8(3)
++ stfdu 26,8(3)
++ stfdu 27,8(3)
++ stfdu 28,8(3)
++ stfdu 29,8(3)
++ stfdu 30,8(3)
++ stfdu 31,8(3)
++ mffs 0
++ stfdu 0,8(3)
++ lwz 3,4(1)
++ lwz 1,0(1)
++ blr
++
++ENTRY(__machdep_restore_fp_state)
++ stwu 1,-12(1)
++ stw 3,4(1)
++ stw 4,8(1)
++ mr 4,3
++ lfdu 1,8(3)
++ lfdu 2,8(3)
++ lfdu 3,8(3)
++ lfdu 4,8(3)
++ lfdu 5,8(3)
++ lfdu 6,8(3)
++ lfdu 7,8(3)
++ lfdu 8,8(3)
++ lfdu 9,8(3)
++ lfdu 10,8(3)
++ lfdu 11,8(3)
++ lfdu 12,8(3)
++ lfdu 13,8(3)
++ lfdu 14,8(3)
++ lfdu 15,8(3)
++ lfdu 16,8(3)
++ lfdu 17,8(3)
++ lfdu 18,8(3)
++ lfdu 19,8(3)
++ lfdu 20,8(3)
++ lfdu 21,8(3)
++ lfdu 22,8(3)
++ lfdu 23,8(3)
++ lfdu 24,8(3)
++ lfdu 25,8(3)
++ lfdu 26,8(3)
++ lfdu 27,8(3)
++ lfdu 28,8(3)
++ lfdu 29,8(3)
++ lfdu 30,8(3)
++ lfdu 31,8(3)
++ lfdu 0,8(3)
++ mtfsf 127,0
++ lfd 0,0(4)
++ lwz 3,4(1)
++ lwz 4,8(1)
++ lwz 1,0(1)
++ blr
diff --git a/devel/unproven-pthreads/patches/patch-ao b/devel/unproven-pthreads/patches/patch-ao
new file mode 100644
index 00000000000..cc58ed16c2a
--- /dev/null
+++ b/devel/unproven-pthreads/patches/patch-ao
@@ -0,0 +1,50 @@
+$NetBSD: patch-ao,v 1.1 2001/01/09 16:14:22 briggs Exp $
+
+--- /dev/null Wed Dec 31 19:00:00 1969
++++ machdep/syscall-template-powerpc-netbsd.S Tue Jan 9 00:01:33 2001
+@@ -0,0 +1,45 @@
++#include <machine/asm.h>
++#define COMPAT_43
++#include <sys/syscall.h>
++
++#ifdef SYS___sigsuspend14
++#define SYS_sigsuspend SYS___sigsuspend14
++#endif
++
++#ifdef SYS___sigaction14
++#define SYS_sigaction SYS___sigaction14
++#endif
++
++#ifdef SYS___sigprocmask14
++#define SYS_sigprocmask SYS___sigprocmask14
++#endif
++
++#undef SYSCALL
++
++/* Kernel syscall interface:
++ Input:
++ 0 - system call number
++ 3-8 - arguments, as in C
++ Output:
++ so - (summary overflow) clear iff successful
++
++ This macro is similar to SYSCALL in asm.h, but not completely.
++ There's room for optimization, if we assume this will continue to
++ be assembled as one file.
++
++ This macro expansions does not include the return instruction.
++ If there's no other work to be done, use something like:
++ SYSCALL(foo) ; ret
++ If there is other work to do (in fork, maybe?), do it after the
++ SYSCALL invocation. */
++
++#define SYSCALL(x) \
++ ENTRY(machdep_sys_ ## x) \
++ li 0, SYS_ ## x ; \
++ sc ; \
++ bnslr ; \
++ b PIC_PLT(_C_LABEL(machdep_cerror))
++
++#define XSYSCALL(x) SYSCALL(x) ; blr
++
++ XSYSCALL(SYSCALL_NAME)