[libcxx-commits] [PATCH] D60417: [libunwind] Add support for ARMv7-M architecture which uses the Thumb 2 ISA (unified syntax)

Jérémie Faucher-Goulet via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Apr 8 12:05:06 PDT 2019


jeremfg created this revision.
jeremfg added a reviewer: mstorsjo.
Herald added subscribers: libcxx-commits, ldionne, kristof.beyls, javed.absar.

I'm a first time contributor to LLVM...

While attempting to compile the assembly files ( .S) for a Cortex-M4 device using GCC's arm-none-eabi, I encountered issue which this patch fixes.


Repository:
  rUNW libunwind

https://reviews.llvm.org/D60417

Files:
  UnwindRegistersRestore.S
  UnwindRegistersSave.S


Index: UnwindRegistersSave.S
===================================================================
--- UnwindRegistersSave.S
+++ UnwindRegistersSave.S
@@ -750,6 +750,9 @@
 #elif defined(__arm__) && !defined(__APPLE__)
 
 #if !defined(__ARM_ARCH_ISA_ARM)
+#if (__ARM_ARCH_ISA_THUMB == 2)
+  .syntax unified
+#endif
   .thumb
 #endif
 
Index: UnwindRegistersRestore.S
===================================================================
--- UnwindRegistersRestore.S
+++ UnwindRegistersRestore.S
@@ -610,6 +610,9 @@
 #elif defined(__arm__) && !defined(__APPLE__)
 
 #if !defined(__ARM_ARCH_ISA_ARM)
+#if (__ARM_ARCH_ISA_THUMB == 2)
+  .syntax unified
+#endif
   .thumb
 #endif
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60417.194184.patch
Type: text/x-patch
Size: 673 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190408/fb5a45db/attachment.bin>


More information about the libcxx-commits mailing list