summary refs log tree commit diff
path: root/sysdeps/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/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/ia64')
-rw-r--r--sysdeps/ia64/_mcount.S26
-rw-r--r--sysdeps/ia64/elf/start.S22
-rw-r--r--sysdeps/ia64/sysdep.h28
3 files changed, 51 insertions, 25 deletions
diff --git a/sysdeps/ia64/_mcount.S b/sysdeps/ia64/_mcount.S
index 9f27561311..e9a627aa7c 100644
--- a/sysdeps/ia64/_mcount.S
+++ b/sysdeps/ia64/_mcount.S
@@ -48,13 +48,11 @@
 
 #undef ret
 
-	.psr	abi64
-	.psr	lsb
-	.lsb
-
 LEAF(_mcount)
-	alloc loc0 = ar.pfs, 4, 4, 3, 0
-	mov loc1 = rp
+	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(4)
+	alloc loc1 = ar.pfs, 4, 4, 3, 0
+	mov loc0 = rp
+	.body
 	mov loc2 = r8	// gcc uses r8 to pass pointer to return structure
 	;;
 	mov loc3 = r15	// gcc uses r15 to pass the static link to nested functions
@@ -67,21 +65,27 @@ LEAF(_mcount)
 	.mii
 	mov gp = in1
 	mov r2 = ip
-	mov ar.pfs = loc0
+	mov ar.pfs = loc1
 }
 	;;
-	adds r2 = 1f - .here, r2
-	mov b7 = loc1
+	adds r2 = _mcount_ret_helper - .here, r2
+	mov b7 = loc0
 	mov rp = in2
 	;;
 	mov r8 = loc2
 	mov r15 = loc3
 	mov b6 = r2
 	br.ret.sptk.few b6
+END(_mcount)
 
-1:	alloc r2 = ar.pfs, 0, 0, 9, 0
+LOCAL_LEAF(_mcount_ret_helper)
+	.prologue
+	.altrp b7
+	.save ar.pfs, r40
+	.body
+	alloc r2 = ar.pfs, 0, 0, 9, 0
 	mov ar.pfs = r40
 	br b7
-END(_mcount)
+END(_mcount_ret_helper)
 
 weak_alias (_mcount, mcount)
diff --git a/sysdeps/ia64/elf/start.S b/sysdeps/ia64/elf/start.S
index c09d070e9b..5ba6196e3c 100644
--- a/sysdeps/ia64/elf/start.S
+++ b/sysdeps/ia64/elf/start.S
@@ -1,4 +1,4 @@
-/* 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 Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
 
@@ -31,14 +31,8 @@
  *	out6:	stack_end
  */
 
-	.psr	abi64
-	.psr	lsb
-	.lsb
-
-	.text
-
-	.global	_start#
-	.proc	_start#
+	.global	_start
+	.proc	_start
 
 _start:
 	{ .mlx
@@ -59,11 +53,11 @@ _start:
 	}
 	{ .mfi
 	  mov ar.fpsr = r3
-	  addl out0 = @ltoff(@fptr(main#)), gp
+	  addl out0 = @ltoff(@fptr(main)), gp
 	}
 	{ .mfi
-	  addl out4 = @ltoff(@fptr(_fini#)), gp
-	  addl out3 = @ltoff(@fptr(_init#)), gp
+	  addl out4 = @ltoff(@fptr(_fini)), gp
+	  addl out3 = @ltoff(@fptr(_init)), gp
 	  ;;
 	}
 	{ .mmi
@@ -74,14 +68,14 @@ _start:
 	{ .mib
 	  ld8 out4 = [out4]	/* pointer to `fini' function descriptor */
 	  mov out5 = ret0	/* dynamic linker destructor */
-	  br.call.sptk.few rp = __libc_start_main#
+	  br.call.sptk.few rp = __libc_start_main
 	}
 	{ .mib
 	  mov rp = r0
 	  br.ret.sptk.few rp	/* break miserably if we ever return */
 	  ;;
 	}
-	.endp	_start#
+	.endp	_start
 
 /* Define a symbol for the first piece of initialized data.  */
 	.data
diff --git a/sysdeps/ia64/sysdep.h b/sysdeps/ia64/sysdep.h
index aab440dd87..489cd07abc 100644
--- a/sysdeps/ia64/sysdep.h
+++ b/sysdeps/ia64/sysdep.h
@@ -21,6 +21,28 @@
 
 #ifdef __ASSEMBLER__
 
+/* Macros to help writing .prologue directives in assembly code.  */
+#define ASM_UNW_PRLG_RP			0x8
+#define ASM_UNW_PRLG_PFS		0x4
+#define ASM_UNW_PRLG_PSP		0x2
+#define ASM_UNW_PRLG_PR			0x1
+#define ASM_UNW_PRLG_GRSAVE(ninputs)	(32+(ninputs))
+
+#define ENTRY(name)				\
+	.text;					\
+	.align 32;				\
+	.proc C_SYMBOL_NAME(name);		\
+	.global C_SYMBOL_NAME(name);		\
+	C_LABEL(name)				\
+	CALL_MCOUNT
+
+#define LOCAL_ENTRY(name)			\
+	.text;					\
+	.align 32;				\
+	.proc C_SYMBOL_NAME(name);		\
+	C_LABEL(name)				\
+	CALL_MCOUNT
+
 #define LEAF(name)				\
   .text;					\
   .align 32;					\
@@ -28,6 +50,12 @@
   .global name;					\
   C_LABEL(name)
 
+#define LOCAL_LEAF(name)			\
+  .text;					\
+  .align 32;					\
+  .proc C_SYMBOL_NAME(name);			\
+  C_LABEL(name)
+
 /* Mark the end of function SYM.  */
 #undef END
 #define END(sym)	.endp C_SYMBOL_NAME(sym)