diff options
| author | Ed Schouten <ed@80386.nl> | 2013-06-15 09:40:14 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@80386.nl> | 2013-06-15 09:40:14 +0000 |
| commit | 60afa2d923e6032b3295a87ca5144322437a59ce (patch) | |
| tree | 6356965092e006ce572b7432f44c17fd63cf39ff /clang/lib/Basic/Targets.cpp | |
| parent | 8e8415f5ab255b051f15d24b60f80d83ffef6753 (diff) | |
| download | bcm5719-llvm-60afa2d923e6032b3295a87ca5144322437a59ce.tar.gz bcm5719-llvm-60afa2d923e6032b3295a87ca5144322437a59ce.zip | |
Emit native implementations of atomic operations on FreeBSD/armv6.
Just like on Linux, FreeBSD/armv6 assumes the system supports
ldrex/strex unconditionally. It is also used by the kernel. We can
therefore enable support for it, like we do on Linux.
While there, change one of the unit tests to explicitly test against
armv5 instead of armv7, as it actually tests whether libcalls are
emitted.
llvm-svn: 184040
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
| -rw-r--r-- | clang/lib/Basic/Targets.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index baf83c1a14c..f3d7e0ce671 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -3534,8 +3534,8 @@ class ARMTargetInfo : public TargetInfo { // the kernel which on armv6 and newer uses ldrex and strex. The net result // is that if we assume the kernel is at least as recent as the hardware, // it is safe to use atomic instructions on armv6 and newer. - if (T.getOS() != llvm::Triple::Linux) - return false; + if (T.getOS() != llvm::Triple::Linux && T.getOS() != llvm::Triple::FreeBSD) + return false; StringRef ArchName = T.getArchName(); if (T.getArch() == llvm::Triple::arm) { if (!ArchName.startswith("armv")) |

