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

Unified Diff: src/compiler/machine-operator.cc

Issue 1124813005: WIP Atomics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix AtomicsLoad type in typer.cc Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator.cc
diff --git a/src/compiler/machine-operator.cc b/src/compiler/machine-operator.cc
index 07bcf3f77f1b208a2c7dc8c655151aede2d0b084..247b01eaf326a55a40370ba698f7a4e8ca48baf6 100644
--- a/src/compiler/machine-operator.cc
+++ b/src/compiler/machine-operator.cc
@@ -200,8 +200,16 @@ struct MachineOperatorGlobalCache {
IrOpcode::kCheckedLoad, Operator::kNoThrow | Operator::kNoWrite, \
"CheckedLoad", 3, 1, 1, 1, 1, 0, k##Type) {} \
}; \
+ struct LoadAtomic##Type##Operator final \
+ : public Operator1<LoadRepresentation> { \
+ LoadAtomic##Type##Operator() \
+ : Operator1<LoadRepresentation>( \
+ IrOpcode::kLoadAtomic, Operator::kNoThrow | Operator::kNoWrite, \
+ "LoadAtomic", 2, 1, 1, 1, 1, 0, k##Type) {} \
+ }; \
Load##Type##Operator kLoad##Type; \
- CheckedLoad##Type##Operator kCheckedLoad##Type;
+ CheckedLoad##Type##Operator kCheckedLoad##Type; \
+ LoadAtomic##Type##Operator kLoadAtomic##Type;
MACHINE_TYPE_LIST(LOAD)
#undef LOAD
@@ -273,6 +281,23 @@ const Operator* MachineOperatorBuilder::Load(LoadRepresentation rep) {
}
+const Operator* MachineOperatorBuilder::LoadAtomic(LoadRepresentation rep) {
+ switch (rep) {
+#define LOAD(Type) \
+ case k##Type: \
+ return &cache_.kLoadAtomic##Type;
+ MACHINE_TYPE_LIST(LOAD)
+#undef LOAD
+ default:
+ break;
+ }
+ // Uncached.
+ return new (zone_) Operator1<LoadRepresentation>( // --
+ IrOpcode::kLoad, Operator::kNoThrow | Operator::kNoWrite, "LoadAtomic", 2,
+ 1, 1, 1, 1, 0, rep);
+}
+
+
const Operator* MachineOperatorBuilder::Store(StoreRepresentation rep) {
switch (rep.machine_type()) {
#define STORE(Type) \
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698