aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-09 22:34:19 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-09 22:34:19 +0000
commitcdb47f096a5c5973f491ecbf12d26230e21221dc (patch)
treed1bd8b06ad003d928de15bf3275bc6c67a6d7cd1
parent70b7101f6e8d81d806e38da0ca76ce3ac40137bd (diff)
downloadglibc-cdb47f096a5c5973f491ecbf12d26230e21221dc.zip
glibc-cdb47f096a5c5973f491ecbf12d26230e21221dc.tar.gz
glibc-cdb47f096a5c5973f491ecbf12d26230e21221dc.tar.bz2
Update.
1998-08-09 22:32 Ulrich Drepper <drepper@cygnus.com> * sysdeps/powerpc/ffs.c: Fix typo. Add support for ffsl. Patch by Matt McLean <keys@yikes.com>.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/powerpc/__longjmp.S2
-rw-r--r--sysdeps/powerpc/bits/setjmp.h6
-rw-r--r--sysdeps/powerpc/ffs.c12
-rw-r--r--sysdeps/powerpc/setjmp.S2
5 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 26742b9..4bc0035 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1998-08-09 22:32 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/powerpc/ffs.c: Fix typo. Add support for ffsl.
+ Patch by Matt McLean <keys@yikes.com>.
+
1998-08-07 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/powerpc/bits/setjmp.h: Use word to save condition
diff --git a/sysdeps/powerpc/__longjmp.S b/sysdeps/powerpc/__longjmp.S
index 5d6422c..875bab6 100644
--- a/sysdeps/powerpc/__longjmp.S
+++ b/sysdeps/powerpc/__longjmp.S
@@ -45,12 +45,14 @@ ENTRY (__longjmp)
lfd %f21,((JB_FPRS+7*2)*4)(%r3)
lwz %r22,((JB_GPRS+8)*4)(%r3)
lfd %f22,((JB_FPRS+8*2)*4)(%r3)
+ lwz %r0,(JB_CR*4)(%r3)
lwz %r23,((JB_GPRS+9)*4)(%r3)
lfd %f23,((JB_FPRS+9*2)*4)(%r3)
lwz %r24,((JB_GPRS+10)*4)(%r3)
lfd %f24,((JB_FPRS+10*2)*4)(%r3)
lwz %r25,((JB_GPRS+11)*4)(%r3)
lfd %f25,((JB_FPRS+11*2)*4)(%r3)
+ mtcrf 0xFF,%r0
lwz %r26,((JB_GPRS+12)*4)(%r3)
lfd %f26,((JB_FPRS+12*2)*4)(%r3)
lwz %r27,((JB_GPRS+13)*4)(%r3)
diff --git a/sysdeps/powerpc/bits/setjmp.h b/sysdeps/powerpc/bits/setjmp.h
index 100f1d1..040a244 100644
--- a/sysdeps/powerpc/bits/setjmp.h
+++ b/sysdeps/powerpc/bits/setjmp.h
@@ -28,11 +28,11 @@
either representation. */
#if defined __USE_MISC || defined _ASM
-# define JB_GPR1 0 /* also known as the stack pointer */
+# define JB_GPR1 0 /* Also known as the stack pointer */
# define JB_GPR2 1
-# define JB_LR 2
+# define JB_LR 2 /* The address we will return to */
# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */
-# define JB_UNUSED 21 /* it's sometimes faster to store doubles word-aligned */
+# define JB_CR 21 /* Condition code registers. */
# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */
#endif
diff --git a/sysdeps/powerpc/ffs.c b/sysdeps/powerpc/ffs.c
index fb1b2f4..01d5f74 100644
--- a/sysdeps/powerpc/ffs.c
+++ b/sysdeps/powerpc/ffs.c
@@ -18,8 +18,13 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define ffsl __something_else
#include <string.h>
+#undef ffs
+
+#ifdef __GNUC__
+
int
__ffs (int x)
{
@@ -29,4 +34,9 @@ __ffs (int x)
return 32 - cnt;
}
weak_alias (__ffs, ffs)
-weak_alais (__ffs, ffsl)
+#undef ffsl
+weak_alias (__ffs, ffsl)
+
+#else
+#include <sysdeps/generic/ffs.c>
+#endif
diff --git a/sysdeps/powerpc/setjmp.S b/sysdeps/powerpc/setjmp.S
index dc9d923..32b1b94 100644
--- a/sysdeps/powerpc/setjmp.S
+++ b/sysdeps/powerpc/setjmp.S
@@ -31,8 +31,10 @@ ENTRY (__sigsetjmp)
stw %r0,(JB_LR*4)(3)
stw %r15,((JB_GPRS+1)*4)(3)
stfd %f15,((JB_FPRS+1*2)*4)(3)
+ mfcr %r0
stw %r16,((JB_GPRS+2)*4)(3)
stfd %f16,((JB_FPRS+2*2)*4)(3)
+ stw %r0,(JB_CR*4)(3)
stw %r17,((JB_GPRS+3)*4)(3)
stfd %f17,((JB_FPRS+3*2)*4)(3)
stw %r18,((JB_GPRS+4)*4)(3)