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

Side by Side Diff: vm/flow_graph_compiler_ia32.cc

Issue 10538103: - Workaround a problem in the gold linker. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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 | « no previous file | vm/flow_graph_compiler_x64.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) 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 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 void FlowGraphCompiler::EmitClassChecksNoSmi( 966 void FlowGraphCompiler::EmitClassChecksNoSmi(
967 const ZoneGrowableArray<intptr_t>& class_ids, 967 const ZoneGrowableArray<intptr_t>& class_ids,
968 Register instance_reg, 968 Register instance_reg,
969 Register temp_reg, 969 Register temp_reg,
970 Label* deopt) { 970 Label* deopt) {
971 Label ok; 971 Label ok;
972 ASSERT(class_ids[0] != kSmi); 972 ASSERT(class_ids[0] != kSmi);
973 __ testl(instance_reg, Immediate(kSmiTagMask)); 973 __ testl(instance_reg, Immediate(kSmiTagMask));
974 __ j(ZERO, deopt); 974 __ j(ZERO, deopt);
975 Label is_ok; 975 Label is_ok;
976 bool jump_style = (class_ids.length() < 5) ? 976 bool use_near_jump = class_ids.length() < 5;
977 Assembler::kNearJump : Assembler::kFarJump;
978 __ LoadClassId(temp_reg, instance_reg); 977 __ LoadClassId(temp_reg, instance_reg);
979 for (intptr_t i = 0; i < class_ids.length(); i++) { 978 for (intptr_t i = 0; i < class_ids.length(); i++) {
980 __ cmpl(temp_reg, Immediate(class_ids[i])); 979 __ cmpl(temp_reg, Immediate(class_ids[i]));
981 if (i == class_ids.length() - 1) { 980 if (i == class_ids.length() - 1) {
982 __ j(NOT_EQUAL, deopt); 981 __ j(NOT_EQUAL, deopt);
983 } else { 982 } else {
984 __ j(EQUAL, &is_ok, jump_style); 983 if (use_near_jump) {
984 __ j(EQUAL, &is_ok, Assembler::kNearJump);
985 } else {
986 __ j(EQUAL, &is_ok);
987 }
985 } 988 }
986 } 989 }
987 __ Bind(&is_ok); 990 __ Bind(&is_ok);
988 } 991 }
989 992
990 993
991 void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result, 994 void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result,
992 Register reg, 995 Register reg,
993 Register temp, 996 Register temp,
994 Label* not_double_or_smi) { 997 Label* not_double_or_smi) {
(...skipping 11 matching lines...) Expand all
1006 __ cvtsi2sd(result, temp); 1009 __ cvtsi2sd(result, temp);
1007 __ Bind(&done); 1010 __ Bind(&done);
1008 } 1011 }
1009 1012
1010 1013
1011 #undef __ 1014 #undef __
1012 1015
1013 } // namespace dart 1016 } // namespace dart
1014 1017
1015 #endif // defined TARGET_ARCH_IA32 1018 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698