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

Side by Side Diff: src/compiler/ia32/code-generator-ia32.cc

Issue 595963002: Extend JSBuiltinReducer to cover Math.sqrt as well. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment by Benedikt. Created 6 years, 3 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 | « src/compiler/graph-unittest.cc ('k') | src/compiler/ia32/instruction-codes-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 __ fnstsw_ax(); 278 __ fnstsw_ax();
279 __ sahf(); 279 __ sahf();
280 __ j(parity_even, &mod_loop); 280 __ j(parity_even, &mod_loop);
281 // Move output to stack and clean up. 281 // Move output to stack and clean up.
282 __ fstp(1); 282 __ fstp(1);
283 __ fstp_d(Operand(esp, 0)); 283 __ fstp_d(Operand(esp, 0));
284 __ movsd(i.OutputDoubleRegister(), Operand(esp, 0)); 284 __ movsd(i.OutputDoubleRegister(), Operand(esp, 0));
285 __ add(esp, Immediate(kDoubleSize)); 285 __ add(esp, Immediate(kDoubleSize));
286 break; 286 break;
287 } 287 }
288 case kSSEFloat64Sqrt:
289 __ sqrtsd(i.OutputDoubleRegister(), i.InputOperand(0));
290 break;
288 case kSSEFloat64ToInt32: 291 case kSSEFloat64ToInt32:
289 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0)); 292 __ cvttsd2si(i.OutputRegister(), i.InputOperand(0));
290 break; 293 break;
291 case kSSEFloat64ToUint32: { 294 case kSSEFloat64ToUint32: {
292 XMMRegister scratch = xmm0; 295 XMMRegister scratch = xmm0;
293 __ Move(scratch, -2147483648.0); 296 __ Move(scratch, -2147483648.0);
294 __ addsd(scratch, i.InputOperand(0)); 297 __ addsd(scratch, i.InputOperand(0));
295 __ cvttsd2si(i.OutputRegister(), scratch); 298 __ cvttsd2si(i.OutputRegister(), scratch);
296 __ add(i.OutputRegister(), Immediate(0x80000000)); 299 __ add(i.OutputRegister(), Immediate(0x80000000));
297 break; 300 break;
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 } 950 }
948 } 951 }
949 MarkLazyDeoptSite(); 952 MarkLazyDeoptSite();
950 } 953 }
951 954
952 #undef __ 955 #undef __
953 956
954 } // namespace compiler 957 } // namespace compiler
955 } // namespace internal 958 } // namespace internal
956 } // namespace v8 959 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/graph-unittest.cc ('k') | src/compiler/ia32/instruction-codes-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698