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

Unified Diff: src/IceTargetLoweringARM32.h

Issue 1372083002: Subzero. Eliminates the use of Variable64On32 as operands in ARM. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Removes Variable64On32 Operands. 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
« no previous file with comments | « src/IceInstARM32.cpp ('k') | src/IceTargetLoweringARM32.cpp » ('j') | 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 91db6bcf0c53c86761b2dd1aa5ed4fd25b890a74..def4ee1682fbb77fc870f037404883bbee1f0ec5 100644
--- a/src/IceTargetLoweringARM32.h
+++ b/src/IceTargetLoweringARM32.h
@@ -280,13 +280,27 @@ protected:
// an assert around just in case there is some untested code path where Dest
// is nullptr.
assert(Dest != nullptr);
- Context.insert(InstARM32Mov::create(Func, Dest, Src0, Pred));
+ auto *Instr = InstARM32Mov::create(Func, Dest, Src0, Pred);
+
+ Context.insert(Instr);
+ if (Instr->isMultiDest()) {
+ // If Instr is multi-dest, then Dest must be a Variable64On32. We add a
+ // fake-def for Instr.DestHi here.
+ assert(llvm::isa<Variable64On32>(Dest));
+ Context.insert(InstFakeDef::create(Func, Instr->getDestHi()));
+ }
}
void _mov_redefined(Variable *Dest, Operand *Src0,
CondARM32::Cond Pred = CondARM32::AL) {
- Inst *NewInst = InstARM32Mov::create(Func, Dest, Src0, Pred);
- NewInst->setDestRedefined();
- Context.insert(NewInst);
+ auto *Instr = InstARM32Mov::create(Func, Dest, Src0, Pred);
+ Instr->setDestRedefined();
+ Context.insert(Instr);
+ if (Instr->isMultiDest()) {
+ // If Instr is multi-dest, then Dest must be a Variable64On32. We add a
+ // fake-def for Instr.DestHi here.
+ assert(llvm::isa<Variable64On32>(Dest));
+ Context.insert(InstFakeDef::create(Func, Instr->getDestHi()));
+ }
}
/// The Operand can only be a 16-bit immediate or a ConstantRelocatable (with
/// an upper16 relocation).
« no previous file with comments | « src/IceInstARM32.cpp ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698