This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.16-ports-merge-550-g236bb06


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  236bb0623dba86582ded9f89b8d79f362404f7a1 (commit)
       via  e22f413005ccb0080ef1f13e59a1bc8aa36105cb (commit)
       via  4ebdb0102714696914e9425bf2e4c40666ee9beb (commit)
      from  f0b8ce0c73a9871c3f90c575c0c8f8c1048371e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=236bb0623dba86582ded9f89b8d79f362404f7a1

commit 236bb0623dba86582ded9f89b8d79f362404f7a1
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Mon Oct 29 23:31:55 2012 -0400

    hppa: Add cfi direcvtives.
    
    We add cfi directives to the syscall assembly.

diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa
index b30a61c..41b594c 100644
--- a/ports/ChangeLog.hppa
+++ b/ports/ChangeLog.hppa
@@ -1,5 +1,11 @@
 2012-10-29  Carlos O'Donell  <carlos@systemhalted.org>
 
+	* sysdeps/unix/sysv/linux/hppa/sysdep.h (ENTRY): Add cfi_startproc.
+	Use .cfi_offset for rp store.
+	(ENTRY_LEAF): Likewise.
+	(END) Add cfi_Endproc.
+	(DO_CALL): Add cfi directives.
+
 	* sysdeps/unix/sysv/linux/hppa/sysdep.h: Document register clobbering.
 	[PIC](TREG, SAVE_PIC, LOAD_PIC, TREG_ASM, SAVE_ASM_PIC, LOAD_ASM_PIC
 	CLOB_TREG, PIC_REG_DEF, PIC_REG_USE): Move...
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
index daf2eaf..1825d31 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -120,12 +120,14 @@
 	.align ALIGNARG(4)				ASM_LINE_SEP	\
 	.export C_SYMBOL_NAME(name)			ASM_LINE_SEP	\
 	.type	C_SYMBOL_NAME(name),@function		ASM_LINE_SEP	\
+	cfi_startproc					ASM_LINE_SEP	\
 	C_LABEL(name)					ASM_LINE_SEP	\
 	.PROC						ASM_LINE_SEP	\
 	.CALLINFO FRAME=64,CALLS,SAVE_RP,ENTRY_GR=3	ASM_LINE_SEP	\
 	.ENTRY						ASM_LINE_SEP	\
 	/* SAVE_RP says we do */			ASM_LINE_SEP	\
 	stw %rp, -20(%sr0,%sp)				ASM_LINE_SEP	\
+	.cfi_offset 2, -20				ASM_LINE_SEP	\
 	/*FIXME: Call mcount? (carefull with stack!) */
 
 /* Some syscall wrappers do not call other functions, and
@@ -135,18 +137,21 @@
 	.align ALIGNARG(4)				ASM_LINE_SEP	\
 	.export C_SYMBOL_NAME(name)			ASM_LINE_SEP	\
 	.type	C_SYMBOL_NAME(name),@function		ASM_LINE_SEP	\
+	cfi_startproc					ASM_LINE_SEP	\
 	C_LABEL(name)					ASM_LINE_SEP	\
 	.PROC						ASM_LINE_SEP	\
 	.CALLINFO FRAME=64,NO_CALLS,SAVE_RP,ENTRY_GR=3	ASM_LINE_SEP	\
 	.ENTRY						ASM_LINE_SEP	\
 	/* SAVE_RP says we do */			ASM_LINE_SEP	\
 	stw %rp, -20(%sr0,%sp)				ASM_LINE_SEP	\
+	.cfi_offset 2, -20				ASM_LINE_SEP	\
 	/*FIXME: Call mcount? (carefull with stack!) */
 
 #undef	END
 #define END(name)							\
   	.EXIT						ASM_LINE_SEP	\
 	.PROCEND					ASM_LINE_SEP	\
+	cfi_endproc					ASM_LINE_SEP	\
 .size	C_SYMBOL_NAME(name), .-C_SYMBOL_NAME(name)	ASM_LINE_SEP
 
 /* If compiled for profiling, call `mcount' at the start
@@ -278,8 +283,12 @@
 #define DO_CALL(syscall_name, args)				\
 	/* Create a frame */			ASM_LINE_SEP	\
 	stwm TREG, 64(%sp)			ASM_LINE_SEP	\
+	.cfi_offset TREG, 0			ASM_LINE_SEP	\
+	.cfi_adjust_cfa_offset 64		ASM_LINE_SEP	\
 	stw %sp, -4(%sp)			ASM_LINE_SEP	\
