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

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

Issue 118233002: Handle Math.log(NaN) correctly in Crankshaft on Intel platforms. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | « no previous file | src/x64/lithium-codegen-x64.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 4138 matching lines...) Expand 10 before | Expand all | Expand 10 after
4149 4149
4150 void LCodeGen::DoMathLog(LMathLog* instr) { 4150 void LCodeGen::DoMathLog(LMathLog* instr) {
4151 CpuFeatureScope scope(masm(), SSE2); 4151 CpuFeatureScope scope(masm(), SSE2);
4152 ASSERT(instr->value()->Equals(instr->result())); 4152 ASSERT(instr->value()->Equals(instr->result()));
4153 XMMRegister input_reg = ToDoubleRegister(instr->value()); 4153 XMMRegister input_reg = ToDoubleRegister(instr->value());
4154 XMMRegister xmm_scratch = double_scratch0(); 4154 XMMRegister xmm_scratch = double_scratch0();
4155 Label positive, done, zero; 4155 Label positive, done, zero;
4156 __ xorps(xmm_scratch, xmm_scratch); 4156 __ xorps(xmm_scratch, xmm_scratch);
4157 __ ucomisd(input_reg, xmm_scratch); 4157 __ ucomisd(input_reg, xmm_scratch);
4158 __ j(above, &positive, Label::kNear); 4158 __ j(above, &positive, Label::kNear);
4159 __ j(equal, &zero, Label::kNear); 4159 __ j(not_carry, &zero, Label::kNear);
4160 ExternalReference nan = 4160 ExternalReference nan =
4161 ExternalReference::address_of_canonical_non_hole_nan(); 4161 ExternalReference::address_of_canonical_non_hole_nan();
4162 __ movsd(input_reg, Operand::StaticVariable(nan)); 4162 __ movsd(input_reg, Operand::StaticVariable(nan));
4163 __ jmp(&done, Label::kNear); 4163 __ jmp(&done, Label::kNear);
4164 __ bind(&zero); 4164 __ bind(&zero);
4165 ExternalReference ninf = 4165 ExternalReference ninf =
4166 ExternalReference::address_of_negative_infinity(); 4166 ExternalReference::address_of_negative_infinity();
4167 __ movsd(input_reg, Operand::StaticVariable(ninf)); 4167 __ movsd(input_reg, Operand::StaticVariable(ninf));
4168 __ jmp(&done, Label::kNear); 4168 __ jmp(&done, Label::kNear);
4169 __ bind(&positive); 4169 __ bind(&positive);
(...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after
6363 FixedArray::kHeaderSize - kPointerSize)); 6363 FixedArray::kHeaderSize - kPointerSize));
6364 __ bind(&done); 6364 __ bind(&done);
6365 } 6365 }
6366 6366
6367 6367
6368 #undef __ 6368 #undef __
6369 6369
6370 } } // namespace v8::internal 6370 } } // namespace v8::internal
6371 6371
6372 #endif // V8_TARGET_ARCH_IA32 6372 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698