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

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

Issue 2060743002: [builtins] Introduce proper Float64Log1p operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@Math_Log
Patch Set: REBASE 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/arm64/macro-assembler-arm64.h" 8 #include "src/arm64/macro-assembler-arm64.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } while (0) 505 } while (0)
506 506
507 #define ASSEMBLE_ATOMIC_STORE_INTEGER(asm_instr) \ 507 #define ASSEMBLE_ATOMIC_STORE_INTEGER(asm_instr) \
508 do { \ 508 do { \
509 __ Dmb(InnerShareable, BarrierAll); \ 509 __ Dmb(InnerShareable, BarrierAll); \
510 __ asm_instr(i.InputRegister(2), \ 510 __ asm_instr(i.InputRegister(2), \
511 MemOperand(i.InputRegister(0), i.InputRegister(1))); \ 511 MemOperand(i.InputRegister(0), i.InputRegister(1))); \
512 __ Dmb(InnerShareable, BarrierAll); \ 512 __ Dmb(InnerShareable, BarrierAll); \
513 } while (0) 513 } while (0)
514 514
515 #define ASSEMBLE_IEEE754_UNOP(name) \
516 do { \
517 FrameScope scope(masm(), StackFrame::MANUAL); \
518 __ CallCFunction(ExternalReference::ieee754_##name##_function(isolate()), \
519 0, 1); \
520 } while (0)
521
515 void CodeGenerator::AssembleDeconstructFrame() { 522 void CodeGenerator::AssembleDeconstructFrame() {
516 const CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); 523 const CallDescriptor* descriptor = linkage()->GetIncomingDescriptor();
517 if (descriptor->IsCFunctionCall() || descriptor->UseNativeStack()) { 524 if (descriptor->IsCFunctionCall() || descriptor->UseNativeStack()) {
518 __ Mov(csp, fp); 525 __ Mov(csp, fp);
519 } else { 526 } else {
520 __ Mov(jssp, fp); 527 __ Mov(jssp, fp);
521 } 528 }
522 __ Pop(fp, lr); 529 __ Pop(fp, lr);
523 } 530 }
524 531
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 frame_access_state()->GetFrameOffset(i.InputInt32(0)); 792 frame_access_state()->GetFrameOffset(i.InputInt32(0));
786 Register base; 793 Register base;
787 if (offset.from_stack_pointer()) { 794 if (offset.from_stack_pointer()) {
788 base = __ StackPointer(); 795 base = __ StackPointer();
789 } else { 796 } else {
790 base = fp; 797 base = fp;
791 } 798 }
792 __ Add(i.OutputRegister(0), base, Operand(offset.offset())); 799 __ Add(i.OutputRegister(0), base, Operand(offset.offset()));
793 break; 800 break;
794 } 801 }
795 case kIeee754Float64Log: { 802 case kIeee754Float64Log:
796 FrameScope scope(masm(), StackFrame::MANUAL); 803 ASSEMBLE_IEEE754_UNOP(log);
797 DCHECK(d0.is(i.InputDoubleRegister(0)));
798 DCHECK(d0.is(i.OutputDoubleRegister()));
799 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0,
800 1);
801 break; 804 break;
802 } 805 case kIeee754Float64Log1p:
806 ASSEMBLE_IEEE754_UNOP(log1p);
807 break;
803 case kArm64Float32RoundDown: 808 case kArm64Float32RoundDown:
804 __ Frintm(i.OutputFloat32Register(), i.InputFloat32Register(0)); 809 __ Frintm(i.OutputFloat32Register(), i.InputFloat32Register(0));
805 break; 810 break;
806 case kArm64Float64RoundDown: 811 case kArm64Float64RoundDown:
807 __ Frintm(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 812 __ Frintm(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
808 break; 813 break;
809 case kArm64Float32RoundUp: 814 case kArm64Float32RoundUp:
810 __ Frintp(i.OutputFloat32Register(), i.InputFloat32Register(0)); 815 __ Frintp(i.OutputFloat32Register(), i.InputFloat32Register(0));
811 break; 816 break;
812 case kArm64Float64RoundUp: 817 case kArm64Float64RoundUp:
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 padding_size -= kInstructionSize; 1938 padding_size -= kInstructionSize;
1934 } 1939 }
1935 } 1940 }
1936 } 1941 }
1937 1942
1938 #undef __ 1943 #undef __
1939 1944
1940 } // namespace compiler 1945 } // namespace compiler
1941 } // namespace internal 1946 } // namespace internal
1942 } // namespace v8 1947 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698