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

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

Issue 10603004: Fix bug in inlined Math.sqrt. (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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 __ CompareClassId(RAX, kDouble); 888 __ CompareClassId(RAX, kDouble);
889 __ j(NOT_EQUAL, &call_method); 889 __ j(NOT_EQUAL, &call_method);
890 __ movsd(XMM1, FieldAddress(RAX, Double::value_offset())); 890 __ movsd(XMM1, FieldAddress(RAX, Double::value_offset()));
891 __ Bind(&double_op); 891 __ Bind(&double_op);
892 __ sqrtsd(XMM0, XMM1); 892 __ sqrtsd(XMM0, XMM1);
893 AssemblerMacros::TryAllocate(assembler_, 893 AssemblerMacros::TryAllocate(assembler_,
894 double_class_, 894 double_class_,
895 &call_method, 895 &call_method,
896 RAX); // Result register. 896 RAX); // Result register.
897 __ movsd(FieldAddress(RAX, Double::value_offset()), XMM0); 897 __ movsd(FieldAddress(RAX, Double::value_offset()), XMM0);
898 __ Drop(1);
siva 2012/06/21 00:39:59 Ditto.
898 __ jmp(done); 899 __ jmp(done);
899 __ Bind(&smi_to_double); 900 __ Bind(&smi_to_double);
900 __ SmiUntag(RAX); 901 __ SmiUntag(RAX);
901 __ cvtsi2sd(XMM1, RAX); 902 __ cvtsi2sd(XMM1, RAX);
902 __ jmp(&double_op); 903 __ jmp(&double_op);
903 __ Bind(&call_method); 904 __ Bind(&call_method);
904 } 905 }
905 906
906 907
907 void FlowGraphCompiler::CompileGraph() { 908 void FlowGraphCompiler::CompileGraph() {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 __ cvtsi2sd(result, temp); 1068 __ cvtsi2sd(result, temp);
1068 __ Bind(&done); 1069 __ Bind(&done);
1069 } 1070 }
1070 1071
1071 1072
1072 #undef __ 1073 #undef __
1073 1074
1074 } // namespace dart 1075 } // namespace dart
1075 1076
1076 #endif // defined TARGET_ARCH_X64 1077 #endif // defined TARGET_ARCH_X64
OLDNEW
« runtime/vm/flow_graph_compiler_ia32.cc ('K') | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698