diff options
author | Tim Northover <tnorthover@apple.com> | 2014-03-04 10:10:17 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-03-04 10:10:17 +0000 |
commit | 11d04ee709db1aff256f904e384aae0d9ac24447 (patch) | |
tree | 92794e4eaee7c799b7b79b29a9adcc9625e6ddac /lib/builtins/arm/sync_fetch_and_nand_8.S | |
parent | 5ad91b8305eac34b7d9a777a7a3c2b098de0fedf (diff) | |
download | compiler-rt-11d04ee709db1aff256f904e384aae0d9ac24447.tar.gz |
ARM: implement __sync_fetch_and_* operations
Since these are primarily useful for deeply embedded targets where code size is
very important, they are each in a separate file making use of infrastructure
in sync-ops.h. This allows a linker to include just the functions that are
actually used.
rdar://problem/14736665
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/arm/sync_fetch_and_nand_8.S')
-rw-r--r-- | lib/builtins/arm/sync_fetch_and_nand_8.S | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/builtins/arm/sync_fetch_and_nand_8.S b/lib/builtins/arm/sync_fetch_and_nand_8.S new file mode 100644 index 000000000..80e8c00f8 --- /dev/null +++ b/lib/builtins/arm/sync_fetch_and_nand_8.S @@ -0,0 +1,22 @@ +/*===-- sync_fetch_and_nand_8.S - ------------------------------------------===// + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + *===----------------------------------------------------------------------===// + * + * This file implements the __sync_fetch_and_nand_8 function for the ARM + * architecture. + * + *===----------------------------------------------------------------------===*/ + +#include "sync-ops.h" + +#define nand_8(rD_LO, rD_HI, rN_LO, rN_HI, rM_LO, rM_HI) \ + bic rD_LO, rN_LO, rM_LO ; \ + bic rD_HI, rN_HI, rM_HI + +SYNC_OP_8(nand_8) + |