summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ia64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-03-25 05:15:51 +0000
committerUlrich Drepper <drepper@redhat.com>2001-03-25 05:15:51 +0000
commit0a45b76c6238f4685c07ba5c5db371ae9b95d661 (patch)
tree2f2102508869d2b1d9d31799f81c65e691904911 /sysdeps/unix/sysv/linux/ia64
parent8c0fe2900498fea31db0d0f3bb2f4f13b8e393ce (diff)
downloadglibc-0a45b76c6238f4685c07ba5c5db371ae9b95d661.tar.gz
glibc-0a45b76c6238f4685c07ba5c5db371ae9b95d661.tar.xz
glibc-0a45b76c6238f4685c07ba5c5db371ae9b95d661.zip
Update.
2001-03-23  Jes Sorensen  <jes@linuxcare.com>

	* sysdeps/unix/sysv/linux/ia64/sysdep.h (ENTRY): Moved to ...
	* sysdeps/ia64/sysdep.h: ...here.

	* sysdeps/ia64/sysdep.h (LOCAL_ENTRY): Define.
	* sysdeps/ia64/sysdep.h (LOCAL_LEAF): Define.

	* sysdeps/ia64/_mcount.S (_mcount_ret_helper): Use LOCAL_LEAF() to
	declare instead of LEAF().  Suggestion from David Mosberger.

2001-03-21  David Mosberger  <davidm@hpl.hp.com>

	* sysdeps/unix/sysv/linux/ia64/sysdep.h (CALL_MCOUNT): Add unwind
	directives.
	(PSEUDO): Drop .psr and .lsb directives.

	* sysdeps/unix/sysv/linux/ia64/setjmp.S: Ditto.  Add unwind
	directives.
	* sysdeps/unix/sysv/linux/ia64/sysdep.S: Ditto.

	* sysdeps/ia64/elf/start.S: Misc cleanup: remove .psr and .lsb
	directives etc.
	* sysdeps/unix/sysv/linux/ia64/brk.S: Ditto.
	* sysdeps/unix/sysv/linux/ia64/__longjmp.S: Ditto.
	* sysdeps/ia64/_mcount.S: Remove .psr and .lsb directives (no
	longer needed).  Add unwind directives.

	* sysdeps/ia64/sysdep.h: Define ASM_UNW_PRLG_RP, ASM_UNW_PRLG_PFS,
	ASM_UNW_PRLG_PSP, ASM_UNW_PRLG_PR, and ASM_UNW_PRLG_GRSAVE.

2001-03-21  Paul Eggert  <eggert@twinsun.com>

	* posix/regex.h (RE_INVALID_INTERVAL_ORD): New macro.
	(RE_SYNTAX_POSIX_EGREP): Use it.
	* posix/regex.c (regex_compile): Implement it.

2001-03-21  Paul Eggert  <eggert@twinsun.com>

	* posix/regex.c (GET_UNSIGNED_NUMBER): Check for overflow.
	Rewrite to avoid duplicate code.

2001-03-21  H.J. Lu  <hjl@gnu.org>

	* elf/Makefile (tests): Don't depend on $(objpfx)tst-pathopt.out
	for cross-compiling.
	($(objpfx)tst-pathopt.out): Undo the last change.
Diffstat (limited to 'sysdeps/unix/sysv/linux/ia64')
-rw-r--r--sysdeps/unix/sysv/linux/ia64/__longjmp.S16
-rw-r--r--sysdeps/unix/sysv/linux/ia64/brk.S28
-rw-r--r--sysdeps/unix/sysv/linux/ia64/setjmp.S44
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.S22
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.h35
5 files changed, 53 insertions, 92 deletions
diff --git a/sysdeps/unix/sysv/linux/ia64/__longjmp.S b/sysdeps/unix/sysv/linux/ia64/__longjmp.S
index 967cab593d..956d3c7870 100644
--- a/sysdeps/unix/sysv/linux/ia64/__longjmp.S
+++ b/sysdeps/unix/sysv/linux/ia64/__longjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -39,16 +39,9 @@
 #	define	pNeg	p7	/* is rotate count negative? */
 
 
-	.psr abi64
-	.psr lsb
-	.lsb
-
 	/* __longjmp(__jmp_buf buf, int val) */
-	.text
-	.align 32
-	.global __longjmp
-	.proc __longjmp
-__longjmp:
+
+LEAF(__longjmp)
 	alloc r8=ar.pfs,2,1,0,0
 	mov r27=ar.rsc
 	add r2=0x98,in0		// r2 <- &jmpbuf.orig_jmp_buf_addr
