]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
ARM: Allow building __longjmp as Thumb.
authorWill Newton <will.newton@linaro.org>
Wed, 25 Sep 2013 09:14:20 +0000 (10:14 +0100)
committerWill Newton <will.newton@linaro.org>
Fri, 4 Oct 2013 09:53:43 +0000 (10:53 +0100)
Convert __longjmp code to allow building as Thumb.

ports/ChangeLog.arm:

2013-10-04  Will Newton  <will.newton@linaro.org>

* sysdeps/arm/__longjmp.S (NO_THUMB): Remove define.
(__longjmp): Use Thumb supported instructions.
* sysdeps/unix/sysv/linux/arm/____longjmp_chk.S (NO_THUMB):
Remove define.

ports/ChangeLog.arm
ports/sysdeps/arm/__longjmp.S
ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S

index 0724dbd9a008f2b923b93c6c123348b50edce6e6..3f47d5e3d45e1e43fb12a7aa8ef678bbeebf691b 100644 (file)
@@ -1,3 +1,10 @@
+2013-10-04  Will Newton  <will.newton@linaro.org>
+
+       * sysdeps/arm/__longjmp.S (NO_THUMB): Remove define.
+       (__longjmp): Use Thumb supported instructions.
+       * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S (NO_THUMB):
+       Remove define.
+
 2013-10-03  Will Newton  <will.newton@linaro.org>
 
        * sysdeps/arm/__longjmp.S (__longjmp): Demangle fp, sp
index 2b1f7f41c19ee7ed46f1107a5238c18f14d25b15..894c121c0fe372f98fea8de41dd63dce809538c1 100644 (file)
@@ -16,8 +16,6 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* ??? Needs more rearrangement for the LDM to handle thumb mode.  */
-#define NO_THUMB
 #include <sysdep.h>
 #include <bits/setjmp.h>
 #include <rtld-global-offsets.h>
@@ -28,6 +26,7 @@
 ENTRY (__longjmp)
        mov     ip, r0
        movs    r0, r1          /* get the return value in place */
+       it      eq
        moveq   r0, #1          /* can't let setjmp() return zero! */
 
 #ifdef CHECK_SP
@@ -44,7 +43,8 @@ ENTRY (__longjmp)
 #ifdef PTR_DEMANGLE
        PTR_DEMANGLE (fp, a4, a3, a2)
        ldr     a4, [ip], #4
-       PTR_DEMANGLE2 (sp, a4, a3)
+       PTR_DEMANGLE2 (a4, a4, a3)
+       mov     sp, a4
        ldr     a4, [ip], #4
        PTR_DEMANGLE2 (lr, a4, a3)
 #else
index 6ee7a1aebd7872fe243bc24ddddd9db04b5d94a6..6777ef646bf7182c92632c71fcd6323b404323aa 100644 (file)
@@ -15,8 +15,6 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* ??? Needs more rearrangement for the LDM to handle thumb mode.  */
-#define NO_THUMB
 #include <sysdep.h>
 
        .section .rodata.str1.1,"aMS",%progbits,1