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

Side by Side Diff: src/mips/macro-assembler-mips.h

Issue 1761863002: [turbofan] Re-enables the jump table emission in the mips instruction selector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_
6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 #include "src/mips/assembler-mips.h" 10 #include "src/mips/assembler-mips.h"
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 template <typename Func> 1771 template <typename Func>
1772 void MacroAssembler::GenerateSwitchTable(Register index, size_t case_count, 1772 void MacroAssembler::GenerateSwitchTable(Register index, size_t case_count,
1773 Func GetLabelFunction) { 1773 Func GetLabelFunction) {
1774 if (kArchVariant >= kMips32r6) { 1774 if (kArchVariant >= kMips32r6) {
1775 BlockTrampolinePoolFor(case_count + 5); 1775 BlockTrampolinePoolFor(case_count + 5);
1776 addiupc(at, 5); 1776 addiupc(at, 5);
1777 lsa(at, at, index, kPointerSizeLog2); 1777 lsa(at, at, index, kPointerSizeLog2);
1778 lw(at, MemOperand(at)); 1778 lw(at, MemOperand(at));
1779 } else { 1779 } else {
1780 Label here; 1780 Label here;
1781 BlockTrampolinePoolFor(case_count + 6); 1781 BlockTrampolinePoolFor(case_count + 10);
1782 push(ra);
1782 bal(&here); 1783 bal(&here);
1783 sll(at, index, kPointerSizeLog2); // Branch delay slot. 1784 sll(at, index, kPointerSizeLog2); // Branch delay slot.
1784 bind(&here); 1785 bind(&here);
1785 addu(at, at, ra); 1786 addu(at, at, ra);
1786 lw(at, MemOperand(at, 4 * v8::internal::Assembler::kInstrSize)); 1787 pop(ra);
1788 lw(at, MemOperand(at, 6 * v8::internal::Assembler::kInstrSize));
1787 } 1789 }
1788 jr(at); 1790 jr(at);
1789 nop(); // Branch delay slot nop. 1791 nop(); // Branch delay slot nop.
1790 for (size_t index = 0; index < case_count; ++index) { 1792 for (size_t index = 0; index < case_count; ++index) {
1791 dd(GetLabelFunction(index)); 1793 dd(GetLabelFunction(index));
1792 } 1794 }
1793 } 1795 }
1794 1796
1795 #ifdef GENERATED_CODE_COVERAGE 1797 #ifdef GENERATED_CODE_COVERAGE
1796 #define CODE_COVERAGE_STRINGIFY(x) #x 1798 #define CODE_COVERAGE_STRINGIFY(x) #x
1797 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) 1799 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x)
1798 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1800 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1799 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1801 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1800 #else 1802 #else
1801 #define ACCESS_MASM(masm) masm-> 1803 #define ACCESS_MASM(masm) masm->
1802 #endif 1804 #endif
1803 1805
1804 } // namespace internal 1806 } // namespace internal
1805 } // namespace v8 1807 } // namespace v8
1806 1808
1807 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ 1809 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698