[PATCH] Make the unwinder build on thumbv6-m with the integrated assembler.

Jonathan Roelofs jonathan at codesourcery.com
Fri Feb 13 15:42:53 PST 2015


Hi compnerd,

Integrated AS likes UAL, and can't handle pre-UAL garbage like thumb1 'mov r0, #0'.

http://reviews.llvm.org/D7630

Files:
  UnwindRegistersSave.S

Index: UnwindRegistersSave.S
===================================================================
--- UnwindRegistersSave.S
+++ UnwindRegistersSave.S
@@ -307,16 +307,17 @@
   str r2, [r0, #52]
   str r3, [r0, #56]
   str r3, [r0, #60]  @ store return address as pc
+  movs r0, #0        @ return UNW_ESUCCESS
 #else
   @ 32bit thumb-2 restrictions for stm:
   @ . the sp (r13) cannot be in the list
   @ . the pc (r15) cannot be in the list in an STM instruction
   stm r0, {r0-r12}
   str sp, [r0, #52]
   str lr, [r0, #56]
   str lr, [r0, #60]  @ store return address as pc
-#endif
   mov r0, #0         @ return UNW_ESUCCESS
+#endif
   JMP(lr)
 
 @

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7630.19943.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150213/fe55136a/attachment.bin>


More information about the cfe-commits mailing list