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

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 10937013: Fixed minus zero test (fixes v8:2133). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed tab. Created 8 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/ia32/assembler-ia32.cc ('k') | src/ia32/disasm-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 case Token::ADD: __ addsd(xmm0, xmm1); break; 1786 case Token::ADD: __ addsd(xmm0, xmm1); break;
1787 case Token::SUB: __ subsd(xmm0, xmm1); break; 1787 case Token::SUB: __ subsd(xmm0, xmm1); break;
1788 case Token::MUL: __ mulsd(xmm0, xmm1); break; 1788 case Token::MUL: __ mulsd(xmm0, xmm1); break;
1789 case Token::DIV: __ divsd(xmm0, xmm1); break; 1789 case Token::DIV: __ divsd(xmm0, xmm1); break;
1790 default: UNREACHABLE(); 1790 default: UNREACHABLE();
1791 } 1791 }
1792 // Check result type if it is currently Int32. 1792 // Check result type if it is currently Int32.
1793 if (result_type_ <= BinaryOpIC::INT32) { 1793 if (result_type_ <= BinaryOpIC::INT32) {
1794 __ cvttsd2si(ecx, Operand(xmm0)); 1794 __ cvttsd2si(ecx, Operand(xmm0));
1795 __ cvtsi2sd(xmm2, ecx); 1795 __ cvtsi2sd(xmm2, ecx);
1796 __ ucomisd(xmm0, xmm2); 1796 __ pcmpeqd(xmm2, xmm0);
1797 __ j(not_zero, &not_int32); 1797 __ movmskpd(ecx, xmm2);
1798 __ j(carry, &not_int32); 1798 __ test(ecx, Immediate(1));
1799 __ j(zero, &not_int32);
1799 } 1800 }
1800 GenerateHeapResultAllocation(masm, &call_runtime); 1801 GenerateHeapResultAllocation(masm, &call_runtime);
1801 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0); 1802 __ movdbl(FieldOperand(eax, HeapNumber::kValueOffset), xmm0);
1802 __ ret(0); 1803 __ ret(0);
1803 } 1804 }
1804 } else { // SSE2 not available, use FPU. 1805 } else { // SSE2 not available, use FPU.
1805 FloatingPointHelper::CheckFloatOperands(masm, &not_floats, ebx); 1806 FloatingPointHelper::CheckFloatOperands(masm, &not_floats, ebx);
1806 FloatingPointHelper::LoadFloatOperands( 1807 FloatingPointHelper::LoadFloatOperands(
1807 masm, 1808 masm,
1808 ecx, 1809 ecx,
(...skipping 5702 matching lines...) Expand 10 before | Expand all | Expand 10 after
7511 // Restore ecx. 7512 // Restore ecx.
7512 __ pop(ecx); 7513 __ pop(ecx);
7513 __ ret(0); 7514 __ ret(0);
7514 } 7515 }
7515 7516
7516 #undef __ 7517 #undef __
7517 7518
7518 } } // namespace v8::internal 7519 } } // namespace v8::internal
7519 7520
7520 #endif // V8_TARGET_ARCH_IA32 7521 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/ia32/disasm-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698