| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2390 | 2390 |
| 2391 void LCodeGen::DoMathPowHalf(LUnaryMathOperation* instr) { | 2391 void LCodeGen::DoMathPowHalf(LUnaryMathOperation* instr) { |
| 2392 XMMRegister xmm_scratch = xmm0; | 2392 XMMRegister xmm_scratch = xmm0; |
| 2393 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); | 2393 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
| 2394 ASSERT(ToDoubleRegister(instr->result()).is(input_reg)); | 2394 ASSERT(ToDoubleRegister(instr->result()).is(input_reg)); |
| 2395 ExternalReference negative_infinity = | 2395 ExternalReference negative_infinity = |
| 2396 ExternalReference::address_of_negative_infinity(); | 2396 ExternalReference::address_of_negative_infinity(); |
| 2397 __ movdbl(xmm_scratch, Operand::StaticVariable(negative_infinity)); | 2397 __ movdbl(xmm_scratch, Operand::StaticVariable(negative_infinity)); |
| 2398 __ ucomisd(xmm_scratch, input_reg); | 2398 __ ucomisd(xmm_scratch, input_reg); |
| 2399 DeoptimizeIf(equal, instr->environment()); | 2399 DeoptimizeIf(equal, instr->environment()); |
| 2400 __ xorpd(xmm_scratch, xmm_scratch); |
| 2401 __ addsd(input_reg, xmm_scratch); // Convert -0 to +0. |
| 2400 __ sqrtsd(input_reg, input_reg); | 2402 __ sqrtsd(input_reg, input_reg); |
| 2401 } | 2403 } |
| 2402 | 2404 |
| 2403 | 2405 |
| 2404 void LCodeGen::DoPower(LPower* instr) { | 2406 void LCodeGen::DoPower(LPower* instr) { |
| 2405 LOperand* left = instr->InputAt(0); | 2407 LOperand* left = instr->InputAt(0); |
| 2406 LOperand* right = instr->InputAt(1); | 2408 LOperand* right = instr->InputAt(1); |
| 2407 DoubleRegister result_reg = ToDoubleRegister(instr->result()); | 2409 DoubleRegister result_reg = ToDoubleRegister(instr->result()); |
| 2408 Representation exponent_type = instr->hydrogen()->right()->representation(); | 2410 Representation exponent_type = instr->hydrogen()->right()->representation(); |
| 2409 if (exponent_type.IsDouble()) { | 2411 if (exponent_type.IsDouble()) { |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3611 ASSERT(osr_pc_offset_ == -1); | 3613 ASSERT(osr_pc_offset_ == -1); |
| 3612 osr_pc_offset_ = masm()->pc_offset(); | 3614 osr_pc_offset_ = masm()->pc_offset(); |
| 3613 } | 3615 } |
| 3614 | 3616 |
| 3615 | 3617 |
| 3616 #undef __ | 3618 #undef __ |
| 3617 | 3619 |
| 3618 } } // namespace v8::internal | 3620 } } // namespace v8::internal |
| 3619 | 3621 |
| 3620 #endif // V8_TARGET_ARCH_IA32 | 3622 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |