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

Unified Diff: src/IceInstMIPS32.cpp

Issue 2468133002: [SubZero] Fix code generation for vector type (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 1 month 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/IceAssemblerMIPS32.cpp ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstMIPS32.cpp
diff --git a/src/IceInstMIPS32.cpp b/src/IceInstMIPS32.cpp
index 8cf559365cf8b5bb340748c14e1d7fcf1185374d..b627a201f16dca7fe00eb7b7b43733e89b6650d6 100644
--- a/src/IceInstMIPS32.cpp
+++ b/src/IceInstMIPS32.cpp
@@ -552,7 +552,7 @@ void InstMIPS32Call::emit(const Cfg *Func) const {
CallTarget->emitWithoutPrefix(Func->getTarget());
} else {
Str << "\t"
- "jal"
+ "jalr"
"\t";
getCallTarget()->emit(Func);
}
@@ -561,11 +561,14 @@ void InstMIPS32Call::emit(const Cfg *Func) const {
void InstMIPS32Call::emitIAS(const Cfg *Func) const {
assert(getSrcSize() == 1);
auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
- if (const auto *CallTarget =
- llvm::dyn_cast<ConstantRelocatable>(getCallTarget())) {
+ if (llvm::isa<ConstantInteger32>(getCallTarget())) {
+ llvm::report_fatal_error("MIPS32Call to ConstantInteger32");
+ } else if (const auto *CallTarget =
+ llvm::dyn_cast<ConstantRelocatable>(getCallTarget())) {
Asm->jal(CallTarget);
} else {
- llvm::report_fatal_error("MIPS32Call: Invalid operand");
+ const Operand *ImplicitRA = nullptr;
+ Asm->jalr(getCallTarget(), ImplicitRA);
}
}
« no previous file with comments | « src/IceAssemblerMIPS32.cpp ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698