This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Architectures status 2012-12-18
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: <libc-ports at sourceware dot org>, <libc-alpha at sourceware dot org>
- Date: Tue, 18 Dec 2012 23:20:16 +0100
- Subject: Re: Architectures status 2012-12-18
- References: <Pine.LNX.4.64.1212182032090.13663@digraph.polyomino.org.uk>
"Joseph S. Myers" <joseph@codesourcery.com> writes:
> * PowerPC:
>
> (a) PowerPC needs sotruss-lib.c support.
* sysdeps/powerpc/sotruss-lib.c: New file.
---
sysdeps/powerpc/sotruss-lib.c | 84 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
create mode 100644 sysdeps/powerpc/sotruss-lib.c
diff --git a/sysdeps/powerpc/sotruss-lib.c b/sysdeps/powerpc/sotruss-lib.c
new file mode 100644
index 0000000..a1d738c
--- /dev/null
+++ b/sysdeps/powerpc/sotruss-lib.c
@@ -0,0 +1,84 @@
+/* Override generic sotruss-lib.c to define actual functions for powerpc.
+ Copyright (C) 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/>. */
+
+#define HAVE_ARCH_PLTENTER
+#define HAVE_ARCH_PLTEXIT
+
+#include <elf/sotruss-lib.c>
+
+#if __ELF_NATIVE_CLASS == 32
+
+ElfW(Addr)
+la_ppc32_gnu_pltenter (Elf32_Sym *sym __attribute__ ((unused)),
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_ppc32_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ print_enter (refcook, defcook, symname,
+ regs->lr_reg[3], regs->lr_reg[4], regs->lr_reg[5], *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_ppc32_gnu_pltexit (Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook,
+ const struct La_ppc32_regs *inregs,
+ struct La_ppc32_retval *outregs,
+ const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_r3);
+
+ return 0;
+}
+
+#else
+
+ElfW(Addr)
+la_ppc64_gnu_pltenter (Elf64_Sym *sym __attribute__ ((unused)),
+ unsigned int ndx __attribute__ ((unused)),
+ uintptr_t *refcook, uintptr_t *defcook,
+ La_ppc64_regs *regs, unsigned int *flags,
+ const char *symname, long int *framesizep)
+{
+ print_enter (refcook, defcook, symname,
+ regs->lr_reg[3], regs->lr_reg[4], regs->lr_reg[5], *flags);
+
+ /* No need to copy anything, we will not need the parameters in any case. */
+ *framesizep = 0;
+
+ return sym->st_value;
+}
+
+unsigned int
+la_ppc64_gnu_pltexit (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
+ uintptr_t *defcook,
+ const struct La_ppc64_regs *inregs,
+ struct La_ppc64_retval *outregs,
+ const char *symname)
+{
+ print_exit (refcook, defcook, symname, outregs->lrv_r3);
+
+ return 0;
+}
+
+#endif
> * m68k:
>
> (a) May need updates to its ccos / csin / ccosh / csinh
> implementations along the lines of my 2012-05-19 libc changes to
> avoid spurious overflows (bug 14123).
It also needs its pow implementation rewritten from scratch. Patches
welcome.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."