summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-09-14 21:56:37 +0000
committerDan Gohman <dan433584@gmail.com>2015-09-14 21:56:37 +0000
commitf1c34e6731ce472598c9096efad666af90d1eeba (patch)
tree7f13388cc59b2ae6ae761aa21f1d7598b94960ca /clang/lib/Basic/Targets.cpp
parent15707de865ccf66e68646af54706849a8ec5dd12 (diff)
downloadbcm5719-llvm-f1c34e6731ce472598c9096efad666af90d1eeba.tar.gz
bcm5719-llvm-f1c34e6731ce472598c9096efad666af90d1eeba.zip
[WebAssembly] Define the atomic type sizes
WebAssembly's spec has now been updated to specify some guarantees about lock free atomic accesses. Update clang to match. This also updates sig_atomic_t to be 64-bit on wasm64. WebAssembly does not presently have asynchronous interrupts, but this change is within the spirit of how they will work if they are added. Differential Revision: http://reviews.llvm.org/D12862 llvm-svn: 247624
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r--clang/lib/Basic/Targets.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 2007f01c2ad..35d7030a250 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -6994,6 +6994,7 @@ public:
LargeArrayMinWidth = 128;
LargeArrayAlign = 128;
SimdDefaultAlign = 128;
+ SigAtomicType = SignedLong;
}
protected:
@@ -7096,8 +7097,7 @@ class WebAssembly32TargetInfo : public WebAssemblyTargetInfo {
public:
explicit WebAssembly32TargetInfo(const llvm::Triple &T)
: WebAssemblyTargetInfo(T) {
- // TODO: Set this to the correct value once the spec issues are resolved.
- MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 0;
+ MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
DataLayoutString = "e-p:32:32-i64:64-n32:64-S128";
}
@@ -7115,8 +7115,7 @@ public:
: WebAssemblyTargetInfo(T) {
LongAlign = LongWidth = 64;
PointerAlign = PointerWidth = 64;
- // TODO: Set this to the correct value once the spec issues are resolved.
- MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 0;
+ MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
DataLayoutString = "e-p:64:64-i64:64-n32:64-S128";
}
OpenPOWER on IntegriCloud