OLD | NEW |
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 __ movsd(Operand(rsp, 0), i.InputDoubleRegister(0)); | 495 __ movsd(Operand(rsp, 0), i.InputDoubleRegister(0)); |
496 __ fld_d(Operand(rsp, 0)); | 496 __ fld_d(Operand(rsp, 0)); |
497 // Loop while fprem isn't done. | 497 // Loop while fprem isn't done. |
498 Label mod_loop; | 498 Label mod_loop; |
499 __ bind(&mod_loop); | 499 __ bind(&mod_loop); |
500 // This instructions traps on all kinds inputs, but we are assuming the | 500 // This instructions traps on all kinds inputs, but we are assuming the |
501 // floating point control word is set to ignore them all. | 501 // floating point control word is set to ignore them all. |
502 __ fprem(); | 502 __ fprem(); |
503 // The following 2 instruction implicitly use rax. | 503 // The following 2 instruction implicitly use rax. |
504 __ fnstsw_ax(); | 504 __ fnstsw_ax(); |
505 if (CpuFeatures::IsSupported(SAHF) && masm()->IsEnabled(SAHF)) { | 505 if (CpuFeatures::IsSupported(SAHF)) { |
| 506 CpuFeatureScope sahf_scope(masm(), SAHF); |
506 __ sahf(); | 507 __ sahf(); |
507 } else { | 508 } else { |
508 __ shrl(rax, Immediate(8)); | 509 __ shrl(rax, Immediate(8)); |
509 __ andl(rax, Immediate(0xFF)); | 510 __ andl(rax, Immediate(0xFF)); |
510 __ pushq(rax); | 511 __ pushq(rax); |
511 __ popfq(); | 512 __ popfq(); |
512 } | 513 } |
513 __ j(parity_even, &mod_loop); | 514 __ j(parity_even, &mod_loop); |
514 // Move output to stack and clean up. | 515 // Move output to stack and clean up. |
515 __ fstp(1); | 516 __ fstp(1); |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 } | 1206 } |
1206 } | 1207 } |
1207 MarkLazyDeoptSite(); | 1208 MarkLazyDeoptSite(); |
1208 } | 1209 } |
1209 | 1210 |
1210 #undef __ | 1211 #undef __ |
1211 | 1212 |
1212 } // namespace internal | 1213 } // namespace internal |
1213 } // namespace compiler | 1214 } // namespace compiler |
1214 } // namespace v8 | 1215 } // namespace v8 |
OLD | NEW |