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

Side by Side Diff: src/compiler/x87/code-generator-x87.cc

Issue 2034393002: X87: [builtins] Migrate Math.log to TurboFan. (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 | « no previous file | src/compiler/x87/instruction-codes-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 } else { 891 } else {
892 __ ror_cl(i.OutputOperand()); 892 __ ror_cl(i.OutputOperand());
893 } 893 }
894 break; 894 break;
895 case kX87Lzcnt: 895 case kX87Lzcnt:
896 __ Lzcnt(i.OutputRegister(), i.InputOperand(0)); 896 __ Lzcnt(i.OutputRegister(), i.InputOperand(0));
897 break; 897 break;
898 case kX87Popcnt: 898 case kX87Popcnt:
899 __ Popcnt(i.OutputRegister(), i.InputOperand(0)); 899 __ Popcnt(i.OutputRegister(), i.InputOperand(0));
900 break; 900 break;
901 case kX87Float64Log:
902 if (FLAG_debug_code && FLAG_enable_slow_asserts) {
903 __ VerifyX87StackDepth(1);
904 }
905 __ X87SetFPUCW(0x027F);
906 __ fstp(0);
907 __ fldln2();
908 __ fld_d(MemOperand(esp, 0));
909 __ fyl2x();
910 __ lea(esp, Operand(esp, kDoubleSize));
911 __ X87SetFPUCW(0x037F);
912 break;
901 case kX87LoadFloat64Constant: { 913 case kX87LoadFloat64Constant: {
902 InstructionOperand* source = instr->InputAt(0); 914 InstructionOperand* source = instr->InputAt(0);
903 InstructionOperand* destination = instr->Output(); 915 InstructionOperand* destination = instr->Output();
904 DCHECK(source->IsConstant()); 916 DCHECK(source->IsConstant());
905 X87OperandConverter g(this, nullptr); 917 X87OperandConverter g(this, nullptr);
906 Constant src_constant = g.ToConstant(source); 918 Constant src_constant = g.ToConstant(source);
907 919
908 DCHECK_EQ(Constant::kFloat64, src_constant.type()); 920 DCHECK_EQ(Constant::kFloat64, src_constant.type());
909 uint64_t src = bit_cast<uint64_t>(src_constant.ToFloat64()); 921 uint64_t src = bit_cast<uint64_t>(src_constant.ToFloat64());
910 uint32_t lower = static_cast<uint32_t>(src); 922 uint32_t lower = static_cast<uint32_t>(src);
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2495 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2507 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2496 __ Nop(padding_size); 2508 __ Nop(padding_size);
2497 } 2509 }
2498 } 2510 }
2499 2511
2500 #undef __ 2512 #undef __
2501 2513
2502 } // namespace compiler 2514 } // namespace compiler
2503 } // namespace internal 2515 } // namespace internal
2504 } // namespace v8 2516 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/x87/instruction-codes-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698