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

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

Issue 2070813002: Revert of [builtins] Introduce proper Float64Exp operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | src/crankshaft/ia32/lithium-ia32.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after
3418 Register input = ToRegister(instr->value()); 3418 Register input = ToRegister(instr->value());
3419 Register result = ToRegister(instr->result()); 3419 Register result = ToRegister(instr->result());
3420 3420
3421 __ Lzcnt(result, input); 3421 __ Lzcnt(result, input);
3422 } 3422 }
3423 3423
3424 3424
3425 void LCodeGen::DoMathExp(LMathExp* instr) { 3425 void LCodeGen::DoMathExp(LMathExp* instr) {
3426 XMMRegister input = ToDoubleRegister(instr->value()); 3426 XMMRegister input = ToDoubleRegister(instr->value());
3427 XMMRegister result = ToDoubleRegister(instr->result()); 3427 XMMRegister result = ToDoubleRegister(instr->result());
3428 // Pass one double as argument on the stack. 3428 XMMRegister temp0 = double_scratch0();
3429 __ PrepareCallCFunction(2, eax); 3429 Register temp1 = ToRegister(instr->temp1());
3430 __ movsd(Operand(esp, 0 * kDoubleSize), input); 3430 Register temp2 = ToRegister(instr->temp2());
3431 __ CallCFunction(ExternalReference::ieee754_exp_function(isolate()), 2); 3431
3432 // Return value is in st(0) on ia32. 3432 MathExpGenerator::EmitMathExp(masm(), input, result, temp0, temp1, temp2);
3433 // Store it into the result register.
3434 __ sub(esp, Immediate(kDoubleSize));
3435 __ fstp_d(Operand(esp, 0));
3436 __ movsd(result, Operand(esp, 0));
3437 __ add(esp, Immediate(kDoubleSize));
3438 } 3433 }
3439 3434
3440 void LCodeGen::PrepareForTailCall(const ParameterCount& actual, 3435 void LCodeGen::PrepareForTailCall(const ParameterCount& actual,
3441 Register scratch1, Register scratch2, 3436 Register scratch1, Register scratch2,
3442 Register scratch3) { 3437 Register scratch3) {
3443 #if DEBUG 3438 #if DEBUG
3444 if (actual.is_reg()) { 3439 if (actual.is_reg()) {
3445 DCHECK(!AreAliased(actual.reg(), scratch1, scratch2, scratch3)); 3440 DCHECK(!AreAliased(actual.reg(), scratch1, scratch2, scratch3));
3446 } else { 3441 } else {
3447 DCHECK(!AreAliased(scratch1, scratch2, scratch3)); 3442 DCHECK(!AreAliased(scratch1, scratch2, scratch3));
(...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after
5302 __ bind(deferred->exit()); 5297 __ bind(deferred->exit());
5303 __ bind(&done); 5298 __ bind(&done);
5304 } 5299 }
5305 5300
5306 #undef __ 5301 #undef __
5307 5302
5308 } // namespace internal 5303 } // namespace internal
5309 } // namespace v8 5304 } // namespace v8
5310 5305
5311 #endif // V8_TARGET_ARCH_IA32 5306 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | src/crankshaft/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698