public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: <libc-ports@sourceware.org>,  <libc-alpha@sourceware.org>
Subject: Re: Architectures status 2012-12-18
Date: Tue, 18 Dec 2012 22:20:00 -0000	[thread overview]
Message-ID: <m2r4mnuhnj.fsf@igel.home> (raw)
In-Reply-To: <Pine.LNX.4.64.1212182032090.13663@digraph.polyomino.org.uk>	(Joseph S. Myers's message of "Tue, 18 Dec 2012 20:34:27 +0000")

"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."

  reply	other threads:[~2012-12-18 22:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 20:34 Joseph S. Myers
2012-12-18 22:20 ` Andreas Schwab [this message]
2012-12-19  9:39 ` David Miller
2012-12-19 14:52   ` Joseph S. Myers
2012-12-19 18:24   ` Carlos O'Donell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2r4mnuhnj.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).