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

Side by Side Diff: src/compiler/mips/code-generator-mips.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/machine-operator-reducer.cc ('k') | src/compiler/mips/instruction-codes-mips.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 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/ast/scopes.h" 5 #include "src/ast/scopes.h"
6 #include "src/compiler/code-generator.h" 6 #include "src/compiler/code-generator.h"
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 __ bind(ool->exit()); 711 __ bind(ool->exit());
712 break; 712 break;
713 } 713 }
714 case kArchStackSlot: { 714 case kArchStackSlot: {
715 FrameOffset offset = 715 FrameOffset offset =
716 frame_access_state()->GetFrameOffset(i.InputInt32(0)); 716 frame_access_state()->GetFrameOffset(i.InputInt32(0));
717 __ Addu(i.OutputRegister(), offset.from_stack_pointer() ? sp : fp, 717 __ Addu(i.OutputRegister(), offset.from_stack_pointer() ? sp : fp,
718 Operand(offset.offset())); 718 Operand(offset.offset()));
719 break; 719 break;
720 } 720 }
721 case kIeee754Float64Log: {
722 // TODO(bmeurer): We should really get rid of this special instruction,
723 // and generate a CallAddress instruction instead.
724 FrameScope scope(masm(), StackFrame::MANUAL);
725 __ PrepareCallCFunction(0, 1, kScratchReg);
726 __ MovToFloatParameter(i.InputDoubleRegister(0));
727 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0,
728 1);
729 // Move the result in the double result register.
730 __ MovFromFloatResult(i.OutputDoubleRegister());
731 break;
732 }
721 case kMipsAdd: 733 case kMipsAdd:
722 __ Addu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 734 __ Addu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
723 break; 735 break;
724 case kMipsAddOvf: 736 case kMipsAddOvf:
725 // Pseudo-instruction used for overflow/branch. No opcode emitted here. 737 // Pseudo-instruction used for overflow/branch. No opcode emitted here.
726 break; 738 break;
727 case kMipsSub: 739 case kMipsSub:
728 __ Subu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); 740 __ Subu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1));
729 break; 741 break;
730 case kMipsSubOvf: 742 case kMipsSubOvf:
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 i.InputDoubleRegister(1)); 1042 i.InputDoubleRegister(1));
1031 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), 1043 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()),
1032 0, 2); 1044 0, 2);
1033 // Move the result in the double result register. 1045 // Move the result in the double result register.
1034 __ MovFromFloatResult(i.OutputDoubleRegister()); 1046 __ MovFromFloatResult(i.OutputDoubleRegister());
1035 break; 1047 break;
1036 } 1048 }
1037 case kMipsAbsD: 1049 case kMipsAbsD:
1038 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1050 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1039 break; 1051 break;
1040 case kMipsLogD: {
1041 // TODO(bmeurer): We should really get rid of this special instruction,
1042 // and generate a CallAddress instruction instead.
1043 FrameScope scope(masm(), StackFrame::MANUAL);
1044 __ PrepareCallCFunction(0, 1, kScratchReg);
1045 __ MovToFloatParameter(i.InputDoubleRegister(0));
1046 __ CallCFunction(ExternalReference::math_log_double_function(isolate()),
1047 0, 1);
1048 // Move the result in the double result register.
1049 __ MovFromFloatResult(i.OutputDoubleRegister());
1050 break;
1051 }
1052 case kMipsSqrtD: { 1052 case kMipsSqrtD: {
1053 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); 1053 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0));
1054 break; 1054 break;
1055 } 1055 }
1056 case kMipsMaxD: 1056 case kMipsMaxD:
1057 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1057 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
1058 i.InputDoubleRegister(1)); 1058 i.InputDoubleRegister(1));
1059 break; 1059 break;
1060 case kMipsMinD: 1060 case kMipsMinD:
1061 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), 1061 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0),
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
2009 padding_size -= v8::internal::Assembler::kInstrSize; 2009 padding_size -= v8::internal::Assembler::kInstrSize;
2010 } 2010 }
2011 } 2011 }
2012 } 2012 }
2013 2013
2014 #undef __ 2014 #undef __
2015 2015
2016 } // namespace compiler 2016 } // namespace compiler
2017 } // namespace internal 2017 } // namespace internal
2018 } // namespace v8 2018 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator-reducer.cc ('k') | src/compiler/mips/instruction-codes-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698