[PATCH] D61050: [compiler-rt][builtins] Implement some fetch-and-x operations for Cortex-M
Ayke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 23 18:54:27 PDT 2019
aykevl created this revision.
aykevl added a reviewer: howard.hinnant.
Herald added subscribers: Sanitizers, llvm-commits, kristof.beyls, javed.absar, dberris.
Herald added projects: LLVM, Sanitizers.
This patch adds support for the following builtins on the Cortex-M0 and Cortex-M3:
__sync_fetch_and_add_4
__sync_fetch_and_add_8
__sync_fetch_and_and_4
__sync_fetch_and_and_8
__sync_fetch_and_nand_4
__sync_fetch_and_nand_8
__sync_fetch_and_or_4
__sync_fetch_and_or_8
__sync_fetch_and_sub_4
__sync_fetch_and_sub_8
__sync_fetch_and_xor_4
__sync_fetch_and_xor_8
The assembly for Cortex-M3 and up could be slightly more efficient, but I've chosen to keep it simple so that all ARM processors can deal with it.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D61050
Files:
lib/builtins/arm/sync-ops.h
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_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_xor_8.S
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61050.196363.patch
Type: text/x-patch
Size: 4746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190424/d1044526/attachment.bin>
More information about the llvm-commits
mailing list