diff options
Diffstat (limited to 'sysdeps/mach/powerpc')
-rw-r--r-- | sysdeps/mach/powerpc/machine-lock.h | 77 | ||||
-rw-r--r-- | sysdeps/mach/powerpc/machine-sp.h | 41 | ||||
-rw-r--r-- | sysdeps/mach/powerpc/syscall.S | 29 | ||||
-rw-r--r-- | sysdeps/mach/powerpc/sysdep.h | 50 | ||||
-rw-r--r-- | sysdeps/mach/powerpc/thread_state.h | 38 |
5 files changed, 0 insertions, 235 deletions
diff --git a/sysdeps/mach/powerpc/machine-lock.h b/sysdeps/mach/powerpc/machine-lock.h deleted file mode 100644 index 84159c5a5d..0000000000 --- a/sysdeps/mach/powerpc/machine-lock.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Machine-specific definition for spin locks. PowerPC version. - Copyright (C) 1994-2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _MACHINE_LOCK_H -#define _MACHINE_LOCK_H - -/* The type of a spin lock variable. */ - -typedef volatile long int __spin_lock_t; - -/* Value to initialize `__spin_lock_t' variables to. */ - -#define __SPIN_LOCK_INITIALIZER 0L - - -#ifndef _EXTERN_INLINE -#define _EXTERN_INLINE __extern_inline -#endif - -/* Unlock LOCK. */ - -_EXTERN_INLINE void -__spin_unlock (__spin_lock_t *__lock) -{ - long int __locked; - __asm__ __volatile__ ("\ -0: lwarx %0,0,%1\n\ - stwcx. %2,0,%1\n\ - bne- 0b\n\ -" : "=&r" (__locked) : "r" (__lock), "r" (0) : "cr0"); -} - -/* Try to lock LOCK; return nonzero if we locked it, zero if another has. */ - -_EXTERN_INLINE int -__spin_try_lock (register __spin_lock_t *__lock) -{ - long int __rtn; - __asm__ __volatile__ ("\ -0: lwarx %0,0,%1\n\ - stwcx. %2,0,%1\n\ - bne- 0b\n\ -" : "=&r" (__rtn) : "r" (__lock), "r" (1) : "cr0"); - return !__rtn; -} - -/* Return nonzero if LOCK is locked. */ - -_EXTERN_INLINE int -__spin_lock_locked (__spin_lock_t *__lock) -{ - long int __rtn; - __asm__ __volatile__ ("\ -0: lwarx %0,0,%1\n\ - stwcx. %0,0,%1\n\ - bne- 0b\n\ -" : "=&r" (__rtn) : "r" (__lock) : "cr0"); - return __rtn; -} - - -#endif /* machine-lock.h */ diff --git a/sysdeps/mach/powerpc/machine-sp.h b/sysdeps/mach/powerpc/machine-sp.h deleted file mode 100644 index 7f75184b8e..0000000000 --- a/sysdeps/mach/powerpc/machine-sp.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Machine-specific function to return the stack pointer. PowerPC version. - Copyright (C) 2001, 2007 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see <http://www.gnu.org/licenses/>. */ - -#ifndef _MACHINE_SP_H -#define _MACHINE_SP_H - -/* Return the current stack pointer. */ - -#ifndef _EXTERN_INLINE -/* Make sure this function is included in hurd/threadvar-inlines.c. */ -# ifdef _HURD_THREADVAR_H_EXTERN_INLINE -# define _EXTERN_INLINE _HURD_THREADVAR_H_EXTERN_INLINE -# else -# define _EXTERN_INLINE __extern_inline -# endif -#endif - -_EXTERN_INLINE void * -__thread_stack_pointer (void) -{ - register void *__sp__; - __asm__ ("mr %0, 1" : "=r" (__sp__)); - return __sp__; -} - -#endif /* machine-sp.h */ diff --git a/sysdeps/mach/powerpc/syscall.S b/sysdeps/mach/powerpc/syscall.S deleted file mode 100644 index 77640e3756..0000000000 --- a/sysdeps/mach/powerpc/syscall.S +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep.h> - -ENTRY (syscall) - mr r0,r3 - mr r3,r4 - mr r4,r5 - mr r5,r6 - mr r6,r7 - mr r7,r8 - sc - blr -END (syscall) diff --git a/sysdeps/mach/powerpc/sysdep.h b/sysdeps/mach/powerpc/sysdep.h deleted file mode 100644 index f2d863e75e..0000000000 --- a/sysdeps/mach/powerpc/sysdep.h +++ /dev/null @@ -1,50 +0,0 @@ -/* system call details for Mach on PowerPC - Copyright (C) 2001,02 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see <http://www.gnu.org/licenses/>. */ - -#ifndef _MACH_POWERPC_SYSDEP_H -#define _MACH_POWERPC_SYSDEP_H - -#define START_ARGS char **sparg -#define SNARF_ARGS(argc, argv, envp) \ - do { \ - argv = &sparg[1]; \ - argc = *(int *)sparg; \ - envp = &argv[argc + 1]; \ - } while (0) - -#define CALL_WITH_SP(fn, sp) \ - do { \ - register long __sp = (long) sp, __fn = (long) fn; \ - asm volatile ("mr 1, %0; mtlr %1; blr" \ - : : "r" (__sp), "r" (__fn)); \ - } while (0) - -#define STACK_GROWTH_DOWN - -#define RETURN_TO(sp, pc, retval) \ - asm volatile ("mr 1, %0; mtctr %1; mr 3, %2; bctr" \ - : : "r" (sp), "r" (pc), "r" (retval)) - -/* Get the machine-independent Mach definitions. */ -#define _MACH_MACHINE_ASM_H 1 /* Kludge to avoid bad Darwin header file. */ -#include <sysdeps/mach/sysdep.h> - -#undef ENTRY -#include <sysdeps/unix/powerpc/sysdep.h> - -#endif /* _MACH_POWERPC_SYSDEP_H */ diff --git a/sysdeps/mach/powerpc/thread_state.h b/sysdeps/mach/powerpc/thread_state.h deleted file mode 100644 index d11a5ab019..0000000000 --- a/sysdeps/mach/powerpc/thread_state.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Mach thread state definitions for machine-independent code. PowerPC version - Copyright (C) 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see <http://www.gnu.org/licenses/>. */ - -#include <mach/machine/thread_status.h> - -#define MACHINE_THREAD_STATE_FLAVOR PPC_THREAD_STATE -#define MACHINE_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT - -#define machine_thread_state ppc_thread_state - -#define PC srr0 -#define SP r1 -#define SYSRETURN r3 - -struct machine_thread_all_state - { - int set; /* Mask of bits (1 << FLAVOR). */ - struct ppc_thread_state basic; - struct ppc_exception_state exc; - struct ppc_float_state fpu; - }; - -#include <sysdeps/mach/thread_state.h> |