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

Side by Side Diff: runtime/vm/intermediate_language_arm.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: 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
OLDNEW
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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after
3098 __ b(slow_path->entry_label(), NE); 3098 __ b(slow_path->entry_label(), NE);
3099 switch (op_kind()) { 3099 switch (op_kind()) {
3100 case Token::kADD: 3100 case Token::kADD:
3101 __ adds(result, left, Operand(right)); 3101 __ adds(result, left, Operand(right));
3102 __ b(slow_path->entry_label(), VS); 3102 __ b(slow_path->entry_label(), VS);
3103 break; 3103 break;
3104 case Token::kSUB: 3104 case Token::kSUB:
3105 __ subs(result, left, Operand(right)); 3105 __ subs(result, left, Operand(right));
3106 __ b(slow_path->entry_label(), VS); 3106 __ b(slow_path->entry_label(), VS);
3107 break; 3107 break;
3108 case Token::kMUL:
3109 __ SmiUntag(IP, left);
3110 __ smull(result, IP, IP, right);
3111 // IP: result bits 32..63.
3112 __ cmp(IP, Operand(result, ASR, 31));
3113 __ b(slow_path->entry_label(), NE);
3114 break;
3108 case Token::kBIT_OR: 3115 case Token::kBIT_OR:
3109 // Operation part of combined smi check. 3116 // Operation part of combined smi check.
3110 break; 3117 break;
3111 case Token::kBIT_AND: 3118 case Token::kBIT_AND:
3112 __ and_(result, left, Operand(right)); 3119 __ and_(result, left, Operand(right));
3113 break; 3120 break;
3114 case Token::kBIT_XOR: 3121 case Token::kBIT_XOR:
3115 __ eor(result, left, Operand(right)); 3122 __ eor(result, left, Operand(right));
3116 break; 3123 break;
3117 case Token::kEQ: 3124 case Token::kEQ:
(...skipping 3795 matching lines...) Expand 10 before | Expand all | Expand 10 after
6913 1, 6920 1,
6914 locs()); 6921 locs());
6915 __ Drop(1); 6922 __ Drop(1);
6916 __ Pop(result); 6923 __ Pop(result);
6917 } 6924 }
6918 6925
6919 6926
6920 } // namespace dart 6927 } // namespace dart
6921 6928
6922 #endif // defined TARGET_ARCH_ARM 6929 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698