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

Unified Diff: src/IceTargetLoweringMIPS32.cpp

Issue 2420033002: [SubZero] Handle relocatable constants for MIPS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressed review comments Created 4 years, 2 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/IceTargetLoweringMIPS32.h ('k') | tests_lit/llvm2ice_tests/arith.ll » ('j') | 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 331f1ed4c99b6a82b3c3682f1a40810004cf6baa..01481ba99df71f534a3dc1991214d1dcb57c7361 100644
--- a/src/IceTargetLoweringMIPS32.cpp
+++ b/src/IceTargetLoweringMIPS32.cpp
@@ -4847,10 +4847,10 @@ Operand *TargetMIPS32::legalize(Operand *From, LegalMask Allowed,
return From;
}
if (auto *C = llvm::dyn_cast<ConstantRelocatable>(From)) {
- (void)C;
- // TODO(reed kotler): complete this case for proper implementation
Variable *Reg = makeReg(Ty, RegNum);
- Context.insert<InstFakeDef>(Reg);
+ Variable *TReg = makeReg(Ty, RegNum);
+ _lui(TReg, C, RO_Hi);
+ _addiu(Reg, TReg, C, RO_Lo);
return Reg;
} else if (auto *C32 = llvm::dyn_cast<ConstantInteger32>(From)) {
const uint32_t Value = C32->getValue();
« no previous file with comments | « src/IceTargetLoweringMIPS32.h ('k') | tests_lit/llvm2ice_tests/arith.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698