<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">At this point our CI has been broken for over 8h, so I would prefer to revert the change until Tim had a time to review the patch.<div class=""><br class=""></div><div class="">—Juergen<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Sep 27, 2017, at 11:49 AM, Juergen Ributzka via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline"><br class=""><blockquote type="cite" class=""><div class="">On Sep 27, 2017, at 11:34 AM, Manoj Gupta <<a href="mailto:manojgupta@google.com" class="">manojgupta@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">The following confirms that armv7k target wants thumb as default:</div><div class=""><br class=""></div><div class="">// No -mthumb in argument</div><div class=""><div class="">$ clang -target armv7k-watchos   -mcpu=cortex-a7 -x c -E -dM /dev/null -o -|grep -i thumb</div><div class="">#define __ARM_ARCH_ISA_THUMB 2</div><div class="">#define __THUMBEL__ 1</div><div class="">#define __THUMB_INTERWORK__ 1</div><div class="">#define __thumb2__ 1</div><div class="">#define __thumb__ 1</div></div><div class=""><br class=""></div><div class="">// Add -marm</div><div class=""><div class=""> $ clang -target armv7k-watchos -marm  -mcpu=cortex-a7 -x c -E -dM /dev/null -o -|grep -i thumb</div><div class="">#define __ARM_ARCH_ISA_THUMB 2</div><div class="">#define __THUMB_INTERWORK__ 1</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I assume that following patch to lib/builtins/assembly.h should fix it  But I should probably add an apple check as well to 7K. What should that be?</div><div class=""><br class=""></div></div></div></blockquote><div class=""><br class=""></div><div class="">Sorry, I don’t know either. I am not familiar with this code, so I defer to Tim who is the expert.</div><div class=""><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="">diff --git a/lib/builtins/assembly.h b/lib/builtins/assembly.h</div><div class="">index 3f5e59b25..206c9b29c 100644</div><div class="">--- a/lib/builtins/assembly.h</div><div class="">+++ b/lib/builtins/assembly.h</div><div class="">@@ -69,12 +69,20 @@</div><div class=""> </div><div class=""> #if defined(__arm__)</div><div class=""> </div><div class="">+#ifdef __ARM_ARCH_7K__</div><div class="">+</div><div class="">+#define DEFINE_CODE_STATE .arm SEPARATOR</div><div class="">+#define DECLARE_FUNC_ENCODING</div><div class="">+#define IT(cond)</div><div class="">+#define ITT(cond)</div><div class="">+#define ITE(cond)</div><div class="">+</div><div class=""> /*</div><div class="">  * Determine actual [ARM][THUMB[1][2]] ISA using compiler predefined macros:</div><div class="">  * - for '-mthumb -march=armv6' compiler defines '__thumb__'</div><div class="">  * - for '-mthumb -march=armv7' compiler defines '__thumb__' and '__thumb2__'</div><div class="">  */</div><div class="">-#if defined(__thumb2__) || defined(__thumb__)</div><div class="">+#elif defined(__thumb2__) || defined(__thumb__)</div><div class=""> #define DEFINE_CODE_STATE .thumb SEPARATOR</div><div class=""> #define DECLARE_FUNC_ENCODING    .thumb_func SEPARATOR</div><div class=""> #if defined(__thumb2__)</div></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Sep 27, 2017 at 11:32 AM, Juergen Ributzka<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:juergen@apple.com" target="_blank" class="">juergen@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="" style="word-wrap: break-word; line-break: after-white-space;">[+Tim]<div class=""><div class="h5"><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Sep 27, 2017, at 11:14 AM, Manoj Gupta <<a href="mailto:manojgupta@google.com" target="_blank" class="">manojgupta@google.com</a>> wrote:</div><br class="m_648944018011841916Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">I don't know much about armv7k. But adding -marm to the command line fixes the error.  <br class=""></div><div class="">clang    -O2 -g -DNDEBUG     -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall  -arch armv7k -MMD -MT aeabi_cdcmp.S.o -MF aeabi_cdcmp.S.o.d -o aeabi_cdcmp.S.o -c aeabi_cdcmp.S -target armv7k-watchos // This fails<br class=""></div><div class=""><div class="">clang    -O2 -g -DNDEBUG     -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall  -arch armv7k -MMD -MT aeabi_cdcmp.S.o -MF aeabi_cdcmp.S.o.d -o aeabi_cdcmp.S.o -c aeabi_cdcmp.S -target armv7k-watchos -marm // This works</div></div><div class=""><br class=""></div><div class="">This makes me think that the using armv7k target defaults to thumb but it wants compilation to be done in ARM mode for the builtins?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Manoj</div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Sep 27, 2017 at 10:46 AM, Juergen Ributzka<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:juergen@ributzka.de" target="_blank" class="">juergen@ributzka.de</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr" class="">I think this broke Green Dragon. Could you please take a look?<div class=""><br class=""></div><div class=""><a href="http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_build/39186/consoleFull#-187600398149ba4694-19c4-4d7e-bec5-911270d8a58c" target="_blank" class="">http://green.lab.llvm.org/gree<wbr class="">n/job/clang-stage1-configure-<wbr class="">RA_build/39186/consoleFull#-18<wbr class="">7600398149ba4694-19c4-4d7e-bec<wbr class="">5-911270d8a58c</a><br class=""></div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Juergen</div></div><div class="m_648944018011841916HOEnZb"><div class="m_648944018011841916h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Sep 27, 2017 at 2:29 AM, Manoj Gupta via llvm-commits<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">Author: manojgupta<br class="">Date: Wed Sep 27 02:29:57 2017<br class="">New Revision: 314284<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=314284&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-pr<wbr class="">oject?rev=314284&view=rev</a><br class="">Log:<br class="">[Builtins] ARM: Fix msr assembly instruction use for Thumb2.<br class=""><br class="">Summary:<br class="">MSR instruction in Thumb2 does not support immediate operand.<br class="">Fix this by moving the condition for V7-M to Thumb2 since V7-M support<br class="">Thumb2 only. With this change, aeabi_cfcmp.s and aeabi_cdcmp.S files can<br class="">be assembled in Thumb2 mode. (This is split out from the review D38227).<br class=""><br class="">Reviewers: compnerd, peter.smith, srhines, weimingz, rengolin, kristof.beyls<br class=""><br class="">Reviewed By: compnerd<br class=""><br class="">Subscribers: aemerson, javed.absar, llvm-commits<br class=""><br class="">Differential Revision:<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D38268" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D3826<wbr class="">8</a><br class=""><br class="">Modified:<br class="">    compiler-rt/trunk/lib/builtins<wbr class="">/arm/aeabi_cdcmp.S<br class="">    compiler-rt/trunk/lib/builtins<wbr class="">/arm/aeabi_cfcmp.S<br class=""><br class="">Modified: compiler-rt/trunk/lib/builtins<wbr class="">/arm/aeabi_cdcmp.S<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/aeabi_cdcmp.S?rev=314284&r1=314283&r2=314284&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-pr<wbr class="">oject/compiler-rt/trunk/lib/bu<wbr class="">iltins/arm/aeabi_cdcmp.S?rev=3<wbr class="">14284&r1=314283&r2=314284&view<wbr class="">=diff</a><br class="">==============================<wbr class="">==============================<wbr class="">==================<br class="">--- compiler-rt/trunk/lib/builtins<wbr class="">/arm/aeabi_cdcmp.S (original)<br class="">+++ compiler-rt/trunk/lib/builtins<wbr class="">/arm/aeabi_cdcmp.S Wed Sep 27 02:29:57 2017<br class="">@@ -48,7 +48,7 @@ DEFINE_COMPILERRT_FUNCTION(__a<wbr class="">eabi_cdcmp<br class="">         // NaN has been ruled out, so __aeabi_cdcmple can't trap<br class="">         bne __aeabi_cdcmple<br class=""><br class="">-#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)<br class="">+#if defined(USE_THUMB_2)<br class="">         mov ip, #APSR_C<br class="">         msr APSR_nzcvq, ip<br class=""> #else<br class=""><br class="">Modified: compiler-rt/trunk/lib/builtins<wbr class="">/arm/aeabi_cfcmp.S<br class="">URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/arm/aeabi_cfcmp.S?rev=314284&r1=314283&r2=314284&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-pr<wbr class="">oject/compiler-rt/trunk/lib/bu<wbr class="">iltins/arm/aeabi_cfcmp.S?rev=3<wbr class="">14284&r1=314283&r2=314284&view<wbr class="">=diff</a><br class="">==============================<wbr class="">==============================<wbr class="">==================<br class="">--- compiler-rt/trunk/lib/builtins<wbr class="">/arm/aeabi_cfcmp.S (original)<br class="">+++ compiler-rt/trunk/lib/builtins<wbr class="">/arm/aeabi_cfcmp.S Wed Sep 27 02:29:57 2017<br class="">@@ -48,7 +48,7 @@ DEFINE_COMPILERRT_FUNCTION(__a<wbr class="">eabi_cfcmp<br class="">         // NaN has been ruled out, so __aeabi_cfcmple can't trap<br class="">         bne __aeabi_cfcmple<br class=""><br class="">-#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)<br class="">+#if defined(USE_THUMB_2)<br class="">         mov ip, #APSR_C<br class="">         msr APSR_nzcvq, ip<br class=""> #else<br class=""><br class=""><br class="">______________________________<wbr class="">_________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-commits</a><br class=""></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">llvm-commits mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a></span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></span></div></blockquote></div><br class=""></div></body></html>