Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2006-02-07 21:44:54 +0300
committerJeff Johnston <jjohnstn@redhat.com>2006-02-07 21:44:54 +0300
commit9bbe6d5d283de104216238d684e0a46506326706 (patch)
treebe201e8f20488b3c81392d55d2337acd4948b25f /newlib/libc/machine/arm
parent03a49a00ab2239e769c61592ea946d151ea95114 (diff)
2006-02-07 Paul Brook <paul@codesourcery.com>
* libc/machine/arm/setjmp.S: Add Thumb-2 support. * libc/sys/arm/crt0.S: Add Thumb-2 startup code. * libc/sys/arm/libcfunc.c (do_AngelSWI): Use AngelSWIInsn. * libc/sys/arm/swi.h (AngelSWIInsn, AngelSWIAsm): Define. * libc/sys/arm/trap.S: Disable for Thumb-2.
Diffstat (limited to 'newlib/libc/machine/arm')
-rw-r--r--newlib/libc/machine/arm/setjmp.S31
1 files changed, 28 insertions, 3 deletions
diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S
index d37486090..84e7cd70b 100644
--- a/newlib/libc/machine/arm/setjmp.S
+++ b/newlib/libc/machine/arm/setjmp.S
@@ -51,17 +51,39 @@
Function entry is much simpler. If we are compiling for the Thumb we
just switch into ARM mode and then drop through into the rest of the
function. The function exit code will take care of the restore to
- Thumb mode. */
+ Thumb mode.
+
+ For Thumb-2 do everything in Thumb mode. */
#ifdef __APCS_26__
#define RET movs pc, lr
+#elif defined(__thumb2__)
+#define RET bx lr
#else
#define RET tst lr, #1; \
moveq pc, lr ; \
.word 0xe12fff1e /* bx lr */
#endif
-#ifdef __thumb__
+#ifdef __thumb2__
+.macro COND where when
+ i\where \when
+.endm
+#else
+.macro COND where when
+.endm
+#endif
+
+#if defined(__thumb2__)
+.syntax unified
+.macro MODE
+ .thumb
+ .thumb_func
+.endm
+.macro PROLOGUE name
+.endm
+
+#elif defined(__thumb__)
#define MODE .thumb_func
.macro PROLOGUE name
.code 16
@@ -70,7 +92,7 @@
.code 32
SYM (.arm_start_of.\name):
.endm
-#else
+#else /* Arm */
#define MODE .code 32
.macro PROLOGUE name
.endm
@@ -131,6 +153,9 @@ SYM (\name):
/* Put the return value into the integer result register.
But if it is zero then return 1 instead. */
movs a1, a2
+#ifdef __thumb2__
+ it eq
+#endif
moveq a1, #1
FUNC_END longjmp