aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
diff options
context:
space:
mode:
authorJonathan Roelofs <jonathan@codesourcery.com>2017-09-06 17:09:25 +0000
committerJonathan Roelofs <jonathan@codesourcery.com>2017-09-06 17:09:25 +0000
commitb780c8ac75bd22f9bdd824aca848e5d552e07eba (patch)
treec934b100afc1003330541437316eca53809d5ecf /llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
parentd548bb9d377f75ac5fc0ea6845664d9a047eca71 (diff)
downloadllvm-b780c8ac75bd22f9bdd824aca848e5d552e07eba.zip
llvm-b780c8ac75bd22f9bdd824aca848e5d552e07eba.tar.gz
llvm-b780c8ac75bd22f9bdd824aca848e5d552e07eba.tar.bz2
Fix ARM bare metal driver to support atomics
The new bare metal support only supports the single thread model. This causes the builtin atomic functions (e.g.: __atomic_fetch_add) to not generate thread-safe assembly for these operations, which breaks our firmware. We target bare metal, and need to atomically modify variables in our interrupt routines, and task threads. Internally, the -mthread-model flag determines whether to lower or expand atomic operations (see D4984). This change removes the overridden thread model methods, and instead relies on the base ToolChain class to validate the thread model (which already includes logic to validate single thread model support). If the single thread model is required, the -mthread-model flag will have to be provided. As a workaround "-mthread-model posix" could be provided, but it only works due to a bug in the validation of the -mthread-model flag (separate patch coming to fix this). https://reviews.llvm.org/D37493 Patch by: Ian Tessier! llvm-svn: 312651
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp')
0 files changed, 0 insertions, 0 deletions