| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 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 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 const intptr_t kNumInputs = 1; | 810 const intptr_t kNumInputs = 1; |
| 811 // TODO(fschneider): Allow immediate operands for the char code. | 811 // TODO(fschneider): Allow immediate operands for the char code. |
| 812 return LocationSummary::Make(zone, | 812 return LocationSummary::Make(zone, |
| 813 kNumInputs, | 813 kNumInputs, |
| 814 Location::RequiresRegister(), | 814 Location::RequiresRegister(), |
| 815 LocationSummary::kNoCall); | 815 LocationSummary::kNoCall); |
| 816 } | 816 } |
| 817 | 817 |
| 818 | 818 |
| 819 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 819 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 820 ASSERT(compiler->is_optimizing()); |
| 820 Register char_code = locs()->in(0).reg(); | 821 Register char_code = locs()->in(0).reg(); |
| 821 Register result = locs()->out(0).reg(); | 822 Register result = locs()->out(0).reg(); |
| 822 __ LoadImmediate(result, | 823 __ LoadImmediate(result, |
| 823 Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress())), PP); | 824 Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress())), PP); |
| 824 __ movq(result, Address(result, | 825 __ movq(result, Address(result, |
| 825 char_code, | 826 char_code, |
| 826 TIMES_HALF_WORD_SIZE, // Char code is a smi. | 827 TIMES_HALF_WORD_SIZE, // Char code is a smi. |
| 827 Symbols::kNullCharCodeSymbolOffset * kWordSize)); | 828 Symbols::kNullCharCodeSymbolOffset * kWordSize)); |
| 828 } | 829 } |
| 829 | 830 |
| (...skipping 5591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6421 __ Drop(1); | 6422 __ Drop(1); |
| 6422 __ popq(result); | 6423 __ popq(result); |
| 6423 } | 6424 } |
| 6424 | 6425 |
| 6425 | 6426 |
| 6426 } // namespace dart | 6427 } // namespace dart |
| 6427 | 6428 |
| 6428 #undef __ | 6429 #undef __ |
| 6429 | 6430 |
| 6430 #endif // defined TARGET_ARCH_X64 | 6431 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |