builtins: make ARM compilation with GAS work again
The LLVM IAS seems to accept wide instructions for add and sub in ARM mode even
though it is not permitted. This uses a macro to ensure that the wide modifier
is only applied when building in THUMB mode.
This repairs building with GCC/GAS in ARM mode.
llvm-svn: 214046
diff --git a/compiler-rt/lib/builtins/arm/udivsi3.S b/compiler-rt/lib/builtins/arm/udivsi3.S
index 7086a44..bb5f8a0 100644
--- a/compiler-rt/lib/builtins/arm/udivsi3.S
+++ b/compiler-rt/lib/builtins/arm/udivsi3.S
@@ -112,8 +112,8 @@
#define block(shift) \
cmp r0, r1, lsl IMM shift; \
ITT(hs); \
- addhs.w r3, r3, IMM (1 << shift); \
- subhs.w r0, r0, r1, lsl IMM shift
+ WIDE(addhs) r3, r3, IMM (1 << shift); \
+ WIDE(subhs) r0, r0, r1, lsl IMM shift
block(31)
block(30)