diff options
-rw-r--r-- | compiler-rt/lib/builtins/arm/udivmodsi4.S | 4 | ||||
-rw-r--r-- | compiler-rt/lib/builtins/arm/udivsi3.S | 4 | ||||
-rw-r--r-- | compiler-rt/lib/builtins/arm/umodsi3.S | 2 | ||||
-rw-r--r-- | compiler-rt/lib/builtins/assembly.h | 6 |
4 files changed, 11 insertions, 5 deletions
diff --git a/compiler-rt/lib/builtins/arm/udivmodsi4.S b/compiler-rt/lib/builtins/arm/udivmodsi4.S index 441f48dbe39..aaece9727d3 100644 --- a/compiler-rt/lib/builtins/arm/udivmodsi4.S +++ b/compiler-rt/lib/builtins/arm/udivmodsi4.S @@ -112,8 +112,8 @@ DEFINE_COMPILERRT_FUNCTION(__udivmodsi4) #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) diff --git a/compiler-rt/lib/builtins/arm/udivsi3.S b/compiler-rt/lib/builtins/arm/udivsi3.S index 7086a44e185..bb5f8a069f4 100644 --- a/compiler-rt/lib/builtins/arm/udivsi3.S +++ b/compiler-rt/lib/builtins/arm/udivsi3.S @@ -112,8 +112,8 @@ DEFINE_COMPILERRT_FUNCTION(__udivsi3) #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) diff --git a/compiler-rt/lib/builtins/arm/umodsi3.S b/compiler-rt/lib/builtins/arm/umodsi3.S index 93614a01cba..eb1f441b580 100644 --- a/compiler-rt/lib/builtins/arm/umodsi3.S +++ b/compiler-rt/lib/builtins/arm/umodsi3.S @@ -107,7 +107,7 @@ DEFINE_COMPILERRT_FUNCTION(__umodsi3) #define block(shift) \ cmp r0, r1, lsl IMM shift; \ IT(hs); \ - subhs.w r0, r0, r1, lsl IMM shift + WIDE(subhs) r0, r0, r1, lsl IMM shift block(31) block(30) diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h index 8cbd3853011..6a853dc753d 100644 --- a/compiler-rt/lib/builtins/assembly.h +++ b/compiler-rt/lib/builtins/assembly.h @@ -99,6 +99,12 @@ #define IT(cond) #define ITT(cond) #endif + +#if __ARM_ARCH_ISA_THUMB == 2 +#define WIDE(op) op.w +#else +#define WIDE(op) op +#endif #endif #define GLUE2(a, b) a##b |