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

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

Issue 10536086: Add stack check in loops so that loops can be stopped. Optimize relational operations. (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
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_optimizer.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) 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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 __ cmpl(temp_reg, Immediate(class_ids[i])); 978 __ cmpl(temp_reg, Immediate(class_ids[i]));
979 if (i == class_ids.length() - 1) { 979 if (i == class_ids.length() - 1) {
980 __ j(NOT_EQUAL, deopt); 980 __ j(NOT_EQUAL, deopt);
981 } else { 981 } else {
982 __ j(EQUAL, &is_ok, Assembler::kNearJump); 982 __ j(EQUAL, &is_ok, Assembler::kNearJump);
983 } 983 }
984 } 984 }
985 __ Bind(&is_ok); 985 __ Bind(&is_ok);
986 } 986 }
987 987
988
989 void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result,
990 Register reg,
991 Register temp,
992 Label* not_double_or_smi) {
993 Label is_smi, done;
994 __ testl(reg, Immediate(kSmiTagMask));
995 __ j(ZERO, &is_smi);
996 __ LoadClassId(temp, reg);
997 __ cmpl(temp, Immediate(kDouble));
998 __ j(NOT_EQUAL, not_double_or_smi);
999 __ movsd(result, FieldAddress(reg, Double::value_offset()));
1000 __ jmp(&done);
1001 __ Bind(&is_smi);
1002 __ movl(temp, reg);
1003 __ SmiUntag(temp);
1004 __ cvtsi2sd(result, temp);
1005 __ Bind(&done);
1006 }
1007
1008
988 #undef __ 1009 #undef __
989 1010
990 } // namespace dart 1011 } // namespace dart
991 1012
992 #endif // defined TARGET_ARCH_IA32 1013 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698