| 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 2475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2486 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); | 2486 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
| 2487 ASSERT(ToDoubleRegister(instr->result()).is(input_reg)); | 2487 ASSERT(ToDoubleRegister(instr->result()).is(input_reg)); |
| 2488 __ sqrtsd(input_reg, input_reg); | 2488 __ sqrtsd(input_reg, input_reg); |
| 2489 } | 2489 } |
| 2490 | 2490 |
| 2491 | 2491 |
| 2492 void LCodeGen::DoMathPowHalf(LUnaryMathOperation* instr) { | 2492 void LCodeGen::DoMathPowHalf(LUnaryMathOperation* instr) { |
| 2493 XMMRegister xmm_scratch = xmm0; | 2493 XMMRegister xmm_scratch = xmm0; |
| 2494 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); | 2494 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
| 2495 ASSERT(ToDoubleRegister(instr->result()).is(input_reg)); | 2495 ASSERT(ToDoubleRegister(instr->result()).is(input_reg)); |
| 2496 ExternalReference negative_infinity = | |
| 2497 ExternalReference::address_of_negative_infinity(); | |
| 2498 __ movdbl(xmm_scratch, Operand::StaticVariable(negative_infinity)); | |
| 2499 __ ucomisd(xmm_scratch, input_reg); | |
| 2500 DeoptimizeIf(equal, instr->environment()); | |
| 2501 __ xorpd(xmm_scratch, xmm_scratch); | 2496 __ xorpd(xmm_scratch, xmm_scratch); |
| 2502 __ addsd(input_reg, xmm_scratch); // Convert -0 to +0. | 2497 __ addsd(input_reg, xmm_scratch); // Convert -0 to +0. |
| 2503 __ sqrtsd(input_reg, input_reg); | 2498 __ sqrtsd(input_reg, input_reg); |
| 2504 } | 2499 } |
| 2505 | 2500 |
| 2506 | 2501 |
| 2507 void LCodeGen::DoPower(LPower* instr) { | 2502 void LCodeGen::DoPower(LPower* instr) { |
| 2508 LOperand* left = instr->InputAt(0); | 2503 LOperand* left = instr->InputAt(0); |
| 2509 LOperand* right = instr->InputAt(1); | 2504 LOperand* right = instr->InputAt(1); |
| 2510 DoubleRegister result_reg = ToDoubleRegister(instr->result()); | 2505 DoubleRegister result_reg = ToDoubleRegister(instr->result()); |
| (...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3805 ASSERT(osr_pc_offset_ == -1); | 3800 ASSERT(osr_pc_offset_ == -1); |
| 3806 osr_pc_offset_ = masm()->pc_offset(); | 3801 osr_pc_offset_ = masm()->pc_offset(); |
| 3807 } | 3802 } |
| 3808 | 3803 |
| 3809 | 3804 |
| 3810 #undef __ | 3805 #undef __ |
| 3811 | 3806 |
| 3812 } } // namespace v8::internal | 3807 } } // namespace v8::internal |
| 3813 | 3808 |
| 3814 #endif // V8_TARGET_ARCH_IA32 | 3809 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |