summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/bits
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/bits')
-rw-r--r--sysdeps/powerpc/bits/link.h111
-rw-r--r--sysdeps/powerpc/bits/mathdef.h64
-rw-r--r--sysdeps/powerpc/bits/setjmp.h32
3 files changed, 177 insertions, 30 deletions
diff --git a/sysdeps/powerpc/bits/link.h b/sysdeps/powerpc/bits/link.h
new file mode 100644
index 0000000000..6c6f6042a1
--- /dev/null
+++ b/sysdeps/powerpc/bits/link.h
@@ -0,0 +1,111 @@
+/* Machine-specific declarations for dynamic linker interface. PowerPC version
+ Copyright (C) 2004, 2005 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+
+#if __ELF_NATIVE_CLASS == 32
+
+/* Registers for entry into PLT on PPC32. */
+typedef struct La_ppc32_regs
+{
+ uint32_t lr_reg[8];
+ double lr_fp[8];
+ uint32_t lr_vreg[12][4];
+ uint32_t lr_r1;
+ uint32_t lr_lr;
+} La_ppc32_regs;
+
+/* Return values for calls from PLT on PPC32. */
+typedef struct La_ppc32_retval
+{
+ uint32_t lrv_r3;
+ uint32_t lrv_r4;
+ double lrv_fp[8];
+ uint32_t lrv_v2[4];
+} La_ppc32_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_ppc32_gnu_pltenter (Elf32_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_ppc32_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_ppc32_gnu_pltexit (Elf32_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_ppc32_regs *__inregs,
+ La_ppc32_retval *__outregs,
+ const char *symname);
+
+__END_DECLS
+
+#else
+
+/* Registers for entry into PLT on PPC64. */
+typedef struct La_ppc64_regs
+{
+ uint64_t lr_reg[8];
+ double lr_fp[13];
+ uint32_t __padding;
+ uint32_t lr_vrsave;
+ uint32_t lr_vreg[12][4];
+ uint64_t lr_r1;
+ uint64_t lr_lr;
+} La_ppc64_regs;
+
+/* Return values for calls from PLT on PPC64. */
+typedef struct La_ppc64_retval
+{
+ uint64_t lrv_r3;
+ uint64_t lrv_r4;
+ double lrv_fp[4]; /* f1-f4, float - complex long double. */
+ uint32_t lrv_v2[4]; /* v2. */
+} La_ppc64_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf64_Addr la_ppc64_gnu_pltenter (Elf64_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_ppc64_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_ppc64_gnu_pltexit (Elf64_Sym *__sym,
+ unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_ppc64_regs *__inregs,
+ La_ppc64_retval *__outregs,
+ const char *symname);
+
+__END_DECLS
+
+#endif
diff --git a/sysdeps/powerpc/bits/mathdef.h b/sysdeps/powerpc/bits/mathdef.h
new file mode 100644
index 0000000000..b79cc6ff96
--- /dev/null
+++ b/sysdeps/powerpc/bits/mathdef.h
@@ -0,0 +1,64 @@
+/* Copyright (C) 1997,1998,1999,2000,2003,2004,2006
+ 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#if !defined _MATH_H && !defined _COMPLEX_H
+# error "Never use <bits/mathdef.h> directly; include <math.h> instead"
+#endif
+
+
+/* FIXME! This file describes properties of the compiler, not the machine;
+ it should not be part of libc!
+
+ FIXME! This file does not deal with the -fshort-double option of
+ gcc! */
+
+#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
+# define _MATH_H_MATHDEF 1
+
+# ifdef __GNUC__
+# if __STDC__ == 1
+
+/* In GNU or ANSI mode, gcc leaves `float' expressions as-is. */
+typedef float float_t; /* `float' expressions are evaluated as
+ `float'. */
+typedef double double_t; /* `double' expressions are evaluated as
+ `double'. */
+
+# else
+
+/* For `gcc -traditional', `float' expressions are evaluated as `double'. */
+typedef double float_t; /* `float' expressions are evaluated as
+ `double'. */
+typedef double double_t; /* `double' expressions are evaluated as
+ `double'. */
+
+# endif
+# else
+
+/* Wild guess at types for float_t and double_t. */
+typedef double float_t;
+typedef double double_t;
+
+# endif
+
+/* The values returned by `ilogb' for 0 and NaN respectively. */
+# define FP_ILOGB0 (-2147483647)
+# define FP_ILOGBNAN (2147483647)
+
+#endif /* ISO C99 */
diff --git a/sysdeps/powerpc/bits/setjmp.h b/sysdeps/powerpc/bits/setjmp.h
index 3134916a51..9c3e22abac 100644
--- a/sysdeps/powerpc/bits/setjmp.h
+++ b/sysdeps/powerpc/bits/setjmp.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000,2003,2004,2005,2006
+ 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
@@ -31,30 +32,6 @@
#include <bits/wordsize.h>
-#if defined __USE_MISC || defined _ASM
-# define JB_GPR1 0 /* Also known as the stack pointer */
-# define JB_GPR2 1
-# define JB_LR 2 /* The address we will return to */
-# if __WORDSIZE == 64
-# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18*2 words total. */
-# define JB_CR 21 /* Condition code registers with the VRSAVE at */
- /* offset 172 (low half of the double word. */
-# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
-# define JB_SIZE (64 * 8) /* As per PPC64-VMX ABI. */
-# define JB_VRSAVE 21 /* VRSAVE shares a double word with the CR at offset */
- /* 168 (high half of the double word). */
-# define JB_VRS 40 /* VRs 20 through 31 are saved, 12*4 words total. */
-# else
-# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total. */
-# define JB_CR 21 /* Condition code registers. */
-# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
-# define JB_SIZE ((64 + (12 * 4)) * 4)
-# define JB_VRSAVE 62
-# define JB_VRS 64
-# endif
-#endif
-
-
/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
correctly on 32 bit. It also insists that vecregs are only gauranteed
@@ -72,9 +49,4 @@ typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16)));
# endif
#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
-
#endif /* bits/setjmp.h */