+	.cfi_offset 30, -4			ASM_LINE_SEP	\
 	stw %r19, -32(%sp)			ASM_LINE_SEP	\
+	.cfi_offset 19, -32			ASM_LINE_SEP	\
 	/* Save r19 */				ASM_LINE_SEP	\
 	SAVE_PIC(TREG)				ASM_LINE_SEP	\
 	/* Do syscall, delay loads # */		ASM_LINE_SEP	\
@@ -302,8 +311,10 @@
 L(pre_end):					ASM_LINE_SEP	\
 	/* Restore our frame, restoring TREG */	ASM_LINE_SEP	\
 	ldwm -64(%sp), TREG			ASM_LINE_SEP	\
+	.cfi_adjust_cfa_offset -64		ASM_LINE_SEP	\
 	/* Restore return pointer */		ASM_LINE_SEP	\
-	ldw -20(%sp),%rp			ASM_LINE_SEP
+	ldw -20(%sp),%rp			ASM_LINE_SEP	\
+	.cfi_restore 2				ASM_LINE_SEP
 
 /* We do nothing with the return, except hand it back to someone else */
 #undef  DO_CALL_NOERRNO

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e22f413005ccb0080ef1f13e59a1bc8aa36105cb

commit e22f413005ccb0080ef1f13e59a1bc8aa36105cb
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Mon Oct 29 23:16:44 2012 -0400

    hppa: Fix r19 save and restore.
    
    We must save and restore r19 in both PIC and non-PIC
    situations since the kernel paths that clobber r19
    are independent of that PIC-ness of userspace.
    In addition we choose r4 as the temporary register over
    r3 which is being used by recent gcc's as the frame
    pointer.

diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa
index 6d5d5a3..b30a61c 100644
--- a/ports/ChangeLog.hppa
+++ b/ports/ChangeLog.hppa
@@ -1,5 +1,14 @@
 2012-10-29  Carlos O'Donell  <carlos@systemhalted.org>
 
+	* sysdeps/unix/sysv/linux/hppa/sysdep.h: Document register clobbering.
+	[PIC](TREG, SAVE_PIC, LOAD_PIC, TREG_ASM, SAVE_ASM_PIC, LOAD_ASM_PIC
+	CLOB_TREG, PIC_REG_DEF, PIC_REG_USE): Move...
+	(TREG, SAVE_PIC, LOAD_PIC, TREG_ASM, SAVE_ASM_PIC, LOAD_ASM_PIC
+	CLOB_TREG, PIC_REG_DEF, PIC_REG_USE): ... to here.
+	[!PIC](TREG, SAVE_PIC, LOAD_PIC, TREG_ASM, SAVE_ASM_PIC, LOAD_ASM_PIC
+	CLOB_TREG, PIC_REG_DEF, PIC_REG_USE): Remove.
+	(TREG): Use r4.
+
 	* sysdeps/unix/sysv/linux/hppa/sysdep.h: Don't include sys/syscall.h.
 	Document nop removal.
 	(PSEUDO): Remove nop.
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 5c0db64..daf2eaf 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -32,32 +32,28 @@
 #undef SYS_ify
 #define SYS_ify(syscall_name)	(__NR_##syscall_name)
 
+/* The vfork, fork, and clone syscalls clobber r19
+ * and r21. We list r21 as either clobbered or as an
+ * input to a 6-argument syscall. We must save and
+ * restore r19 in both PIC and non-PIC cases.
+ */
 /* WARNING: TREG must be a callee saves register so
    that it doesn't have to be restored after a call
    to another function */
-#ifdef PIC
-# define TREG %r3
-# define SAVE_PIC(SREG) copy %r19, SREG ASM_LINE_SEP
-# define LOAD_PIC(LREG) copy LREG, %r19 ASM_LINE_SEP
+#define TREG 4
+#define SAVE_PIC(SREG) \
+	copy %r19, SREG ASM_LINE_SEP	\
+	.cfi_register 19, SREG
+#define LOAD_PIC(LREG) \
+	copy LREG , %r19 ASM_LINE_SEP	\
+	.cfi_restore 19
 /* Inline assembly defines */
-# define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
-# define SAVE_ASM_PIC	"       copy %%r19, %" TREG_ASM "\n"
-# define LOAD_ASM_PIC	"       copy %" TREG_ASM ", %%r19\n"
-# define CLOB_TREG	TREG_ASM ,
-# define PIC_REG_DEF	register unsigned long __r19 asm("r19");
-# define PIC_REG_USE	, "r" (__r19)
-#else
-# define TREG %r3
-# define SAVE_PIC(SREG) nop ASM_LINE_SEP
-# define LOAD_PIC(LREG) nop ASM_LINE_SEP
-/* Inline assembly defines */
-# define TREG_ASM
-# define SAVE_ASM_PIC	"nop \n"
-# define LOAD_ASM_PIC	"nop \n"
-# define CLOB_TREG
-# define PIC_REG_DEF
-# define PIC_REG_USE
-#endif
+#define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
+#define SAVE_ASM_PIC	"       copy %%r19, %" TREG_ASM "\n"
+#define LOAD_ASM_PIC	"       copy %" TREG_ASM ", %%r19\n"
+#define CLOB_TREG	TREG_ASM ,
+#define PIC_REG_DEF	register unsigned long __r19 asm("r19");
+#define PIC_REG_USE	, "r" (__r19)
 
 #ifdef __ASSEMBLER__
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4ebdb0102714696914e9425bf2e4c40666ee9beb

commit 4ebdb0102714696914e9425bf2e4c40666ee9beb
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Mon Oct 29 23:04:43 2012 -0400

    hppa: Optimize syscall sequence.
    
    We remove an extraneous nop from the syscall sequence.
    No DO_CALL* may end in an instruction with a delay slot.

diff --git a/ports/ChangeLog.hppa b/ports/ChangeLog.hppa
index 62f4147..6d5d5a3 100644
--- a/ports/ChangeLog.hppa
+++ b/ports/ChangeLog.hppa
@@ -1,5 +1,11 @@
 2012-10-29  Carlos O'Donell  <carlos@systemhalted.org>
 
+	* sysdeps/unix/sysv/linux/hppa/sysdep.h: Don't include sys/syscall.h.
+	Document nop removal.
+	(PSEUDO): Remove nop.
+	(PSEUDO_NOERRNO): Likeise.
+	(PSEUDO_ERRVAL): Likewise.
+
 	* sysdeps/unix/sysv/linux/hppa/sysdep.h: Remove trailing whitespace.
 
 2012-10-26  Andreas Jaeger  <aj@suse.de>
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
index 9ef8b50..5c0db64 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -20,7 +20,6 @@
 
 #include <asm/unistd.h>
 #include <sysdeps/generic/sysdep.h>
-#include <sys/syscall.h>
 
 /* In order to get __set_errno() definition in INLINE_SYSCALL.  */
 #ifndef __ASSEMBLER__
@@ -168,9 +167,7 @@
    which means
 	ENTRY(name)
 	DO_CALL(...)
-	nop
-	bv 0(2)
-	nop
+	bv,n 0(2)
 */
 
 #define	PSEUDO(name, syscall_name, args)			\
@@ -178,8 +175,7 @@
   /* If necc. load args from stack */		ASM_LINE_SEP	\
   DOARGS_##args					ASM_LINE_SEP	\
   DO_CALL (syscall_name, args)			ASM_LINE_SEP	\
-  UNDOARGS_##args				ASM_LINE_SEP	\
-  nop						ASM_LINE_SEP
+  UNDOARGS_##args				ASM_LINE_SEP
 
 #define ret \
   /* Return value set by ERRNO code */		ASM_LINE_SEP	\
@@ -194,8 +190,7 @@
   ENTRY_LEAF (name)				ASM_LINE_SEP	\
   DOARGS_##args					ASM_LINE_SEP	\
   DO_CALL_NOERRNO (syscall_name, args)		ASM_LINE_SEP	\
-  UNDOARGS_##args				ASM_LINE_SEP	\
-  nop						ASM_LINE_SEP
+  UNDOARGS_##args				ASM_LINE_SEP
 
 #define ret_NOERRNO ret
 
@@ -209,8 +204,7 @@
   ENTRY_LEAF (name)				ASM_LINE_SEP	\
   DOARGS_##args					ASM_LINE_SEP	\
   DO_CALL_ERRVAL (syscall_name, args)		ASM_LINE_SEP	\
-  UNDOARGS_##args				ASM_LINE_SEP	\
-  nop						ASM_LINE_SEP
+  UNDOARGS_##args				ASM_LINE_SEP
 
 #define ret_ERRVAL ret
 

-----------------------------------------------------------------------

Summary of changes:
 ports/ChangeLog.hppa                        |   21 ++++++++
 ports/sysdeps/unix/sysv/linux/hppa/sysdep.h |   67 ++++++++++++++-------------
 2 files changed, 55 insertions(+), 33 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]