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

Side by Side Diff: runtime/vm/intermediate_language_x64.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_mips.cc ('k') | runtime/vm/method_recognizer.h » ('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) 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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2822 summary->set_in(0, Location::RequiresRegister()); 2822 summary->set_in(0, Location::RequiresRegister());
2823 summary->set_in(1, Location::RequiresRegister()); 2823 summary->set_in(1, Location::RequiresRegister());
2824 switch (op_kind()) { 2824 switch (op_kind()) {
2825 case Token::kEQ: 2825 case Token::kEQ:
2826 case Token::kLT: 2826 case Token::kLT:
2827 case Token::kLTE: 2827 case Token::kLTE:
2828 case Token::kGT: 2828 case Token::kGT:
2829 case Token::kGTE: 2829 case Token::kGTE:
2830 case Token::kADD: 2830 case Token::kADD:
2831 case Token::kSUB: 2831 case Token::kSUB:
2832 case Token::kMUL:
2832 summary->set_out(0, Location::RequiresRegister()); 2833 summary->set_out(0, Location::RequiresRegister());
2833 break; 2834 break;
2834 case Token::kBIT_OR: 2835 case Token::kBIT_OR:
2835 case Token::kBIT_AND: 2836 case Token::kBIT_AND:
2836 case Token::kBIT_XOR: 2837 case Token::kBIT_XOR:
2837 summary->set_out(0, Location::SameAsFirstInput()); 2838 summary->set_out(0, Location::SameAsFirstInput());
2838 break; 2839 break;
2839 default: 2840 default:
2840 UNIMPLEMENTED(); 2841 UNIMPLEMENTED();
2841 } 2842 }
(...skipping 28 matching lines...) Expand all
2870 case Token::kADD: 2871 case Token::kADD:
2871 __ movq(result, left); 2872 __ movq(result, left);
2872 __ addq(result, right); 2873 __ addq(result, right);
2873 __ j(OVERFLOW, slow_path->entry_label()); 2874 __ j(OVERFLOW, slow_path->entry_label());
2874 break; 2875 break;
2875 case Token::kSUB: 2876 case Token::kSUB:
2876 __ movq(result, left); 2877 __ movq(result, left);
2877 __ subq(result, right); 2878 __ subq(result, right);
2878 __ j(OVERFLOW, slow_path->entry_label()); 2879 __ j(OVERFLOW, slow_path->entry_label());
2879 break; 2880 break;
2881 case Token::kMUL:
2882 __ movq(result, left);
2883 __ SmiUntag(result);
2884 __ imulq(result, right);
2885 __ j(OVERFLOW, slow_path->entry_label());
2886 break;
2880 case Token::kBIT_OR: 2887 case Token::kBIT_OR:
2881 ASSERT(left == result); 2888 ASSERT(left == result);
2882 __ orq(result, right); 2889 __ orq(result, right);
2883 break; 2890 break;
2884 case Token::kBIT_AND: 2891 case Token::kBIT_AND:
2885 ASSERT(left == result); 2892 ASSERT(left == result);
2886 __ andq(result, right); 2893 __ andq(result, right);
2887 break; 2894 break;
2888 case Token::kBIT_XOR: 2895 case Token::kBIT_XOR:
2889 ASSERT(left == result); 2896 ASSERT(left == result);
(...skipping 3628 matching lines...) Expand 10 before | Expand all | Expand 10 after
6518 __ Drop(1); 6525 __ Drop(1);
6519 __ popq(result); 6526 __ popq(result);
6520 } 6527 }
6521 6528
6522 6529
6523 } // namespace dart 6530 } // namespace dart
6524 6531
6525 #undef __ 6532 #undef __
6526 6533
6527 #endif // defined TARGET_ARCH_X64 6534 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698