@@ -164,5 +157,4 @@ __longjmp:
 	invala			// virt. -> phys. regnum mapping may change
 	mov pr=r24,-1
 	ret
-	.endp __longjmp
-
+END(__longjmp)
diff --git a/sysdeps/unix/sysv/linux/ia64/brk.S b/sysdeps/unix/sysv/linux/ia64/brk.S
index c483aa6ad6..e54f799ee0 100644
--- a/sysdeps/unix/sysv/linux/ia64/brk.S
+++ b/sysdeps/unix/sysv/linux/ia64/brk.S
@@ -1,5 +1,5 @@
 /* brk system call for Linux/ia64
-   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Stephane Eranian <eranian@hpl.hp.com> and
 	      Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
@@ -19,31 +19,26 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
+#include <sysdep.h>
+
 #include <asm/unistd.h>
 #include <asm/errno.h>
-	.text
-	.psr	abi64
-	.psr	lsb
-	.lsb
 
 	.global __curbrk
 	.data
 	.align	8
 __curbrk:
 	data8	0
-	.weak	___brk_addr
-___brk_addr = __curbrk
-	.text
-	.align	16
-	.global	__brk
-	.proc	__brk
-__brk:
+
+weak_alias (__curbrk, ___brk_addr)
+
+LEAF(__brk)
 	mov	r15=__NR_brk
 	break.i	__BREAK_SYSCALL
 	;;
 	cmp.ltu	p6,p0=ret0,r32	/* r32 is the input register, even though we
 				   haven't allocated a frame */
