Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: runtime/vm/intermediate_language_arm64.cc

Issue 1824023002: VM: Fix a couple of issues in the AOT optimizer, add fast path smi multiply. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: updated inlining of numeric operators Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2816 matching lines...) Expand 10 before | Expand all | Expand 10 after
2827 __ b(slow_path->entry_label(), NE); 2827 __ b(slow_path->entry_label(), NE);
2828 switch (op_kind()) { 2828 switch (op_kind()) {
2829 case Token::kADD: 2829 case Token::kADD:
2830 __ adds(result, left, Operand(right)); 2830 __ adds(result, left, Operand(right));
2831 __ b(slow_path->entry_label(), VS); 2831 __ b(slow_path->entry_label(), VS);
2832 break; 2832 break;
2833 case Token::kSUB: 2833 case Token::kSUB:
2834 __ subs(result, left, Operand(right)); 2834 __ subs(result, left, Operand(right));
2835 __ b(slow_path->entry_label(), VS); 2835 __ b(slow_path->entry_label(), VS);
2836 break; 2836 break;
2837 case Token::kMUL:
2838 __ SmiUntag(TMP, left);
2839 __ mul(result, TMP, right);
2840 __ smulh(TMP, TMP, right);
2841 // TMP: result bits 64..127.
2842 __ cmp(TMP, Operand(result, ASR, 63));
2843 __ b(slow_path->entry_label(), NE);
2844 break;
2837 case Token::kBIT_OR: 2845 case Token::kBIT_OR:
2838 // Operation may be part of combined smi check. 2846 // Operation may be part of combined smi check.
2839 if (!combined_smi_check) { 2847 if (!combined_smi_check) {
2840 __ orr(result, left, Operand(right)); 2848 __ orr(result, left, Operand(right));
2841 } 2849 }
2842 break; 2850 break;
2843 case Token::kBIT_AND: 2851 case Token::kBIT_AND:
2844 __ and_(result, left, Operand(right)); 2852 __ and_(result, left, Operand(right));
2845 break; 2853 break;
2846 case Token::kBIT_XOR: 2854 case Token::kBIT_XOR:
(...skipping 2842 matching lines...) Expand 10 before | Expand all | Expand 10 after
5689 1, 5697 1,
5690 locs()); 5698 locs());
5691 __ Drop(1); 5699 __ Drop(1);
5692 __ Pop(result); 5700 __ Pop(result);
5693 } 5701 }
5694 5702
5695 5703
5696 } // namespace dart 5704 } // namespace dart
5697 5705
5698 #endif // defined TARGET_ARCH_ARM64 5706 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698