This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] PPC fix build break caused by VMX, 2nd try
- 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>
- Date: Tue, 25 May 2004 16:20:02 -0500
- Subject: [PATCH] PPC fix build break caused by VMX, 2nd try
- Organization: IBM LTC
- Reply-to: sjmunroe at vnet dot ibm dot com
Roland McGrath writes:
> Kumar Gala writes:
>> Is it possible to do this via the .machine directives? Not sure what
>> happens if when tries to assemble a .machine directive with an old
>> binutils?
> In any case where something can be done in the source file instead of by
> adding switches in a makefile, the former is preferable.
OK this patch uses .machine "altivec"
2004-05-25 Steven Munroe <sjmunroe@us.ibm.com>
* 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-20040524/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S libc23/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
--- libc23-cvstip-20040524/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-25 14:49:05.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-20040524/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S libc23/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
--- libc23-cvstip-20040524/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-25 14:48:02.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-20040524/sysdeps/powerpc/powerpc64/__longjmp-common.S libc23/sysdeps/powerpc/powerpc64/__longjmp-common.S
--- libc23-cvstip-20040524/sysdeps/powerpc/powerpc64/__longjmp-common.S 2004-03-07 13:51:39.000000000 -0600
+++ libc23/sysdeps/powerpc/powerpc64/__longjmp-common.S 2004-05-25 14:49:16.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-20040524/sysdeps/powerpc/powerpc64/setjmp-common.S libc23/sysdeps/powerpc/powerpc64/setjmp-common.S
--- libc23-cvstip-20040524/sysdeps/powerpc/powerpc64/setjmp-common.S 2004-03-07 13:51:39.000000000 -0600
+++ libc23/sysdeps/powerpc/powerpc64/setjmp-common.S 2004-05-25 14:48:36.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-20040524/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
--- libc23-cvstip-20040524/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-25 14:51:58.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-20040524/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
--- libc23-cvstip-20040524/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-25 14:52:55.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-20040524/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
--- libc23-cvstip-20040524/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-25 14:53:49.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-20040524/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
--- libc23-cvstip-20040524/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-25 14:52:33.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-20040524/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
--- libc23-cvstip-20040524/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-25 14:53:19.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-20040524/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
--- libc23-cvstip-20040524/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-25 14:54:13.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)