Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1071)

Side by Side Diff: src/IceIntrinsics.h

Issue 1017453007: Subzero: Support non sequentially consistent memory orderings for atomic ops. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: More cleanup; add tests for non-constant memory orderings Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceIntrinsics.h - List of Ice Intrinsics -----*- C++ -*-===// 1 //===- subzero/src/IceIntrinsics.h - List of Ice Intrinsics -----*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file declares the kinds of intrinsics supported by PNaCl. 10 // This file declares the kinds of intrinsics supported by PNaCl.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 MemoryOrderInvalid = 0, // Invalid, keep first. 84 MemoryOrderInvalid = 0, // Invalid, keep first.
85 MemoryOrderRelaxed, 85 MemoryOrderRelaxed,
86 MemoryOrderConsume, 86 MemoryOrderConsume,
87 MemoryOrderAcquire, 87 MemoryOrderAcquire,
88 MemoryOrderRelease, 88 MemoryOrderRelease,
89 MemoryOrderAcquireRelease, 89 MemoryOrderAcquireRelease,
90 MemoryOrderSequentiallyConsistent, 90 MemoryOrderSequentiallyConsistent,
91 MemoryOrderNum // Invalid, keep last. 91 MemoryOrderNum // Invalid, keep last.
92 }; 92 };
93 93
94 static bool VerifyMemoryOrder(uint64_t Order); 94 // Verify memory ordering rules for atomic intrinsics. For
95 // AtomicCmpxchg, Order is the "success" ordering and OrderOther is
96 // the "failure" ordering. Returns true if valid, false if invalid.
97 static bool isMemoryOrderValid(IntrinsicID ID, uint64_t Order,
98 uint64_t OrderOther = MemoryOrderInvalid);
95 99
96 enum SideEffects { SideEffects_F = 0, SideEffects_T = 1 }; 100 enum SideEffects { SideEffects_F = 0, SideEffects_T = 1 };
97 101
98 enum ReturnsTwice { ReturnsTwice_F = 0, ReturnsTwice_T = 1 }; 102 enum ReturnsTwice { ReturnsTwice_F = 0, ReturnsTwice_T = 1 };
99 103
100 // Basic attributes related to each intrinsic, that are relevant to 104 // Basic attributes related to each intrinsic, that are relevant to
101 // code generation. Perhaps the attributes representation can be shared 105 // code generation. Perhaps the attributes representation can be shared
102 // with general function calls, but PNaCl currently strips all 106 // with general function calls, but PNaCl currently strips all
103 // attributes from functions. 107 // attributes from functions.
104 struct IntrinsicInfo { 108 struct IntrinsicInfo {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 160
157 private: 161 private:
158 // TODO(jvoung): May want to switch to something like LLVM's StringMap. 162 // TODO(jvoung): May want to switch to something like LLVM's StringMap.
159 typedef std::map<IceString, FullIntrinsicInfo> IntrinsicMap; 163 typedef std::map<IceString, FullIntrinsicInfo> IntrinsicMap;
160 IntrinsicMap Map; 164 IntrinsicMap Map;
161 }; 165 };
162 166
163 } // end of namespace Ice 167 } // end of namespace Ice
164 168
165 #endif // SUBZERO_SRC_ICEINTRINSICS_H 169 #endif // SUBZERO_SRC_ICEINTRINSICS_H
OLDNEW
« no previous file with comments | « src/IceGlobalContext.cpp ('k') | src/IceIntrinsics.cpp » ('j') | src/IceIntrinsics.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698