-	addl	r9=@ltoff(__curbrk#),gp
+	addl	r9=@ltoff(__curbrk),gp
 	;;
 	ld8	r9=[r9]
 (p6) 	mov	ret0=ENOMEM
@@ -51,8 +46,7 @@ __brk:
 	;;
 	st8	[r9]=ret0
 	mov 	ret0=0
- 	br.ret.sptk.few rp
-	.endp __brk
+	ret
+END(__brk)
 
-	.weak	brk
-brk = __brk
+weak_alias (__brk, brk)
diff --git a/sysdeps/unix/sysv/linux/ia64/setjmp.S b/sysdeps/unix/sysv/linux/ia64/setjmp.S
index 63abe0d25e..1d03cc55c0 100644
--- a/sysdeps/unix/sysv/linux/ia64/setjmp.S
+++ b/sysdeps/unix/sysv/linux/ia64/setjmp.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
    The layout of the jmp_buf is as follows.  This is subject to change
    and user-code should never depend on the particular layout of
    jmp_buf!
-  
+
 
   	offset:	description:
 	-------	------------
@@ -67,34 +67,25 @@
 #include <sysdep.h>
 #include <features.h>
 
-	.text
-	.psr abi64
-	.psr lsb
-	.lsb
-
 	/* The following two entry points are the traditional entry points: */
 
-	.global setjmp
-	.proc setjmp
-setjmp:	alloc r8=ar.pfs,2,0,0,0
+LEAF(setjmp)
+	alloc r8=ar.pfs,2,0,0,0
 	mov in1=1
 	br.cond.sptk.many __sigsetjmp
-	.endp setjmp
+END(setjmp)
 
-	.global _setjmp
-	.proc _setjmp
-_setjmp:
+LEAF(_setjmp)
 	alloc r8=ar.pfs,2,0,0,0
 	mov in1=0
 	br.cond.sptk.many __sigsetjmp
-	.endp _setjmp
+END(_setjmp)
 
 	/* __sigsetjmp(__jmp_buf buf, int savemask) */
-	.align 32
-	.global __sigsetjmp
-	.proc __sigsetjmp
-__sigsetjmp:
-	alloc loc0=ar.pfs,2,2,2,0
+
+ENTRY(__sigsetjmp)
+	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
+	alloc loc1=ar.pfs,2,2,2,0
 	mov r16=ar.unat
 	;;
 	mov r17=ar.fpsr
@@ -114,7 +105,8 @@ __sigsetjmp:
 	;;
 	stf.spill.nta [r8]=f2,32
 	stf.spill.nta [r9]=f3,32
-	mov loc1=rp
+	mov loc0=rp
+	.body
 	;;
 	stf.spill.nta [r8]=f4,32
 	stf.spill.nta [r9]=f5,32
@@ -157,7 +149,7 @@ __sigsetjmp:
 	mov r25=ar.unat
 	mov out0=in0
 
-	st8.nta [r2]=loc1,16		// b0
+	st8.nta [r2]=loc0,16		// b0
 	st8.nta [r3]=r17,16		// b1
 	mov out1=in1
 	;;
@@ -167,7 +159,7 @@ __sigsetjmp:
 	st8.nta [r2]=r20,16		// b4
 	st8.nta [r3]=r21,16		// b5
 	;;
-	st8.nta [r2]=loc0,16		// ar.pfs
+	st8.nta [r2]=loc1,16		// ar.pfs
 	st8.nta [r3]=r22,16		// ar.lc
 	;;
 	st8.nta [r2]=r24,16		// pr
@@ -178,10 +170,10 @@ __sigsetjmp:
 	br.call.dpnt.few rp=__sigjmp_save
 .ret0:					// force a new bundle ::q
 	mov r8=0
-	mov rp=loc1
-	mov ar.pfs=loc0
+	mov rp=loc0
+	mov ar.pfs=loc1
 	ret
-	.endp __sigsetjmp
+END(__sigsetjmp)
 
 weak_extern(_setjmp)
 weak_extern(setjmp)
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.S b/sysdeps/unix/sysv/linux/ia64/sysdep.S
index e327e1fa30..20122fad8c 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.S
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,10 +19,6 @@
 #include <sysdep.h>
 #include <features.h>
 
-	.psr abi64
-	.psr lsb
-	.lsb
-
 	.global errno
 	.common errno,4,4
 	.type errno, @object
@@ -34,16 +30,11 @@ __errno = errno
 	.global _errno
 _errno = errno
 
-	.text
-
-	.align 8
-
-	.global __syscall_error
-	.proc __syscall_error
-__syscall_error:
+ENTRY(__syscall_error)
 #ifdef _LIBC_REENTRANT
+	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(0)
 	alloc	r35=ar.pfs, 0, 4, 0, 0
-	mov	r32=b0
+	mov	r32=rp
 	mov	r33=r8
 	mov	r34=r1
 	;;
@@ -51,7 +42,7 @@ __syscall_error:
 .Lret0:		/* force new bundle */
 	st4	[r8]=r33
 	mov	r1=r34
-	mov	b0=r32
+	mov	rp=r32
 	mov	r8=-1
 	mov	ar.pfs=r35
 #else /* _LIBC_REENTRANT */
@@ -71,8 +62,7 @@ __syscall_error:
 	st4	[r2]=r3
 #endif /* _LIBC_REENTRANT */
 	ret			// ret is #define'd in syscall.h!
-	.endp __syscall_error
-
+END(__syscall_error)
 
 ENTRY(__ia64_syscall)
 	mov r15=r37		/* syscall number */
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.h b/sysdeps/unix/sysv/linux/ia64/sysdep.h
index 5f7f3fe3eb..8e7f74d58d 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.h
@@ -36,16 +36,20 @@
 
 #undef CALL_MCOUNT
 #ifdef PROF
-# define CALL_MCOUNT				\
-	.data;					\
-1:	data8 0;				\
-	.previous;				\
-	alloc out0 = ar.pfs, 8, 0, 4, 0;	\
-	mov out1 = gp;				\
-	mov out2 = rp;				\
-	;;					\
-	addl out3 = @ltoff(1b), gp;		\
-	br.call.sptk.many rp = _mcount		\
+# define CALL_MCOUNT							\
+	.data;								\
+1:	data8 0;	/* XXX fixme: use .xdata8 once labels work */	\
+	.previous;							\
+	.prologue;							\
+	.save ar.pfs, r40;						\
+	alloc out0 = ar.pfs, 8, 0, 4, 0;				\
+	mov out1 = gp;							\
+	.save rp, out2;							\
+	mov out2 = rp;							\
+	.body;								\
+	;;								\
+	addl out3 = @ltoff(1b), gp;					\
+	br.call.sptk.many rp = _mcount					\
 	;;
 #else
 # define CALL_MCOUNT	/* Do nothing. */
@@ -72,17 +76,6 @@
 	cmp.eq p6,p0=-1,r10;;			\
 (p6)	br.cond.spnt.few __syscall_error;
 
-#define ENTRY(name)				\
-	.psr abi64;				\
-	.psr lsb;				\
-	.lsb;					\
-	.text;					\
-	.align 32;				\
-	.proc C_SYMBOL_NAME(name);		\
-	.global C_SYMBOL_NAME(name);		\
-	C_LABEL(name)				\
-	CALL_MCOUNT
-
 #define DO_CALL(num)				\
 	mov r15=num;				\
 	break __BREAK_SYSCALL;