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

Side by Side Diff: runtime/vm/intermediate_language_arm.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 | « no previous file | runtime/vm/intermediate_language_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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 Location::RequiresRegister(), 990 Location::RequiresRegister(),
991 LocationSummary::kNoCall); 991 LocationSummary::kNoCall);
992 } 992 }
993 993
994 994
995 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 995 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
996 ASSERT(compiler->is_optimizing()); 996 ASSERT(compiler->is_optimizing());
997 const Register char_code = locs()->in(0).reg(); 997 const Register char_code = locs()->in(0).reg();
998 const Register result = locs()->out(0).reg(); 998 const Register result = locs()->out(0).reg();
999 999
1000 ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress())); 1000 __ ldr(result, Address(THR, Thread::predefined_symbols_address_offset()));
1001 __ LoadExternalLabel(result, &label, kNotPatchable);
1002 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); 1001 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize);
1003 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi. 1002 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi.
1004 } 1003 }
1005 1004
1006 1005
1007 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, 1006 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone,
1008 bool opt) const { 1007 bool opt) const {
1009 const intptr_t kNumInputs = 1; 1008 const intptr_t kNumInputs = 1;
1010 return LocationSummary::Make(zone, 1009 return LocationSummary::Make(zone,
1011 kNumInputs, 1010 kNumInputs,
(...skipping 5850 matching lines...) Expand 10 before | Expand all | Expand 10 after
6862 1, 6861 1,
6863 locs()); 6862 locs());
6864 __ Drop(1); 6863 __ Drop(1);
6865 __ Pop(result); 6864 __ Pop(result);
6866 } 6865 }
6867 6866
6868 6867
6869 } // namespace dart 6868 } // namespace dart
6870 6869
6871 #endif // defined TARGET_ARCH_ARM 6870 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698