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

Side by Side Diff: runtime/vm/intrinsifier_mips.cc

Issue 1304243008: Load predefined symbols address via Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/intrinsifier.h" 8 #include "vm/intrinsifier.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 __ LoadClassId(CMPRES1, T0); // Class ID check. 1760 __ LoadClassId(CMPRES1, T0); // Class ID check.
1761 __ BranchNotEqual( 1761 __ BranchNotEqual(
1762 CMPRES1, Immediate(kOneByteStringCid), &try_two_byte_string); 1762 CMPRES1, Immediate(kOneByteStringCid), &try_two_byte_string);
1763 1763
1764 // Grab byte and return. 1764 // Grab byte and return.
1765 __ SmiUntag(T1); 1765 __ SmiUntag(T1);
1766 __ addu(T2, T0, T1); 1766 __ addu(T2, T0, T1);
1767 __ lbu(T2, FieldAddress(T2, OneByteString::data_offset())); 1767 __ lbu(T2, FieldAddress(T2, OneByteString::data_offset()));
1768 __ BranchUnsignedGreaterEqual( 1768 __ BranchUnsignedGreaterEqual(
1769 T2, Immediate(Symbols::kNumberOfOneCharCodeSymbols), &fall_through); 1769 T2, Immediate(Symbols::kNumberOfOneCharCodeSymbols), &fall_through);
1770 const ExternalLabel symbols_label( 1770 __ lw(V0, Address(THR, Thread::predefined_symbols_address_offset()));
1771 reinterpret_cast<uword>(Symbols::PredefinedAddress()));
1772 __ Push(PP);
1773 __ Push(RA);
1774 __ LoadPoolPointer();
1775 assembler->set_constant_pool_allowed(true);
1776 __ LoadExternalLabel(V0, &symbols_label, kNotPatchable);
1777 assembler->set_constant_pool_allowed(false);
1778 __ Pop(RA);
1779 __ Pop(PP);
1780 __ AddImmediate(V0, Symbols::kNullCharCodeSymbolOffset * kWordSize); 1771 __ AddImmediate(V0, Symbols::kNullCharCodeSymbolOffset * kWordSize);
1781 __ sll(T2, T2, 2); 1772 __ sll(T2, T2, 2);
1782 __ addu(T2, T2, V0); 1773 __ addu(T2, T2, V0);
1783 __ Ret(); 1774 __ Ret();
1784 __ delay_slot()->lw(V0, Address(T2)); 1775 __ delay_slot()->lw(V0, Address(T2));
1785 1776
1786 __ Bind(&try_two_byte_string); 1777 __ Bind(&try_two_byte_string);
1787 __ BranchNotEqual(CMPRES1, Immediate(kTwoByteStringCid), &fall_through); 1778 __ BranchNotEqual(CMPRES1, Immediate(kTwoByteStringCid), &fall_through);
1788 ASSERT(kSmiTagShift == 1); 1779 ASSERT(kSmiTagShift == 1);
1789 __ addu(T2, T0, T1); 1780 __ addu(T2, T0, T1);
1790 __ lhu(T2, FieldAddress(T2, TwoByteString::data_offset())); 1781 __ lhu(T2, FieldAddress(T2, TwoByteString::data_offset()));
1791 __ BranchUnsignedGreaterEqual( 1782 __ BranchUnsignedGreaterEqual(
1792 T2, Immediate(Symbols::kNumberOfOneCharCodeSymbols), &fall_through); 1783 T2, Immediate(Symbols::kNumberOfOneCharCodeSymbols), &fall_through);
1793 __ Push(PP); 1784 __ lw(V0, Address(THR, Thread::predefined_symbols_address_offset()));
1794 __ Push(RA);
1795 __ LoadPoolPointer();
1796 assembler->set_constant_pool_allowed(true);
1797 __ LoadExternalLabel(V0, &symbols_label, kNotPatchable);
1798 assembler->set_constant_pool_allowed(false);
1799 __ Pop(RA);
1800 __ Pop(PP);
1801 __ AddImmediate(V0, Symbols::kNullCharCodeSymbolOffset * kWordSize); 1785 __ AddImmediate(V0, Symbols::kNullCharCodeSymbolOffset * kWordSize);
1802 __ sll(T2, T2, 2); 1786 __ sll(T2, T2, 2);
1803 __ addu(T2, T2, V0); 1787 __ addu(T2, T2, V0);
1804 __ Ret(); 1788 __ Ret();
1805 __ delay_slot()->lw(V0, Address(T2)); 1789 __ delay_slot()->lw(V0, Address(T2));
1806 1790
1807 __ Bind(&fall_through); 1791 __ Bind(&fall_through);
1808 } 1792 }
1809 1793
1810 1794
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 2158
2175 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2159 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2176 __ LoadIsolate(V0); 2160 __ LoadIsolate(V0);
2177 __ Ret(); 2161 __ Ret();
2178 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); 2162 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
2179 } 2163 }
2180 2164
2181 } // namespace dart 2165 } // namespace dart
2182 2166
2183 #endif // defined TARGET_ARCH_MIPS 2167 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698