This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, fedora/master, updated. fedora/glibc-2.10.90-15-1-gbc9dd94
- From: schwab at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 25 Aug 2009 19:08:44 -0000
- Subject: GNU C Library master sources branch, fedora/master, updated. fedora/glibc-2.10.90-15-1-gbc9dd94
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, fedora/master has been updated
via bc9dd948ffc9cf1992d3e77e753789ab897e3dc6 (commit)
from 9aadad69ed7b1a24947f8d5cf878f94096317f81 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bc9dd948ffc9cf1992d3e77e753789ab897e3dc6
commit bc9dd948ffc9cf1992d3e77e753789ab897e3dc6
Author: Andreas Schwab <schwab@redhat.com>
Date: Tue Aug 25 18:31:56 2009 +0200
Add emulation of popcntb.
diff --git a/fedora/power6emul.c b/fedora/power6emul.c
index f1d0d20..1b0187b 100644
--- a/fedora/power6emul.c
+++ b/fedora/power6emul.c
@@ -163,6 +163,25 @@ asm (".globl frip, friz, frin, frim\n.hidden frip, friz, frin, frim\n\t"
"3:" "mtfsf 0x01,11\n\t"
"blr\n");
+#ifdef __powerpc64__
+#define m1 0x5555555555555555L
+#define m2 0x3333333333333333L
+#define m3 0x0f0f0f0f0f0f0f0fL
+#else
+#define m1 0x55555555
+#define m2 0x33333333
+#define m3 0x0f0f0f0f
+#endif
+
+static inline unsigned long
+popcntb (unsigned long n)
+{
+ n -= (n >> 1) & m1;
+ n = (n & m2) + ((n >> 2) & m2);
+ n = (n + (n >> 4)) & m3;
+ return n;
+}
+
static void
catch_sigill (int signal, struct sigcontext *ctx)
{
@@ -221,6 +240,18 @@ catch_sigill (int signal, struct sigcontext *ctx)
ctx->regs->nip += 4;
return;
}
+ if ((insn & 0xfc00ffff) == 0x7c0000f4) /* popcntb */
+ {
+ unsigned long *regs = (unsigned long *) ctx->regs;
+ unsigned dest = (insn >> 16) & 0x1f;
+ unsigned src = (insn >> 21) & 0x1f;
+ unsigned long res = 0;
+ int i;
+
+ regs[dest] = popcntb (regs[src]);
+ ctx->regs->nip += 4;
+ return;
+ }
struct sigaction sa;
sa.sa_handler = SIG_DFL;
-----------------------------------------------------------------------
Summary of changes:
fedora/power6emul.c | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources