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

Unified Diff: src/compiler/mips/code-generator-mips.cc

Issue 1628453002: MIPS: Use PC realitive instructions on r6. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 11 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 | « no previous file | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/mips/code-generator-mips.cc
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc
index 58ab62c6189ef73ef5d9487da26ef96f2b5b4466..67a6ef1d115fe64cb4c7e41ab0ef649887aacc7d 100644
--- a/src/compiler/mips/code-generator-mips.cc
+++ b/src/compiler/mips/code-generator-mips.cc
@@ -1487,19 +1487,10 @@ void CodeGenerator::AssembleArchTableSwitch(Instruction* instr) {
MipsOperandConverter i(this, instr);
Register input = i.InputRegister(0);
size_t const case_count = instr->InputCount() - 2;
- Label here;
__ Branch(GetLabel(i.InputRpo(1)), hs, input, Operand(case_count));
- __ BlockTrampolinePoolFor(case_count + 6);
- __ bal(&here);
- __ sll(at, input, 2); // Branch delay slot.
- __ bind(&here);
- __ addu(at, at, ra);
- __ lw(at, MemOperand(at, 4 * v8::internal::Assembler::kInstrSize));
- __ jr(at);
- __ nop(); // Branch delay slot nop.
- for (size_t index = 0; index < case_count; ++index) {
- __ dd(GetLabel(i.InputRpo(index + 2)));
- }
+ __ GenerateSwitchTable(input, case_count, [&i, this](size_t index) {
+ return GetLabel(i.InputRpo(index + 2));
+ });
}
« no previous file with comments | « no previous file | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698