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

Side by Side Diff: vm/flow_graph_compiler_x64.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 | « vm/flow_graph_compiler_ia32.cc ('k') | no next file » | 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_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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 void FlowGraphCompiler::EmitClassChecksNoSmi( 987 void FlowGraphCompiler::EmitClassChecksNoSmi(
988 const ZoneGrowableArray<intptr_t>& class_ids, 988 const ZoneGrowableArray<intptr_t>& class_ids,
989 Register instance_reg, 989 Register instance_reg,
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 bool jump_style = (class_ids.length() < 5) ? 997 bool use_near_jump = class_ids.length() < 5;
998 Assembler::kNearJump : Assembler::kFarJump;
999 __ LoadClassId(temp_reg, instance_reg); 998 __ LoadClassId(temp_reg, instance_reg);
1000 for (intptr_t i = 0; i < class_ids.length(); i++) { 999 for (intptr_t i = 0; i < class_ids.length(); i++) {
1001 __ cmpl(temp_reg, Immediate(class_ids[i])); 1000 __ cmpl(temp_reg, Immediate(class_ids[i]));
1002 if (i == (class_ids.length() - 1)) { 1001 if (i == (class_ids.length() - 1)) {
1003 __ j(NOT_EQUAL, deopt); 1002 __ j(NOT_EQUAL, deopt);
1004 } else { 1003 } else {
1005 __ j(EQUAL, &is_ok, jump_style); 1004 if (use_near_jump) {
1005 __ j(EQUAL, &is_ok, Assembler::kNearJump);
1006 } else {
1007 __ j(EQUAL, &is_ok);
1008 }
1006 } 1009 }
1007 } 1010 }
1008 __ Bind(&is_ok); 1011 __ Bind(&is_ok);
1009 } 1012 }
1010 1013
1011 1014
1012 void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result, 1015 void FlowGraphCompiler::LoadDoubleOrSmiToXmm(XmmRegister result,
1013 Register reg, 1016 Register reg,
1014 Register temp, 1017 Register temp,
1015 Label* not_double_or_smi) { 1018 Label* not_double_or_smi) {
(...skipping 10 matching lines...) Expand all
1026 __ cvtsi2sd(result, temp); 1029 __ cvtsi2sd(result, temp);
1027 __ Bind(&done); 1030 __ Bind(&done);
1028 } 1031 }
1029 1032
1030 1033
1031 #undef __ 1034 #undef __
1032 1035
1033 } // namespace dart 1036 } // namespace dart
1034 1037
1035 #endif // defined TARGET_ARCH_X64 1038 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « vm/flow_graph_compiler_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698