This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] PPC fix vmx build break
- From: Steve Munroe <sjmunroe at us dot ibm dot com>
- To: libc-alpha at sources dot redhat dot com, Dwayne McConnell <dgm69 at us dot ibm dot com>, janis187 at us dot ibm dot com
- Date: Fri, 28 May 2004 14:36:10 -0500
- Subject: [PATCH] PPC fix vmx build break
- Organization: IBM LTC
- Reply-to: sjmunroe at vnet dot ibm dot com
I think we have discussed this enough as there are no additional
comments. So I assume that the .machine altivec solution is acceptable
with the requirement that the binutils 2.15 requirement is enforced.
The attached patch contains both the configure change and the addition
of ".machine altivec" to the appropriate files.
Thanks for your attention and comments.
2004-05-28 Steven Munroe <sjmunroe@us.ibm.com>
* sysdeps/powerpc/elf/configure.in: New file. Set binutils 2.15 as
the minimum for PowerPC.
* sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Add .machine
"altivec" to enable VMX instructions.
* sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Dido.
* sysdeps/powerpc/powerpc64/__longjmp-common.S: Dido.
* sysdeps/powerpc/powerpc64/setjmp-common.S: Dido.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Dido.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Dido.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Dido.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Dido.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Dido.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Dido.
diff -urN libc23-cvstip-20040528/sysdeps/powerpc/elf/configure.in libc23/sysdeps/powerpc/elf/configure.in
--- libc23-cvstip-20040528/sysdeps/powerpc/elf/configure.in Wed Dec 31 18:00:00 1969
+++ libc23/sysdeps/powerpc/elf/configure.in Fri May 28 14:12:34 2004
@@ -0,0 +1,7 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/powerpc/elf.
+
+# Accept binutils 2.15 or newer, required for ".machine".
+AC_CHECK_PROG_VER(AS, $AS, --version,
+ [GNU assembler.* \([0-9]*\.[0-9.]*\)],
+ [2.1[5-9]*], AS=: critic_missing="$critic_missing as")
diff -urN libc23-cvstip-20040528/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S libc23/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
--- libc23-cvstip-20040528/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S 2004-03-07 13:51:39.000000000 -0600
+++ libc23/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S 2004-05-28 14:13:03.000000000 -0500
@@ -28,6 +28,7 @@
#include <bp-sym.h>
#include <bp-asm.h>
+ .machine "altivec"
ENTRY (BP_SYM (__longjmp))
CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
#ifndef __NO_VMX__
diff -urN libc23-cvstip-20040528/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S libc23/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
--- libc23-cvstip-20040528/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S 2004-03-07 13:51:39.000000000 -0600
+++ libc23/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S 2004-05-28 14:13:03.000000000 -0500
@@ -28,7 +28,7 @@
#include <bp-sym.h>
#include <bp-asm.h>
-
+ .machine "altivec"
ENTRY (BP_SYM (__sigsetjmp))
CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
diff -urN libc23-cvstip-20040528/sysdeps/powerpc/powerpc64/__longjmp-common.S libc23/sysdeps/powerpc/powerpc64/__longjmp-common.S
--- libc23-cvstip-20040528/sysdeps/powerpc/powerpc64/__longjmp-common.S 2004-03-07 13:51:39.000000000 -0600
+++ libc23/sysdeps/powerpc/powerpc64/__longjmp-common.S 2004-05-28 14:13:03.000000000 -0500
@@ -40,6 +40,7 @@
.section ".text"
#endif
+ .machine "altivec"
ENTRY (BP_SYM (__longjmp))
CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
#ifndef __NO_VMX__
diff -urN libc23-cvstip-20040528/sysdeps/powerpc/powerpc64/setjmp-common.S libc23/sysdeps/powerpc/powerpc64/setjmp-common.S
--- libc23-cvstip-20040528/sysdeps/powerpc/powerpc64/setjmp-common.S 2004-03-07 13:51:39.000000000 -0600
+++ libc23/sysdeps/powerpc/powerpc64/setjmp-common.S 2004-05-28 14:13:03.000000000 -0500
@@ -39,6 +39,7 @@
.section ".text"
#endif
+ .machine "altivec"
ENTRY (BP_SYM (__sigsetjmp))
CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
std r1,(JB_GPR1*8)(3)
diff -urN libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
--- libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-04-01 18:41:21.000000000 -0600
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-05-28 14:13:03.000000000 -0500
@@ -25,6 +25,7 @@
#include <asm/ptrace.h>
#include "ucontext_i.h"
+ .machine "altivec"
ENTRY(__getcontext)
stw r3,_FRAME_PARM_SAVE1(r1)
addi r3,r3,_UC_REG_SPACE+12
diff -urN libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
--- libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S 2004-04-01 18:41:21.000000000 -0600
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S 2004-05-28 14:13:03.000000000 -0500
@@ -25,6 +25,7 @@
#include <asm/ptrace.h>
#include "ucontext_i.h"
+ .machine "altivec"
ENTRY(__setcontext)
mflr r0
stwu r1,-16(r1)
diff -urN libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
--- libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-04-01 18:41:21.000000000 -0600
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-05-28 14:13:04.000000000 -0500
@@ -25,6 +25,7 @@
#include <asm/ptrace.h>
#include "ucontext_i.h"
+ .machine "altivec"
ENTRY(__swapcontext)
/* Save the current context */
stw r3,_FRAME_PARM_SAVE1(r1)
diff -urN libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
--- libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S 2004-04-01 13:35:18.000000000 -0600
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S 2004-05-28 14:13:04.000000000 -0500
@@ -165,6 +165,7 @@
#endif
.section ".text"
+ .machine "altivec"
ENTRY(__getcontext)
#ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
std r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3)
diff -urN libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
--- libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S 2004-04-01 13:35:02.000000000 -0600
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S 2004-05-28 14:13:04.000000000 -0500
@@ -192,6 +192,7 @@
#endif
.section ".text"
+ .machine "altivec"
ENTRY(__setcontext)
#ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
mflr r0
diff -urN libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
--- libc23-cvstip-20040528/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S 2004-04-01 13:34:51.000000000 -0600
+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S 2004-05-28 14:13:04.000000000 -0500
@@ -287,6 +287,7 @@
#endif
.section ".text"
+ .machine "altivec"
ENTRY(__swapcontext)
#ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
std r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3)