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

Unified Diff: src/IceTargetLoweringARM32.h

Issue 1378303003: Subzero. Adds ldrex, strex, and dmb support (ARM32) (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 3 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
« src/IceInstARM32.cpp ('K') | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringARM32.h
diff --git a/src/IceTargetLoweringARM32.h b/src/IceTargetLoweringARM32.h
index def4ee1682fbb77fc870f037404883bbee1f0ec5..83d2fafe807aa71af7cd2a5bbf35c6fdecb45880 100644
--- a/src/IceTargetLoweringARM32.h
+++ b/src/IceTargetLoweringARM32.h
@@ -241,6 +241,7 @@ protected:
CondARM32::Cond Pred = CondARM32::AL) {
Context.insert(InstARM32Clz::create(Func, Dest, Src0, Pred));
}
+ void _dmb() { Context.insert(InstARM32Dmb::create(Func)); }
void _eor(Variable *Dest, Variable *Src0, Operand *Src1,
CondARM32::Cond Pred = CondARM32::AL) {
Context.insert(InstARM32Eor::create(Func, Dest, Src0, Src1, Pred));
@@ -253,6 +254,14 @@ protected:
CondARM32::Cond Pred = CondARM32::AL) {
Context.insert(InstARM32Ldr::create(Func, Dest, Addr, Pred));
}
+ void _ldrex(Variable *Dest, OperandARM32Mem *Addr,
+ CondARM32::Cond Pred = CondARM32::AL) {
+ Context.insert(InstARM32Ldrex::create(Func, Dest, Addr, Pred));
+ if (auto *Dest64 = llvm::dyn_cast<Variable64On32>(Dest)) {
+ Context.insert(InstFakeDef::create(Func, Dest64->getLo(), Dest));
+ Context.insert(InstFakeDef::create(Func, Dest64->getHi(), Dest));
+ }
+ }
void _lsl(Variable *Dest, Variable *Src0, Operand *Src1,
CondARM32::Cond Pred = CondARM32::AL) {
Context.insert(InstARM32Lsl::create(Func, Dest, Src0, Src1, Pred));
@@ -374,6 +383,14 @@ protected:
CondARM32::Cond Pred = CondARM32::AL) {
Context.insert(InstARM32Str::create(Func, Value, Addr, Pred));
}
+ void _strex(Variable *Dest, Variable *Value, OperandARM32Mem *Addr,
+ CondARM32::Cond Pred = CondARM32::AL) {
+ if (auto *Value64 = llvm::dyn_cast<Variable64On32>(Value)) {
+ Context.insert(InstFakeUse::create(Func, Value64->getLo()));
+ Context.insert(InstFakeUse::create(Func, Value64->getHi()));
+ }
+ Context.insert(InstARM32Strex::create(Func, Dest, Value, Addr, Pred));
+ }
void _sub(Variable *Dest, Variable *Src0, Operand *Src1,
CondARM32::Cond Pred = CondARM32::AL) {
Context.insert(InstARM32Sub::create(Func, Dest, Src0, Src1, Pred));
« src/IceInstARM32.cpp ('K') | « src/IceInstARM32.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698