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

Side by Side Diff: runtime/vm/intrinsifier_arm.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, 5 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/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
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 1643 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 __ cmp(R1, Operand(R2)); 1654 __ cmp(R1, Operand(R2));
1655 __ b(&fall_through, CS); // Runtime throws exception. 1655 __ b(&fall_through, CS); // Runtime throws exception.
1656 1656
1657 __ CompareClassId(R0, kOneByteStringCid, R3); 1657 __ CompareClassId(R0, kOneByteStringCid, R3);
1658 __ b(&try_two_byte_string, NE); 1658 __ b(&try_two_byte_string, NE);
1659 __ SmiUntag(R1); 1659 __ SmiUntag(R1);
1660 __ AddImmediate(R0, OneByteString::data_offset() - kHeapObjectTag); 1660 __ AddImmediate(R0, OneByteString::data_offset() - kHeapObjectTag);
1661 __ ldrb(R1, Address(R0, R1)); 1661 __ ldrb(R1, Address(R0, R1));
1662 __ CompareImmediate(R1, Symbols::kNumberOfOneCharCodeSymbols); 1662 __ CompareImmediate(R1, Symbols::kNumberOfOneCharCodeSymbols);
1663 __ b(&fall_through, GE); 1663 __ b(&fall_through, GE);
1664 __ LoadImmediate(R0, 1664 const ExternalLabel symbols_label(
1665 reinterpret_cast<uword>(Symbols::PredefinedAddress())); 1665 reinterpret_cast<uword>(Symbols::PredefinedAddress()));
1666 __ Push(PP);
1667 __ LoadPoolPointer();
1668 assembler->set_constant_pool_allowed(true);
1669 __ LoadExternalLabel(R0, &symbols_label, kNotPatchable);
1670 assembler->set_constant_pool_allowed(false);
1671 __ Pop(PP);
1666 __ AddImmediate(R0, Symbols::kNullCharCodeSymbolOffset * kWordSize); 1672 __ AddImmediate(R0, Symbols::kNullCharCodeSymbolOffset * kWordSize);
1667 __ ldr(R0, Address(R0, R1, LSL, 2)); 1673 __ ldr(R0, Address(R0, R1, LSL, 2));
1668 __ Ret(); 1674 __ Ret();
1669 1675
1670 __ Bind(&try_two_byte_string); 1676 __ Bind(&try_two_byte_string);
1671 __ CompareClassId(R0, kTwoByteStringCid, R3); 1677 __ CompareClassId(R0, kTwoByteStringCid, R3);
1672 __ b(&fall_through, NE); 1678 __ b(&fall_through, NE);
1673 ASSERT(kSmiTagShift == 1); 1679 ASSERT(kSmiTagShift == 1);
1674 __ AddImmediate(R0, TwoByteString::data_offset() - kHeapObjectTag); 1680 __ AddImmediate(R0, TwoByteString::data_offset() - kHeapObjectTag);
1675 __ ldrh(R1, Address(R0, R1)); 1681 __ ldrh(R1, Address(R0, R1));
1676 __ CompareImmediate(R1, Symbols::kNumberOfOneCharCodeSymbols); 1682 __ CompareImmediate(R1, Symbols::kNumberOfOneCharCodeSymbols);
1677 __ b(&fall_through, GE); 1683 __ b(&fall_through, GE);
1678 __ LoadImmediate(R0, 1684 __ Push(PP);
1679 reinterpret_cast<uword>(Symbols::PredefinedAddress())); 1685 __ LoadPoolPointer();
1686 assembler->set_constant_pool_allowed(true);
1687 __ LoadExternalLabel(R0, &symbols_label, kNotPatchable);
1688 assembler->set_constant_pool_allowed(false);
1689 __ Pop(PP);
1680 __ AddImmediate(R0, Symbols::kNullCharCodeSymbolOffset * kWordSize); 1690 __ AddImmediate(R0, Symbols::kNullCharCodeSymbolOffset * kWordSize);
1681 __ ldr(R0, Address(R0, R1, LSL, 2)); 1691 __ ldr(R0, Address(R0, R1, LSL, 2));
1682 __ Ret(); 1692 __ Ret();
1683 1693
1684 __ Bind(&fall_through); 1694 __ Bind(&fall_through);
1685 } 1695 }
1686 1696
1687 1697
1688 void Intrinsifier::StringBaseIsEmpty(Assembler* assembler) { 1698 void Intrinsifier::StringBaseIsEmpty(Assembler* assembler) {
1689 __ ldr(R0, Address(SP, 0 * kWordSize)); 1699 __ ldr(R0, Address(SP, 0 * kWordSize));
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 2064
2055 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2065 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2056 __ LoadIsolate(R0); 2066 __ LoadIsolate(R0);
2057 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); 2067 __ ldr(R0, Address(R0, Isolate::current_tag_offset()));
2058 __ Ret(); 2068 __ Ret();
2059 } 2069 }
2060 2070
2061 } // namespace dart 2071 } // namespace dart
2062 2072
2063 #endif // defined TARGET_ARCH_ARM 2073 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698