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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_mips.cc ('k') | runtime/vm/intrinsifier_arm.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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 Location::RequiresRegister(), 823 Location::RequiresRegister(),
824 LocationSummary::kNoCall); 824 LocationSummary::kNoCall);
825 } 825 }
826 826
827 827
828 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 828 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
829 ASSERT(compiler->is_optimizing()); 829 ASSERT(compiler->is_optimizing());
830 Register char_code = locs()->in(0).reg(); 830 Register char_code = locs()->in(0).reg();
831 Register result = locs()->out(0).reg(); 831 Register result = locs()->out(0).reg();
832 832
833 ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress())); 833 __ movq(result, Address(THR, Thread::predefined_symbols_address_offset()));
834 __ LoadExternalLabel(result, &label, kNotPatchable);
835 __ movq(result, Address(result, 834 __ movq(result, Address(result,
836 char_code, 835 char_code,
837 TIMES_HALF_WORD_SIZE, // Char code is a smi. 836 TIMES_HALF_WORD_SIZE, // Char code is a smi.
838 Symbols::kNullCharCodeSymbolOffset * kWordSize)); 837 Symbols::kNullCharCodeSymbolOffset * kWordSize));
839 } 838 }
840 839
841 840
842 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, 841 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone,
843 bool opt) const { 842 bool opt) const {
844 const intptr_t kNumInputs = 1; 843 const intptr_t kNumInputs = 1;
(...skipping 5595 matching lines...) Expand 10 before | Expand all | Expand 10 after
6440 __ Drop(1); 6439 __ Drop(1);
6441 __ popq(result); 6440 __ popq(result);
6442 } 6441 }
6443 6442
6444 6443
6445 } // namespace dart 6444 } // namespace dart
6446 6445
6447 #undef __ 6446 #undef __
6448 6447
6449 #endif // defined TARGET_ARCH_X64 6448 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698