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

Unified Diff: src/IceTargetLoweringMIPS32.cpp

Issue 2085303002: Subzero, MIPS32: Cross-testing enabled for MIPS32 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Crosstests running Created 4 years, 4 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
« runtime/szrt_asm_mips32.s ('K') | « runtime/szrt_asm_mips32.s ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringMIPS32.cpp
diff --git a/src/IceTargetLoweringMIPS32.cpp b/src/IceTargetLoweringMIPS32.cpp
index 7a91331cd8aa95362b94b4553e8c71a5ed644a99..3d54e7017e7379f900333bc4eff826c7362b7a88 100644
--- a/src/IceTargetLoweringMIPS32.cpp
+++ b/src/IceTargetLoweringMIPS32.cpp
@@ -2242,7 +2242,17 @@ void TargetMIPS32::lowerIntrinsicCall(const InstIntrinsicCall *Instr) {
}
void TargetMIPS32::lowerLoad(const InstLoad *Instr) {
- UnimplementedLoweringError(this, Instr);
+ // A Load instruction can be treated the same as an Assign instruction, after
+ // the source operand is transformed into an OperandARM32Mem operand.
+ Type Ty = Instr->getDest()->getType();
+ Operand *Src0 = formMemoryOperand(Instr->getSourceAddress(), Ty);
+ Variable *DestLoad = Instr->getDest();
+ DestLoad->setMustHaveReg();
+
+ // TODO(jvoung): handled folding opportunities. Sign and zero extension can
+ // be folded into a load.
+ auto *Assign = InstAssign::create(Func, DestLoad, Src0);
+ lowerAssign(Assign);
}
void TargetMIPS32::doAddressOptLoad() { UnimplementedError(getFlags()); }
« runtime/szrt_asm_mips32.s ('K') | « runtime/szrt_asm_mips32.s ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698