| 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_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 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 const intptr_t kNumInputs = 1; | 972 const intptr_t kNumInputs = 1; |
| 973 // TODO(fschneider): Allow immediate operands for the char code. | 973 // TODO(fschneider): Allow immediate operands for the char code. |
| 974 return LocationSummary::Make(zone, | 974 return LocationSummary::Make(zone, |
| 975 kNumInputs, | 975 kNumInputs, |
| 976 Location::RequiresRegister(), | 976 Location::RequiresRegister(), |
| 977 LocationSummary::kNoCall); | 977 LocationSummary::kNoCall); |
| 978 } | 978 } |
| 979 | 979 |
| 980 | 980 |
| 981 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 981 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 982 ASSERT(compiler->is_optimizing()); |
| 982 const Register char_code = locs()->in(0).reg(); | 983 const Register char_code = locs()->in(0).reg(); |
| 983 const Register result = locs()->out(0).reg(); | 984 const Register result = locs()->out(0).reg(); |
| 984 __ LoadImmediate(result, | 985 __ LoadImmediate(result, |
| 985 reinterpret_cast<uword>(Symbols::PredefinedAddress())); | 986 reinterpret_cast<uword>(Symbols::PredefinedAddress())); |
| 986 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); | 987 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); |
| 987 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi. | 988 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi. |
| 988 } | 989 } |
| 989 | 990 |
| 990 | 991 |
| 991 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, | 992 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, |
| (...skipping 5853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6845 1, | 6846 1, |
| 6846 locs()); | 6847 locs()); |
| 6847 __ Drop(1); | 6848 __ Drop(1); |
| 6848 __ Pop(result); | 6849 __ Pop(result); |
| 6849 } | 6850 } |
| 6850 | 6851 |
| 6851 | 6852 |
| 6852 } // namespace dart | 6853 } // namespace dart |
| 6853 | 6854 |
| 6854 #endif // defined TARGET_ARCH_ARM | 6855 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |