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.24-12-g30f926d


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  30f926d3b3dcb74c038155715ed341d5c4b334eb (commit)
       via  ee71e5b6dd6a21e981ad0fa74359e066f5a8b359 (commit)
      from  487890009e4ed87198331d0dae9b0be52d37f68c (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=30f926d3b3dcb74c038155715ed341d5c4b334eb

commit 30f926d3b3dcb74c038155715ed341d5c4b334eb
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Wed Aug 3 00:22:44 2016 +0200

    powerpc: fix ifunc-sel.h fix asm constraints and clobber list
    
    As pointer out on the mailing list, the inline assembly code in
    sysdeps/powerpc/ifunc-sel.h doesn't have a list of clobbered registers
    and used wrong constraints.
    
    This patch fixes that. I verified it doesn't introduce any change in the
    generated code.
    
    Changelog:
    	* sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Add "11", "12", "cr0" to the
    	clobber list. Use "i" constraint instead of "X".
    	(ifunc_one): Add "12" to the clobber list. Use "i" constraint instead
    	of "X".

diff --git a/ChangeLog b/ChangeLog
index b66ba7a..0b294c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,10 @@
 
 	* sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Replace beqlr instructions
 	by beq instructions jumping to the end of the function.
+	* sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Add "11", "12", "cr0" to the
+	clobber list. Use "i" constraint instead of "X".
+	(ifunc_one): Add "12" to the clobber list. Use "i" constraint instead
+	of "X".
 
 2016-08-02  Joseph Myers  <joseph@codesourcery.com>
 
diff --git a/sysdeps/powerpc/ifunc-sel.h b/sysdeps/powerpc/ifunc-sel.h
index 79d110f..ac589bd 100644
--- a/sysdeps/powerpc/ifunc-sel.h
+++ b/sysdeps/powerpc/ifunc-sel.h
@@ -26,7 +26,8 @@ ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void))
 	   "addi %0,%0,%4-1b@l\n\t"
 	   "2:"
 	   : "=r" (ret)
-	   : "X" (&global), "X" (f1), "X" (f2), "X" (f3));
+	   : "i" (&global), "i" (f1), "i" (f2), "i" (f3)
+	   : "11", "12", "cr0");
   return ret;
 }
 
@@ -41,7 +42,8 @@ ifunc_one (int (*f1) (void))
 	   "addis %0,%0,%1-1b@ha\n\t"
 	   "addi %0,%0,%1-1b@l"
 	   : "=r" (ret)
-	   : "X" (f1));
+	   : "i" (f1)
+	   : "12");
   return ret;
 }
 #endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ee71e5b6dd6a21e981ad0fa74359e066f5a8b359

commit ee71e5b6dd6a21e981ad0fa74359e066f5a8b359
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Wed Aug 3 00:22:44 2016 +0200

    powerpc: fix ifunc-sel.h with GCC 6
    
    On 32-bit PowerPC GCC 6 always saves the PIC register on the stack in
    the prologue and adjust the stack in the epilogue. It is therefore not
    possible anymore to just exit the function in the inline asm code,
    otherwise it corrupts the stack pointer. This causes the following tests
    to fail when using GCC 6:
    
    FAIL: elf/ifuncmain1
    FAIL: elf/ifuncmain1pic
    FAIL: elf/ifuncmain1picstatic
    FAIL: elf/ifuncmain1pie
    FAIL: elf/ifuncmain1staticpic
    FAIL: elf/ifuncmain1staticpie
    FAIL: elf/ifuncmain1vis
    FAIL: elf/ifuncmain1vispic
    FAIL: elf/ifuncmain1vispie
    FAIL: elf/ifuncmain2pic
    FAIL: elf/ifuncmain2picstatic
    FAIL: elf/ifuncmain3
    FAIL: elf/ifuncmain4picstatic
    FAIL: elf/ifuncmain5
    FAIL: elf/ifuncmain5picstatic
    FAIL: elf/ifuncmain5staticpic
    
    The solution is to replace the beqlr instructions by a beq to the end
    of the inline asm code. This fixes all the above failures.
    
    ChangeLog:
    	* sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Replace beqlr instructions
    	by beq instructions jumping to the end of the function.

diff --git a/ChangeLog b/ChangeLog
index c2ff29c..b66ba7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-03  Aurelien Jarno  <aurelien@aurel32.net>
+
+	* sysdeps/powerpc/ifunc-sel.h (ifunc_sel): Replace beqlr instructions
+	by beq instructions jumping to the end of the function.
+
 2016-08-02  Joseph Myers  <joseph@codesourcery.com>
 
 	* bits/libc-header-start.h: New file.
diff --git a/sysdeps/powerpc/ifunc-sel.h b/sysdeps/powerpc/ifunc-sel.h
index 526d8ed..79d110f 100644
--- a/sysdeps/powerpc/ifunc-sel.h
+++ b/sysdeps/powerpc/ifunc-sel.h
@@ -17,13 +17,14 @@ ifunc_sel (int (*f1) (void), int (*f2) (void), int (*f3) (void))
 	   "addis %0,11,%2-1b@ha\n\t"
 	   "addi %0,%0,%2-1b@l\n\t"
 	   "cmpwi 12,1\n\t"
-	   "beqlr\n\t"
+	   "beq 2f\n\t"
 	   "addis %0,11,%3-1b@ha\n\t"
 	   "addi %0,%0,%3-1b@l\n\t"
 	   "cmpwi 12,-1\n\t"
-	   "beqlr\n\t"
+	   "beq 2f\n\t"
 	   "addis %0,11,%4-1b@ha\n\t"
-	   "addi %0,%0,%4-1b@l"
+	   "addi %0,%0,%4-1b@l\n\t"
+	   "2:"
 	   : "=r" (ret)
 	   : "X" (&global), "X" (f1), "X" (f2), "X" (f3));
   return ret;

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

Summary of changes:
 ChangeLog                   |    9 +++++++++
 sysdeps/powerpc/ifunc-sel.h |   13 ++++++++-----
 2 files changed, 17 insertions(+), 5 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]