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

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

Issue 1252703002: VM: Use object pool for loading Symbols::PredefinedAddress in intrinsic code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add missing code on arm64 Created 5 years, 4 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 __ LoadImmediate( 1770 const ExternalLabel symbols_label(
1771 V0, reinterpret_cast<uword>(Symbols::PredefinedAddress())); 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);
1772 __ AddImmediate(V0, Symbols::kNullCharCodeSymbolOffset * kWordSize); 1780 __ AddImmediate(V0, Symbols::kNullCharCodeSymbolOffset * kWordSize);
1773 __ sll(T2, T2, 2); 1781 __ sll(T2, T2, 2);
1774 __ addu(T2, T2, V0); 1782 __ addu(T2, T2, V0);
1775 __ Ret(); 1783 __ Ret();
1776 __ delay_slot()->lw(V0, Address(T2)); 1784 __ delay_slot()->lw(V0, Address(T2));
1777 1785
1778 __ Bind(&try_two_byte_string); 1786 __ Bind(&try_two_byte_string);
1779 __ BranchNotEqual(CMPRES1, Immediate(kTwoByteStringCid), &fall_through); 1787 __ BranchNotEqual(CMPRES1, Immediate(kTwoByteStringCid), &fall_through);
1780 ASSERT(kSmiTagShift == 1); 1788 ASSERT(kSmiTagShift == 1);
1781 __ addu(T2, T0, T1); 1789 __ addu(T2, T0, T1);
1782 __ lhu(T2, FieldAddress(T2, TwoByteString::data_offset())); 1790 __ lhu(T2, FieldAddress(T2, TwoByteString::data_offset()));
1783 __ BranchUnsignedGreaterEqual( 1791 __ BranchUnsignedGreaterEqual(
1784 T2, Immediate(Symbols::kNumberOfOneCharCodeSymbols), &fall_through); 1792 T2, Immediate(Symbols::kNumberOfOneCharCodeSymbols), &fall_through);
1785 __ LoadImmediate(V0, 1793 __ Push(PP);
1786 reinterpret_cast<uword>(Symbols::PredefinedAddress())); 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);
1787 __ AddImmediate(V0, Symbols::kNullCharCodeSymbolOffset * kWordSize); 1801 __ AddImmediate(V0, Symbols::kNullCharCodeSymbolOffset * kWordSize);
1788 __ sll(T2, T2, 2); 1802 __ sll(T2, T2, 2);
1789 __ addu(T2, T2, V0); 1803 __ addu(T2, T2, V0);
1790 __ Ret(); 1804 __ Ret();
1791 __ delay_slot()->lw(V0, Address(T2)); 1805 __ delay_slot()->lw(V0, Address(T2));
1792 1806
1793 __ Bind(&fall_through); 1807 __ Bind(&fall_through);
1794 } 1808 }
1795 1809
1796 1810
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 2176
2163 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2177 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2164 __ LoadIsolate(V0); 2178 __ LoadIsolate(V0);
2165 __ Ret(); 2179 __ Ret();
2166 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); 2180 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
2167 } 2181 }
2168 2182
2169 } // namespace dart 2183 } // namespace dart
2170 2184
2171 #endif // defined TARGET_ARCH_MIPS 2185 #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