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

Side by Side Diff: runtime/vm/intermediate_language_arm64.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/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 Location::RequiresRegister(), 843 Location::RequiresRegister(),
844 LocationSummary::kNoCall); 844 LocationSummary::kNoCall);
845 } 845 }
846 846
847 847
848 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 848 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
849 ASSERT(compiler->is_optimizing()); 849 ASSERT(compiler->is_optimizing());
850 const Register char_code = locs()->in(0).reg(); 850 const Register char_code = locs()->in(0).reg();
851 const Register result = locs()->out(0).reg(); 851 const Register result = locs()->out(0).reg();
852 852
853 ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress())); 853 __ ldr(result, Address(THR, Thread::predefined_symbols_address_offset()));
854 __ LoadExternalLabel(result, &label);
855 __ AddImmediate( 854 __ AddImmediate(
856 result, result, Symbols::kNullCharCodeSymbolOffset * kWordSize); 855 result, result, Symbols::kNullCharCodeSymbolOffset * kWordSize);
857 __ SmiUntag(TMP, char_code); // Untag to use scaled adress mode. 856 __ SmiUntag(TMP, char_code); // Untag to use scaled adress mode.
858 __ ldr(result, Address(result, TMP, UXTX, Address::Scaled)); 857 __ ldr(result, Address(result, TMP, UXTX, Address::Scaled));
859 } 858 }
860 859
861 860
862 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, 861 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone,
863 bool opt) const { 862 bool opt) const {
864 const intptr_t kNumInputs = 1; 863 const intptr_t kNumInputs = 1;
(...skipping 4758 matching lines...) Expand 10 before | Expand all | Expand 10 after
5623 1, 5622 1,
5624 locs()); 5623 locs());
5625 __ Drop(1); 5624 __ Drop(1);
5626 __ Pop(result); 5625 __ Pop(result);
5627 } 5626 }
5628 5627
5629 5628
5630 } // namespace dart 5629 } // namespace dart
5631 5630
5632 #endif // defined TARGET_ARCH_ARM64 5631 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698