[PATCH] ARM: Allow building __sigsetjmp as Thumb.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] ARM: Allow building __sigsetjmp as Thumb.

Will Newton

Convert __sigsetjmp code to allow building as Thumb.

ports/ChangeLog.arm:

2013-09-25  Will Newton  <[hidden email]>

        * sysdeps/arm/setjmp.S (NO_THUMB): Remove define.
        (__sigsetjmp): Use Thumb supported instructions.
---
 ports/sysdeps/arm/setjmp.S | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/ports/sysdeps/arm/setjmp.S b/ports/sysdeps/arm/setjmp.S
index b38b919..fedd994 100644
--- a/ports/sysdeps/arm/setjmp.S
+++ b/ports/sysdeps/arm/setjmp.S
@@ -16,8 +16,6 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */

-/* ??? Needs more rearrangement for the STM to handle thumb mode.  */
-#define NO_THUMB
 #include <sysdep.h>
 #include <bits/setjmp.h>
 #include <rtld-global-offsets.h>
@@ -35,7 +33,8 @@ ENTRY (__sigsetjmp)
  sfi_breg ip, \
  stmia \B!, JMP_BUF_REGLIST
 #ifdef PTR_MANGLE
- PTR_MANGLE2 (a4, sp, a3)
+ mov a4, sp
+ PTR_MANGLE2 (a4, a4, a3)
  str a4, [ip], #4
  PTR_MANGLE2 (a4, lr, a3)
  str a4, [ip], #4
--
1.8.1.4

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ARM: Allow building __sigsetjmp as Thumb.

Joseph Myers
On Thu, 3 Oct 2013, Will Newton wrote:

> Convert __sigsetjmp code to allow building as Thumb.
>
> ports/ChangeLog.arm:
>
> 2013-09-25  Will Newton  <[hidden email]>
>
> * sysdeps/arm/setjmp.S (NO_THUMB): Remove define.
> (__sigsetjmp): Use Thumb supported instructions.

OK, if you've tested with the glibc testsuite for both ARM-mode and
Thumb-mode builds.

--
Joseph S. Myers
[hidden email]