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

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

Issue 1773633002: Add fast path smi comparison operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: other platforms 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 2826 matching lines...) Expand 10 before | Expand all | Expand 10 after
2837 break; 2837 break;
2838 case Token::kBIT_OR: 2838 case Token::kBIT_OR:
2839 // Operation part of combined smi check. 2839 // Operation part of combined smi check.
2840 break; 2840 break;
2841 case Token::kBIT_AND: 2841 case Token::kBIT_AND:
2842 __ and_(result, left, Operand(right)); 2842 __ and_(result, left, Operand(right));
2843 break; 2843 break;
2844 case Token::kBIT_XOR: 2844 case Token::kBIT_XOR:
2845 __ eor(result, left, Operand(right)); 2845 __ eor(result, left, Operand(right));
2846 break; 2846 break;
2847 case Token::kEQ:
2848 case Token::kLT:
2849 case Token::kLTE:
2850 case Token::kGT:
2851 case Token::kGTE: {
2852 Label true_label, false_label, done;
2853 BranchLabels labels = { &true_label, &false_label, &false_label };
2854 Condition true_condition =
2855 EmitSmiComparisonOp(compiler, locs(), op_kind());
2856 EmitBranchOnCondition(compiler, true_condition, labels);
2857 __ Bind(&false_label);
2858 __ LoadObject(result, Bool::False());
2859 __ b(&done);
2860 __ Bind(&true_label);
2861 __ LoadObject(result, Bool::True());
2862 __ Bind(&done);
2863 break;
2864 }
2847 default: 2865 default:
2848 UNIMPLEMENTED(); 2866 UNIMPLEMENTED();
2849 } 2867 }
2850 __ Bind(slow_path->exit_label()); 2868 __ Bind(slow_path->exit_label());
2851 } 2869 }
2852 2870
2853 2871
2854 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone, 2872 LocationSummary* BinarySmiOpInstr::MakeLocationSummary(Zone* zone,
2855 bool opt) const { 2873 bool opt) const {
2856 const intptr_t kNumInputs = 2; 2874 const intptr_t kNumInputs = 2;
(...skipping 2810 matching lines...) Expand 10 before | Expand all | Expand 10 after
5667 1, 5685 1,
5668 locs()); 5686 locs());
5669 __ Drop(1); 5687 __ Drop(1);
5670 __ Pop(result); 5688 __ Pop(result);
5671 } 5689 }
5672 5690
5673 5691
5674 } // namespace dart 5692 } // namespace dart
5675 5693
5676 #endif // defined TARGET_ARCH_ARM64 5694 #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