[PATCH] [compiler-rt] Do not use ldrexd or strexd on v7M

Oliver Stannard oliver.stannard at arm.com
Thu Sep 25 08:48:14 PDT 2014


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.

http://reviews.llvm.org/D5490

Files:
  lib/builtins/arm/sync_fetch_and_add_8.S
  lib/builtins/arm/sync_fetch_and_and_8.S
  lib/builtins/arm/sync_fetch_and_max_8.S
  lib/builtins/arm/sync_fetch_and_min_8.S
  lib/builtins/arm/sync_fetch_and_nand_8.S
  lib/builtins/arm/sync_fetch_and_or_8.S
  lib/builtins/arm/sync_fetch_and_sub_8.S
  lib/builtins/arm/sync_fetch_and_umax_8.S
  lib/builtins/arm/sync_fetch_and_umin_8.S
  lib/builtins/arm/sync_fetch_and_xor_8.S
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5490.14074.patch
Type: text/x-patch
Size: 4304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140925/1114c8c9/attachment.bin>


More information about the llvm-commits mailing list