| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 843 Location::RequiresRegister(), | 843 Location::RequiresRegister(), |
| 844 LocationSummary::kNoCall); | 844 LocationSummary::kNoCall); |
| 845 } | 845 } |
| 846 | 846 |
| 847 | 847 |
| 848 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 848 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 849 ASSERT(compiler->is_optimizing()); | 849 ASSERT(compiler->is_optimizing()); |
| 850 const Register char_code = locs()->in(0).reg(); | 850 const Register char_code = locs()->in(0).reg(); |
| 851 const Register result = locs()->out(0).reg(); | 851 const Register result = locs()->out(0).reg(); |
| 852 | 852 |
| 853 ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress())); | 853 __ ldr(result, Address(THR, Thread::predefined_symbols_address_offset())); |
| 854 __ LoadExternalLabel(result, &label); | |
| 855 __ AddImmediate( | 854 __ AddImmediate( |
| 856 result, result, Symbols::kNullCharCodeSymbolOffset * kWordSize); | 855 result, result, Symbols::kNullCharCodeSymbolOffset * kWordSize); |
| 857 __ SmiUntag(TMP, char_code); // Untag to use scaled adress mode. | 856 __ SmiUntag(TMP, char_code); // Untag to use scaled adress mode. |
| 858 __ ldr(result, Address(result, TMP, UXTX, Address::Scaled)); | 857 __ ldr(result, Address(result, TMP, UXTX, Address::Scaled)); |
| 859 } | 858 } |
| 860 | 859 |
| 861 | 860 |
| 862 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, | 861 LocationSummary* StringToCharCodeInstr::MakeLocationSummary(Zone* zone, |
| 863 bool opt) const { | 862 bool opt) const { |
| 864 const intptr_t kNumInputs = 1; | 863 const intptr_t kNumInputs = 1; |
| (...skipping 4758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5623 1, | 5622 1, |
| 5624 locs()); | 5623 locs()); |
| 5625 __ Drop(1); | 5624 __ Drop(1); |
| 5626 __ Pop(result); | 5625 __ Pop(result); |
| 5627 } | 5626 } |
| 5628 | 5627 |
| 5629 | 5628 |
| 5630 } // namespace dart | 5629 } // namespace dart |
| 5631 | 5630 |
| 5632 #endif // defined TARGET_ARCH_ARM64 | 5631 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |