| 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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |