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 | 1683caab3a3e0aabe5f25351a928913382494a7c (patch) | |
| tree | f5eeb74e6dddbe2d89ca3de3316eda2f46b6c979 /compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S | |
| parent | 442f784814262e1271354ee208f1dedc7b8053de (diff) | |
| download | bcm5719-llvm-1683caab3a3e0aabe5f25351a928913382494a7c.tar.gz bcm5719-llvm-1683caab3a3e0aabe5f25351a928913382494a7c.zip | |
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
llvm-svn: 202812
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 | 22 |
1 files changed, 22 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 new file mode 100644 index 00000000000..db59e055e7e --- /dev/null +++ b/compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S @@ -0,0 +1,22 @@ +/*===-- sync_fetch_and_add_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_add_8 function for the ARM + * architecture. + * + *===----------------------------------------------------------------------===*/ + +#include "sync-ops.h" + +#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) + |

