This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][builtins] Implement some fetch-and-x operations for Cortex-M
AbandonedPublic

Authored by aykevl on Apr 23 2019, 6:54 PM.

Details

Reviewers
howard.hinnant
Summary

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.

Diff Detail

Event Timeline

aykevl created this revision.Apr 23 2019, 6:54 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 23 2019, 6:54 PM
Herald added subscribers: Restricted Project, llvm-commits, kristof.beyls and 2 others. · View Herald Transcript
aykevl abandoned this revision.Apr 23 2019, 6:54 PM

wrong patch