Skip to content

Commit

Permalink
Make setjmp/longjmp calls always only use Thumb
Browse files Browse the repository at this point in the history
The Cortex-M0+ doesn't support anything but Thumb mode, so ensure the
setjmp.S file doesn't use the standard versions of the instructions.
  • Loading branch information
earlephilhower committed Feb 2, 2022
1 parent a76ef0a commit c7d3669
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/lib-setjmp-thumb.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S
index 21d6ff9e7..6e337842c 100644
--- a/newlib/libc/machine/arm/setjmp.S
+++ b/newlib/libc/machine/arm/setjmp.S
@@ -59,7 +59,7 @@

.syntax unified

-#if __ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM
+#if 1
/* ARMv6-M-like has to be implemented in Thumb mode. */

.thumb

0 comments on commit c7d3669

Please sign in to comment.