aboutsummaryrefslogtreecommitdiff
path: root/ports/sysdeps/arm
diff options
context:
space:
mode:
Diffstat (limited to 'ports/sysdeps/arm')
-rw-r--r--ports/sysdeps/arm/sysdep.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/ports/sysdeps/arm/sysdep.h b/ports/sysdeps/arm/sysdep.h
index c525d5b977..d855ceb3c3 100644
--- a/ports/sysdeps/arm/sysdep.h
+++ b/ports/sysdeps/arm/sysdep.h
@@ -117,6 +117,16 @@
the caller. */
.eabi_attribute 24, 1
+/* The thumb2 encoding is reasonably complete. Unless suppressed, use it. */
+ .syntax unified
+# if defined(__thumb2__) && !defined(NO_THUMB)
+ .thumb
+#else
+# undef __thumb__
+# undef __thumb2__
+ .arm
+# endif
+
/* Load or store to/from a pc-relative EXPR into/from R, using T. */
# ifdef __thumb2__
# define LDST_PCREL(OP, R, T, EXPR) \
@@ -172,8 +182,7 @@
#endif /* __ASSEMBLER__ */
/* This number is the offset from the pc at the current location. */
-/* ??? At the moment we're not turning on thumb mode in assembly. */
-#if defined(__thumb__) && !defined(__ASSEMBLER__)
+#ifdef __thumb__
# define PC_OFS 4
#else
# define PC_OFS 8