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

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 6334056: Merge r6573 to 3.0 branch. This is a fix for issue 1088, Math.pow(-0, 0.5). (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.0/
Patch Set: '' Created 9 years, 10 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/ia32/codegen-ia32.cc ('k') | src/version.cc » ('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 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 2370 matching lines...) Expand 10 before | Expand all | Expand 10 after
2381 2381
2382 void LCodeGen::DoMathPowHalf(LUnaryMathOperation* instr) { 2382 void LCodeGen::DoMathPowHalf(LUnaryMathOperation* instr) {
2383 XMMRegister xmm_scratch = xmm0; 2383 XMMRegister xmm_scratch = xmm0;
2384 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); 2384 XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0));
2385 ASSERT(ToDoubleRegister(instr->result()).is(input_reg)); 2385 ASSERT(ToDoubleRegister(instr->result()).is(input_reg));
2386 ExternalReference negative_infinity = 2386 ExternalReference negative_infinity =
2387 ExternalReference::address_of_negative_infinity(); 2387 ExternalReference::address_of_negative_infinity();
2388 __ movdbl(xmm_scratch, Operand::StaticVariable(negative_infinity)); 2388 __ movdbl(xmm_scratch, Operand::StaticVariable(negative_infinity));
2389 __ ucomisd(xmm_scratch, input_reg); 2389 __ ucomisd(xmm_scratch, input_reg);
2390 DeoptimizeIf(equal, instr->environment()); 2390 DeoptimizeIf(equal, instr->environment());
2391 __ xorpd(xmm_scratch, xmm_scratch);
2392 __ addsd(input_reg, xmm_scratch); // Convert -0 to +0.
2391 __ sqrtsd(input_reg, input_reg); 2393 __ sqrtsd(input_reg, input_reg);
2392 } 2394 }
2393 2395
2394 2396
2395 void LCodeGen::DoPower(LPower* instr) { 2397 void LCodeGen::DoPower(LPower* instr) {
2396 LOperand* left = instr->InputAt(0); 2398 LOperand* left = instr->InputAt(0);
2397 LOperand* right = instr->InputAt(1); 2399 LOperand* right = instr->InputAt(1);
2398 DoubleRegister result_reg = ToDoubleRegister(instr->result()); 2400 DoubleRegister result_reg = ToDoubleRegister(instr->result());
2399 Representation exponent_type = instr->hydrogen()->right()->representation(); 2401 Representation exponent_type = instr->hydrogen()->right()->representation();
2400 if (exponent_type.IsDouble()) { 2402 if (exponent_type.IsDouble()) {
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
3606 ASSERT(osr_pc_offset_ == -1); 3608 ASSERT(osr_pc_offset_ == -1);
3607 osr_pc_offset_ = masm()->pc_offset(); 3609 osr_pc_offset_ = masm()->pc_offset();
3608 } 3610 }
3609 3611
3610 3612
3611 #undef __ 3613 #undef __
3612 3614
3613 } } // namespace v8::internal 3615 } } // namespace v8::internal
3614 3616
3615 #endif // V8_TARGET_ARCH_IA32 3617 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698