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

Side by Side Diff: runtime/vm/intermediate_language_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, 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_arm64.cc ('k') | runtime/vm/intermediate_language_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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 const intptr_t kNumInputs = 1; 1027 const intptr_t kNumInputs = 1;
1028 // TODO(fschneider): Allow immediate operands for the char code. 1028 // TODO(fschneider): Allow immediate operands for the char code.
1029 return LocationSummary::Make(zone, 1029 return LocationSummary::Make(zone,
1030 kNumInputs, 1030 kNumInputs,
1031 Location::RequiresRegister(), 1031 Location::RequiresRegister(),
1032 LocationSummary::kNoCall); 1032 LocationSummary::kNoCall);
1033 } 1033 }
1034 1034
1035 1035
1036 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1036 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1037 ASSERT(compiler->is_optimizing());
1037 Register char_code = locs()->in(0).reg(); 1038 Register char_code = locs()->in(0).reg();
1038 Register result = locs()->out(0).reg(); 1039 Register result = locs()->out(0).reg();
1039 1040
1040 __ Comment("StringFromCharCodeInstr"); 1041 __ Comment("StringFromCharCodeInstr");
1041 1042
1042 __ LoadImmediate(result, 1043 __ LoadImmediate(result,
1043 reinterpret_cast<uword>(Symbols::PredefinedAddress())); 1044 reinterpret_cast<uword>(Symbols::PredefinedAddress()));
1044 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); 1045 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize);
1045 __ sll(TMP, char_code, 1); // Char code is a smi. 1046 __ sll(TMP, char_code, 1); // Char code is a smi.
1046 __ addu(TMP, TMP, result); 1047 __ addu(TMP, TMP, result);
(...skipping 4539 matching lines...) Expand 10 before | Expand all | Expand 10 after
5586 1, 5587 1,
5587 locs()); 5588 locs());
5588 __ lw(result, Address(SP, 1 * kWordSize)); 5589 __ lw(result, Address(SP, 1 * kWordSize));
5589 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5590 __ addiu(SP, SP, Immediate(2 * kWordSize));
5590 } 5591 }
5591 5592
5592 5593
5593 } // namespace dart 5594 } // namespace dart
5594 5595
5595 #endif // defined TARGET_ARCH_MIPS 5596 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698