| OLD | NEW |
| 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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 | 1045 |
| 1046 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1046 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 1047 ASSERT(compiler->is_optimizing()); | 1047 ASSERT(compiler->is_optimizing()); |
| 1048 Register char_code = locs()->in(0).reg(); | 1048 Register char_code = locs()->in(0).reg(); |
| 1049 Register result = locs()->out(0).reg(); | 1049 Register result = locs()->out(0).reg(); |
| 1050 | 1050 |
| 1051 __ Comment("StringFromCharCodeInstr"); | 1051 __ Comment("StringFromCharCodeInstr"); |
| 1052 | 1052 |
| 1053 ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress())); | 1053 __ lw(result, Address(THR, Thread::predefined_symbols_address_offset())); |
| 1054 __ LoadExternalLabel(result, &label, kNotPatchable); | |
| 1055 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); | 1054 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); |
| 1056 __ sll(TMP, char_code, 1); // Char code is a smi. | 1055 __ sll(TMP, char_code, 1); // Char code is a smi. |
| 1057 __ addu(TMP, TMP, result); | 1056 __ addu(TMP, TMP, result); |
| 1058 __ lw(result, Address(TMP)); | 1057 __ lw(result, Address(TMP)); |
| 1059 } | 1058 } |
| 1060 | 1059 |
| 1061 | 1060 |
| 1062 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, | 1061 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, |
| 1063 bool opt) const { | 1062 bool opt) const { |
| 1064 const intptr_t kNumInputs = 1; | 1063 const intptr_t kNumInputs = 1; |
| (...skipping 4533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5598 1, | 5597 1, |
| 5599 locs()); | 5598 locs()); |
| 5600 __ lw(result, Address(SP, 1 * kWordSize)); | 5599 __ lw(result, Address(SP, 1 * kWordSize)); |
| 5601 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5600 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 5602 } | 5601 } |
| 5603 | 5602 |
| 5604 | 5603 |
| 5605 } // namespace dart | 5604 } // namespace dart |
| 5606 | 5605 |
| 5607 #endif // defined TARGET_ARCH_MIPS | 5606 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |