| 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 const intptr_t kNumInputs = 1; | 826 const intptr_t kNumInputs = 1; |
| 827 // TODO(fschneider): Allow immediate operands for the char code. | 827 // TODO(fschneider): Allow immediate operands for the char code. |
| 828 return LocationSummary::Make(zone, | 828 return LocationSummary::Make(zone, |
| 829 kNumInputs, | 829 kNumInputs, |
| 830 Location::RequiresRegister(), | 830 Location::RequiresRegister(), |
| 831 LocationSummary::kNoCall); | 831 LocationSummary::kNoCall); |
| 832 } | 832 } |
| 833 | 833 |
| 834 | 834 |
| 835 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 835 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 836 ASSERT(compiler->is_optimizing()); |
| 836 const Register char_code = locs()->in(0).reg(); | 837 const Register char_code = locs()->in(0).reg(); |
| 837 const Register result = locs()->out(0).reg(); | 838 const Register result = locs()->out(0).reg(); |
| 838 __ LoadImmediate( | 839 __ LoadImmediate( |
| 839 result, reinterpret_cast<uword>(Symbols::PredefinedAddress()), PP); | 840 result, reinterpret_cast<uword>(Symbols::PredefinedAddress()), PP); |
| 840 __ AddImmediate( | 841 __ AddImmediate( |
| 841 result, result, Symbols::kNullCharCodeSymbolOffset * kWordSize, PP); | 842 result, result, Symbols::kNullCharCodeSymbolOffset * kWordSize, PP); |
| 842 __ SmiUntag(TMP, char_code); // Untag to use scaled adress mode. | 843 __ SmiUntag(TMP, char_code); // Untag to use scaled adress mode. |
| 843 __ ldr(result, Address(result, TMP, UXTX, Address::Scaled)); | 844 __ ldr(result, Address(result, TMP, UXTX, Address::Scaled)); |
| 844 } | 845 } |
| 845 | 846 |
| (...skipping 4775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5621 1, | 5622 1, |
| 5622 locs()); | 5623 locs()); |
| 5623 __ Drop(1); | 5624 __ Drop(1); |
| 5624 __ Pop(result); | 5625 __ Pop(result); |
| 5625 } | 5626 } |
| 5626 | 5627 |
| 5627 | 5628 |
| 5628 } // namespace dart | 5629 } // namespace dart |
| 5629 | 5630 |
| 5630 #endif // defined TARGET_ARCH_ARM64 | 5631 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |