summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorbriggs <briggs@pkgsrc.org>2001-01-10 01:28:45 +0000
committerbriggs <briggs@pkgsrc.org>2001-01-10 01:28:45 +0000
commitb85cfb40da376b279cf2ee41b82399a2a4225cef (patch)
tree763a86c3629e022233c6ad6fda64d8570e88a4d8 /devel
parent012a3d2d51cdeed643d785428aaafaefa8df8dde (diff)
downloadpkgsrc-b85cfb40da376b279cf2ee41b82399a2a4225cef.tar.gz
Support NetBSD-*-powerpc
Diffstat (limited to 'devel')
-rw-r--r--devel/mit-pthreads/Makefile4
-rw-r--r--devel/mit-pthreads/files/patch-sum9
-rw-r--r--devel/mit-pthreads/patches/patch-cc14
-rw-r--r--devel/mit-pthreads/patches/patch-cd17
-rw-r--r--devel/mit-pthreads/patches/patch-ce16
-rw-r--r--devel/mit-pthreads/patches/patch-cf232
-rw-r--r--devel/mit-pthreads/patches/patch-cg114
-rw-r--r--devel/mit-pthreads/patches/patch-ch190
-rw-r--r--devel/mit-pthreads/patches/patch-ci50
9 files changed, 643 insertions, 3 deletions
diff --git a/devel/mit-pthreads/Makefile b/devel/mit-pthreads/Makefile
index 91607d15620..eedea482b58 100644
--- a/devel/mit-pthreads/Makefile
+++ b/devel/mit-pthreads/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2000/03/16 12:27:04 wiz Exp $
+# $NetBSD: Makefile,v 1.29 2001/01/10 01:28:45 briggs Exp $
#
DISTNAME= pthreads-1_60_beta6
@@ -10,7 +10,7 @@ MAINTAINER= agc@netbsd.org
HOMEPAGE= http://www.mit.edu:8001/people/proven/pthreads.html
ONLY_FOR_PLATFORM= NetBSD-*-alpha NetBSD-*-arm32 NetBSD-*-i386 \
- NetBSD-*-sparc NetBSD-*-m68k
+ NetBSD-*-sparc NetBSD-*-m68k NetBSD-*-powerpc
CONFLICTS+= unproven-pthreads-*
HAS_CONFIGURE= yes
diff --git a/devel/mit-pthreads/files/patch-sum b/devel/mit-pthreads/files/patch-sum
index 8caf7991e06..96c48de605a 100644
--- a/devel/mit-pthreads/files/patch-sum
+++ b/devel/mit-pthreads/files/patch-sum
@@ -1,4 +1,4 @@
-$NetBSD: patch-sum,v 1.18 2000/11/29 16:42:57 agc Exp $
+$NetBSD: patch-sum,v 1.19 2001/01/10 01:28:50 briggs Exp $
MD5 (patch-aa) = 5af930f67e251f5eb89b5414426d2396
MD5 (patch-ab) = 9bb4e83bd91f0159a522d8bfbba89362
@@ -53,3 +53,10 @@ MD5 (patch-by) = d7a2a04c6607297c31dfa620e1c65f39
MD5 (patch-bz) = 855d85111e9d78eb4698319e1390e74f
MD5 (patch-ca) = 4266a970bb9514cda356dd1baa046e12
MD5 (patch-cb) = 1e5276b89be447be4bb0983f6be81569
+MD5 (patch-cc) = 77f44d15c0a3a0a83e50443e0105c52c
+MD5 (patch-cd) = 80e3861754c64174e3c799ef63b8f650
+MD5 (patch-ce) = c1f4412685f89d377f4d04955b590231
+MD5 (patch-cf) = 06f2bf984d0f346f91e3cb95a1c02940
+MD5 (patch-cg) = e9ab42bf814853fc58d154cf14ca03e5
+MD5 (patch-ch) = 249de01870ab2895ee24ba84a7884fa0
+MD5 (patch-ci) = 83e4f278aa81c2fb9a2b583514c7dde9
diff --git a/devel/mit-pthreads/patches/patch-cc b/devel/mit-pthreads/patches/patch-cc
new file mode 100644
index 00000000000..f567b188ec8
--- /dev/null
+++ b/devel/mit-pthreads/patches/patch-cc
@@ -0,0 +1,14 @@
+$NetBSD: patch-cc,v 1.1 2001/01/10 01:28:50 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/mit-pthreads/patches/patch-cd b/devel/mit-pthreads/patches/patch-cd
new file mode 100644
index 00000000000..6b58d65af8d
--- /dev/null
+++ b/devel/mit-pthreads/patches/patch-cd
@@ -0,0 +1,17 @@
+$NetBSD: patch-cd,v 1.1 2001/01/10 01:28:50 briggs Exp $
+
+--- config/configure.orig Tue Jan 9 16:23:56 2001
++++ config/configure Tue Jan 9 16:26:17 2001
+@@ -1090,6 +1090,12 @@
+ # hpux-9.03.mk seems to be missing; what should this be?
+ except="fork"
+ ;;
++ powerpc-*-netbsd1.*)
++ name=powerpc-netbsd
++ sysincludes=netbsd-1.1
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigprocmask sigaction sigsuspend"
++ ;;
+ sparc-*-sunos4.1.3* | sparc-*-sunos4.1.4*)
+ name=sparc-sunos-4.1.3
+ sysincludes=sunos-4.1.3
diff --git a/devel/mit-pthreads/patches/patch-ce b/devel/mit-pthreads/patches/patch-ce
new file mode 100644
index 00000000000..953e65df836
--- /dev/null
+++ b/devel/mit-pthreads/patches/patch-ce
@@ -0,0 +1,16 @@
+$NetBSD: patch-ce,v 1.1 2001/01/10 01:28:51 briggs Exp $
+
+--- config/configure.in.orig Tue Jan 9 16:27:44 2001
++++ config/configure.in Tue Jan 9 16:28:44 2001
+@@ -185,6 +185,11 @@
+ AC_DEFINE(BROKEN_SIGNALS)
+ ;;
+ changequote(,)dnl
++ powerpc-*-netbsd1.*)
++ name=powerpc-netbsd
++ except="fork lseek ftruncate pipe fstat"
++ available_syscalls="sigprocmask sigaction sigsuspend"
++ ;;
+ sparc-*-netbsd1.3[H-Z]|sparc-*-netbsd1.[45]*)
+ name=sparc-netbsd-1.3
+ sysincludes=netbsd-1.1
diff --git a/devel/mit-pthreads/patches/patch-cf b/devel/mit-pthreads/patches/patch-cf
new file mode 100644
index 00000000000..fb3d905fde9
--- /dev/null
+++ b/devel/mit-pthreads/patches/patch-cf
@@ -0,0 +1,232 @@
+$NetBSD: patch-cf,v 1.1 2001/01/10 01:28:51 briggs Exp $
+
+--- /dev/null Tue Jan 9 17:03:11 2001
++++ machdep/engine-powerpc-netbsd.c Tue Jan 9 16:56:18 2001
+@@ -0,0 +1,227 @@
++/* ==== 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();
++}
++
++/* ==========================================================================
++ * __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();
++ }
++}
++
++/* ==========================================================================
++ * 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();
++ }
++}
++
++/* ==========================================================================
++ * machdep_pthread_cleanup()
++ */
++void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread)
++{
++ return(machdep_pthread->machdep_stack);
++}
++
++void *machdep_pthread_cleanup(struct machdep_pthread *machdep_pthread);
++void machdep_pthread_start(void);
++
++/* ==========================================================================
++ * __machdep_stack_free()
++ */
++void
++__machdep_stack_free(void * stack)
++{
++ free(stack);
++}
++
++/* ==========================================================================
++ * __machdep_stack_alloc()
++ */
++void *
++__machdep_stack_alloc(size_t size)
++{
++ return(malloc(size));
++}
++
++/* ==========================================================================
++ * machdep_sys_creat()
++ */
++int
++machdep_sys_creat(char * path, int mode)
++{
++ return(machdep_sys_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode));
++}
++
++/* ==========================================================================
++ * machdep_sys_wait3()
++ */
++int
++machdep_sys_wait3(int * b, int c, int *d)
++{
++ return(machdep_sys_wait4(0, b, c, d));
++}
++
++/* ==========================================================================
++ * machdep_sys_waitpid()
++ */
++int
++machdep_sys_waitpid(int a, int * b, int c)
++{
++ return(machdep_sys_wait4(a, b, c, NULL));
++}
++
++/* ==========================================================================
++ * machdep_sys_getdtablesize()
++ */
++int
++machdep_sys_getdtablesize(void)
++{
++ return(sysconf(_SC_OPEN_MAX));
++}
++
++/* ==========================================================================
++ * machdep_sys_lseek()
++ */
++off_t
++machdep_sys_lseek(int fd, off_t offset, int whence)
++{
++ return(__syscall((quad_t)SYS_lseek, fd, 0, offset, whence));
++}
++
++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()
++ */
++int
++machdep_sys_getdirentries(int fd, char * buf, int len, int * seek)
++{
++ return(machdep_sys_getdents(fd, buf, len));
++}
diff --git a/devel/mit-pthreads/patches/patch-cg b/devel/mit-pthreads/patches/patch-cg
new file mode 100644
index 00000000000..b06d830fe71
--- /dev/null
+++ b/devel/mit-pthreads/patches/patch-cg
@@ -0,0 +1,114 @@
+$NetBSD: patch-cg,v 1.1 2001/01/10 01:28:51 briggs Exp $
+
+--- /dev/null Tue Jan 9 17:03:11 2001
++++ machdep/engine-powerpc-netbsd.h Tue Jan 9 16:54:05 2001
+@@ -0,0 +1,109 @@
++/* ==== 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 */
++
++/*
++ * 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_stack_alloc(size_t);
++void __machdep_stack_free(void *);
++
++#endif
++
++__END_DECLS
diff --git a/devel/mit-pthreads/patches/patch-ch b/devel/mit-pthreads/patches/patch-ch
new file mode 100644
index 00000000000..4e4e8198e7b
--- /dev/null
+++ b/devel/mit-pthreads/patches/patch-ch
@@ -0,0 +1,190 @@
+$NetBSD: patch-ch,v 1.1 2001/01/10 01:28:51 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/mit-pthreads/patches/patch-ci b/devel/mit-pthreads/patches/patch-ci
new file mode 100644
index 00000000000..7e606cbe033
--- /dev/null
+++ b/devel/mit-pthreads/patches/patch-ci
@@ -0,0 +1,50 @@
+$NetBSD: patch-ci,v 1.1 2001/01/10 01:28:51 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)