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

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

Issue 2053893003: [builtins] Introduce proper base::ieee754::log. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: BUILD.gn 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/compiler/s390/code-generator-s390.cc ('k') | src/compiler/x64/instruction-codes-x64.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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 frame_access_state()->GetFrameOffset(i.InputInt32(0)); 833 frame_access_state()->GetFrameOffset(i.InputInt32(0));
834 Register base; 834 Register base;
835 if (offset.from_stack_pointer()) { 835 if (offset.from_stack_pointer()) {
836 base = rsp; 836 base = rsp;
837 } else { 837 } else {
838 base = rbp; 838 base = rbp;
839 } 839 }
840 __ leaq(i.OutputRegister(), Operand(base, offset.offset())); 840 __ leaq(i.OutputRegister(), Operand(base, offset.offset()));
841 break; 841 break;
842 } 842 }
843 case kIeee754Float64Log:
844 __ PrepareCallCFunction(1);
845 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 1);
846 break;
843 case kX64Add32: 847 case kX64Add32:
844 ASSEMBLE_BINOP(addl); 848 ASSEMBLE_BINOP(addl);
845 break; 849 break;
846 case kX64Add: 850 case kX64Add:
847 ASSEMBLE_BINOP(addq); 851 ASSEMBLE_BINOP(addq);
848 break; 852 break;
849 case kX64Sub32: 853 case kX64Sub32:
850 ASSEMBLE_BINOP(subl); 854 ASSEMBLE_BINOP(subl);
851 break; 855 break;
852 case kX64Sub: 856 case kX64Sub:
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 __ Popcntq(i.OutputRegister(), i.InputOperand(0)); 1005 __ Popcntq(i.OutputRegister(), i.InputOperand(0));
1002 } 1006 }
1003 break; 1007 break;
1004 case kX64Popcnt32: 1008 case kX64Popcnt32:
1005 if (instr->InputAt(0)->IsRegister()) { 1009 if (instr->InputAt(0)->IsRegister()) {
1006 __ Popcntl(i.OutputRegister(), i.InputRegister(0)); 1010 __ Popcntl(i.OutputRegister(), i.InputRegister(0));
1007 } else { 1011 } else {
1008 __ Popcntl(i.OutputRegister(), i.InputOperand(0)); 1012 __ Popcntl(i.OutputRegister(), i.InputOperand(0));
1009 } 1013 }
1010 break; 1014 break;
1011 case kX87Float64Log:
1012 __ subq(rsp, Immediate(kDoubleSize));
1013 __ Movsd(Operand(rsp, 0), i.InputDoubleRegister(0));
1014 __ fldln2();
1015 __ fld_d(Operand(rsp, 0));
1016 __ fyl2x();
1017 __ fstp_d(Operand(rsp, 0));
1018 __ Movsd(i.OutputDoubleRegister(), Operand(rsp, 0));
1019 __ addq(rsp, Immediate(kDoubleSize));
1020 break;
1021 case kSSEFloat32Cmp: 1015 case kSSEFloat32Cmp:
1022 ASSEMBLE_SSE_BINOP(Ucomiss); 1016 ASSEMBLE_SSE_BINOP(Ucomiss);
1023 break; 1017 break;
1024 case kSSEFloat32Add: 1018 case kSSEFloat32Add:
1025 ASSEMBLE_SSE_BINOP(addss); 1019 ASSEMBLE_SSE_BINOP(addss);
1026 break; 1020 break;
1027 case kSSEFloat32Sub: 1021 case kSSEFloat32Sub:
1028 ASSEMBLE_SSE_BINOP(subss); 1022 ASSEMBLE_SSE_BINOP(subss);
1029 break; 1023 break;
1030 case kSSEFloat32Mul: 1024 case kSSEFloat32Mul:
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2318 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2325 __ Nop(padding_size); 2319 __ Nop(padding_size);
2326 } 2320 }
2327 } 2321 }
2328 2322
2329 #undef __ 2323 #undef __
2330 2324
2331 } // namespace compiler 2325 } // namespace compiler
2332 } // namespace internal 2326 } // namespace internal
2333 } // namespace v8 2327 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/s390/code-generator-s390.cc ('k') | src/compiler/x64/instruction-codes-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698