| 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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 990 Location::RequiresRegister(), | 990 Location::RequiresRegister(), |
| 991 LocationSummary::kNoCall); | 991 LocationSummary::kNoCall); |
| 992 } | 992 } |
| 993 | 993 |
| 994 | 994 |
| 995 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 995 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 996 ASSERT(compiler->is_optimizing()); | 996 ASSERT(compiler->is_optimizing()); |
| 997 const Register char_code = locs()->in(0).reg(); | 997 const Register char_code = locs()->in(0).reg(); |
| 998 const Register result = locs()->out(0).reg(); | 998 const Register result = locs()->out(0).reg(); |
| 999 | 999 |
| 1000 ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress())); | 1000 __ ldr(result, Address(THR, Thread::predefined_symbols_address_offset())); |
| 1001 __ LoadExternalLabel(result, &label, kNotPatchable); | |
| 1002 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); | 1001 __ AddImmediate(result, Symbols::kNullCharCodeSymbolOffset * kWordSize); |
| 1003 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi. | 1002 __ ldr(result, Address(result, char_code, LSL, 1)); // Char code is a smi. |
| 1004 } | 1003 } |
| 1005 | 1004 |
| 1006 | 1005 |
| 1007 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, | 1006 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, |
| 1008 bool opt) const { | 1007 bool opt) const { |
| 1009 const intptr_t kNumInputs = 1; | 1008 const intptr_t kNumInputs = 1; |
| 1010 return LocationSummary::Make(zone, | 1009 return LocationSummary::Make(zone, |
| 1011 kNumInputs, | 1010 kNumInputs, |
| (...skipping 5850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6862 1, | 6861 1, |
| 6863 locs()); | 6862 locs()); |
| 6864 __ Drop(1); | 6863 __ Drop(1); |
| 6865 __ Pop(result); | 6864 __ Pop(result); |
| 6866 } | 6865 } |
| 6867 | 6866 |
| 6868 | 6867 |
| 6869 } // namespace dart | 6868 } // namespace dart |
| 6870 | 6869 |
| 6871 #endif // defined TARGET_ARCH_ARM | 6870 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |