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

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

Issue 11418149: Faster implementation of Math.exp() (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Win build Created 8 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 | « src/ia32/disasm-ia32.cc ('k') | src/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 // 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 3591 matching lines...) Expand 10 before | Expand all | Expand 10 after
3602 __ movdbl(Operand(esp, 0), input_reg); 3602 __ movdbl(Operand(esp, 0), input_reg);
3603 __ fld_d(Operand(esp, 0)); 3603 __ fld_d(Operand(esp, 0));
3604 __ fyl2x(); 3604 __ fyl2x();
3605 __ fstp_d(Operand(esp, 0)); 3605 __ fstp_d(Operand(esp, 0));
3606 __ movdbl(input_reg, Operand(esp, 0)); 3606 __ movdbl(input_reg, Operand(esp, 0));
3607 __ add(Operand(esp), Immediate(kDoubleSize)); 3607 __ add(Operand(esp), Immediate(kDoubleSize));
3608 __ bind(&done); 3608 __ bind(&done);
3609 } 3609 }
3610 3610
3611 3611
3612 void LCodeGen::DoMathExp(LMathExp* instr) {
3613 XMMRegister input = ToDoubleRegister(instr->value());
3614 XMMRegister result = ToDoubleRegister(instr->result());
3615 Register temp1 = ToRegister(instr->temp1());
3616 Register temp2 = ToRegister(instr->temp2());
3617
3618 MathExpGenerator::EmitMathExp(masm(), input, result, xmm0, temp1, temp2);
3619 }
3620
3621
3612 void LCodeGen::DoMathTan(LUnaryMathOperation* instr) { 3622 void LCodeGen::DoMathTan(LUnaryMathOperation* instr) {
3613 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); 3623 ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
3614 TranscendentalCacheStub stub(TranscendentalCache::TAN, 3624 TranscendentalCacheStub stub(TranscendentalCache::TAN,
3615 TranscendentalCacheStub::UNTAGGED); 3625 TranscendentalCacheStub::UNTAGGED);
3616 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3626 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3617 } 3627 }
3618 3628
3619 3629
3620 void LCodeGen::DoMathCos(LUnaryMathOperation* instr) { 3630 void LCodeGen::DoMathCos(LUnaryMathOperation* instr) {
3621 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); 3631 ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after
5610 FixedArray::kHeaderSize - kPointerSize)); 5620 FixedArray::kHeaderSize - kPointerSize));
5611 __ bind(&done); 5621 __ bind(&done);
5612 } 5622 }
5613 5623
5614 5624
5615 #undef __ 5625 #undef __
5616 5626
5617 } } // namespace v8::internal 5627 } } // namespace v8::internal
5618 5628
5619 #endif // V8_TARGET_ARCH_IA32 5629 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/disasm-ia32.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698