diff options
| author | Oliver Stannard <oliver.stannard@arm.com> | 2014-09-29 10:23:20 +0000 |
|---|---|---|
| committer | Oliver Stannard <oliver.stannard@arm.com> | 2014-09-29 10:23:20 +0000 |
| commit | 609e2e6a6e001bcbe3da469a0c117fa570ca71aa (patch) | |
| tree | 5b7cee154cc654f932f325f7b46845e4326f301d /compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S | |
| parent | 6cbf43167bf33689e8b02920cde6758f8dba8d8d (diff) | |
| download | bcm5719-llvm-609e2e6a6e001bcbe3da469a0c117fa570ca71aa.tar.gz bcm5719-llvm-609e2e6a6e001bcbe3da469a0c117fa570ca71aa.zip | |
[compiler-rt] Do not use ldrexd or strexd on v7M
The ldrexd and strexd instructions are undefined for the ARMv7M
architecture, so we cannot use them to implement the
__sync_fetch_and_*_8 builtins. There is no other way to implement
these without OS support, so this patch #ifdef's these functions out
for M-class architectures.
There are no tests as I cannot find any existing tests for these
builtins.
I used the __ARM_ARCH_PROFILE predefine because __ARM_FEATURE_LDREX is
deprecated and not set by clang.
llvm-svn: 218601
Diffstat (limited to 'compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S')
| -rw-r--r-- | compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S b/compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S index db59e055e7e..5724bb148ba 100644 --- a/compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S +++ b/compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S @@ -14,9 +14,11 @@ #include "sync-ops.h" +#if __ARM_ARCH_PROFILE != 'M' #define add_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI) \ adds rD_LO, rN_LO, rM_LO ; \ adc rD_HI, rN_HI, rM_HI SYNC_OP_8(add_8) +#endif |

