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

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

Issue 10542079: Implement Smi binops ia32 (new compiler). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 Register temp_reg, 990 Register temp_reg,
991 Label* deopt) { 991 Label* deopt) {
992 Label ok; 992 Label ok;
993 ASSERT(class_ids[0] != kSmi); 993 ASSERT(class_ids[0] != kSmi);
994 __ testq(instance_reg, Immediate(kSmiTagMask)); 994 __ testq(instance_reg, Immediate(kSmiTagMask));
995 __ j(ZERO, deopt); 995 __ j(ZERO, deopt);
996 Label is_ok; 996 Label is_ok;
997 __ LoadClassId(temp_reg, instance_reg); 997 __ LoadClassId(temp_reg, instance_reg);
998 for (intptr_t i = 0; i < class_ids.length(); i++) { 998 for (intptr_t i = 0; i < class_ids.length(); i++) {
999 __ cmpl(temp_reg, Immediate(class_ids[i])); 999 __ cmpl(temp_reg, Immediate(class_ids[i]));
1000 if (i == class_ids.length() - 1) { 1000 if (i == (class_ids.length() - 1)) {
1001 __ j(NOT_EQUAL, deopt); 1001 __ j(NOT_EQUAL, deopt);
1002 } else { 1002 } else {
1003 __ j(EQUAL, &is_ok, Assembler::kNearJump); 1003 __ j(EQUAL, &is_ok, Assembler::kNearJump);
1004 } 1004 }
1005 } 1005 }
1006 __ Bind(&is_ok); 1006 __ Bind(&is_ok);
1007 } 1007 }
1008 1008
1009 1009
1010 void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result, 1010 void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result,
(...skipping 13 matching lines...) Expand all
1024 __ cvtsi2sd(result, temp); 1024 __ cvtsi2sd(result, temp);
1025 __ Bind(&done); 1025 __ Bind(&done);
1026 } 1026 }
1027 1027
1028 1028
1029 #undef __ 1029 #undef __
1030 1030
1031 } // namespace dart 1031 } // namespace dart
1032 1032
1033 #endif // defined TARGET_ARCH_X64 1033 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698