OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |