| OLD | NEW |
| 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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 __ bind(ool->exit()); | 720 __ bind(ool->exit()); |
| 721 break; | 721 break; |
| 722 } | 722 } |
| 723 case kArchStackSlot: { | 723 case kArchStackSlot: { |
| 724 FrameOffset offset = | 724 FrameOffset offset = |
| 725 frame_access_state()->GetFrameOffset(i.InputInt32(0)); | 725 frame_access_state()->GetFrameOffset(i.InputInt32(0)); |
| 726 __ Daddu(i.OutputRegister(), offset.from_stack_pointer() ? sp : fp, | 726 __ Daddu(i.OutputRegister(), offset.from_stack_pointer() ? sp : fp, |
| 727 Operand(offset.offset())); | 727 Operand(offset.offset())); |
| 728 break; | 728 break; |
| 729 } | 729 } |
| 730 case kIeee754Float64Log: { |
| 731 // TODO(bmeurer): We should really get rid of this special instruction, |
| 732 // and generate a CallAddress instruction instead. |
| 733 FrameScope scope(masm(), StackFrame::MANUAL); |
| 734 __ PrepareCallCFunction(0, 1, kScratchReg); |
| 735 __ MovToFloatParameter(i.InputDoubleRegister(0)); |
| 736 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, |
| 737 1); |
| 738 // Move the result in the double result register. |
| 739 __ MovFromFloatResult(i.OutputDoubleRegister()); |
| 740 break; |
| 741 } |
| 730 case kMips64Add: | 742 case kMips64Add: |
| 731 __ Addu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); | 743 __ Addu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); |
| 732 break; | 744 break; |
| 733 case kMips64Dadd: | 745 case kMips64Dadd: |
| 734 __ Daddu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); | 746 __ Daddu(i.OutputRegister(), i.InputRegister(0), i.InputOperand(1)); |
| 735 break; | 747 break; |
| 736 case kMips64DaddOvf: | 748 case kMips64DaddOvf: |
| 737 // Pseudo-instruction used for overflow/branch. No opcode emitted here. | 749 // Pseudo-instruction used for overflow/branch. No opcode emitted here. |
| 738 break; | 750 break; |
| 739 case kMips64Sub: | 751 case kMips64Sub: |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 i.InputDoubleRegister(1)); | 1190 i.InputDoubleRegister(1)); |
| 1179 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), | 1191 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), |
| 1180 0, 2); | 1192 0, 2); |
| 1181 // Move the result in the double result register. | 1193 // Move the result in the double result register. |
| 1182 __ MovFromFloatResult(i.OutputDoubleRegister()); | 1194 __ MovFromFloatResult(i.OutputDoubleRegister()); |
| 1183 break; | 1195 break; |
| 1184 } | 1196 } |
| 1185 case kMips64AbsD: | 1197 case kMips64AbsD: |
| 1186 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 1198 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 1187 break; | 1199 break; |
| 1188 case kMips64LogD: { | |
| 1189 // TODO(bmeurer): We should really get rid of this special instruction, | |
| 1190 // and generate a CallAddress instruction instead. | |
| 1191 FrameScope scope(masm(), StackFrame::MANUAL); | |
| 1192 __ PrepareCallCFunction(0, 1, kScratchReg); | |
| 1193 __ MovToFloatParameter(i.InputDoubleRegister(0)); | |
| 1194 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), | |
| 1195 0, 1); | |
| 1196 // Move the result in the double result register. | |
| 1197 __ MovFromFloatResult(i.OutputDoubleRegister()); | |
| 1198 break; | |
| 1199 } | |
| 1200 case kMips64SqrtD: { | 1200 case kMips64SqrtD: { |
| 1201 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 1201 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 1202 break; | 1202 break; |
| 1203 } | 1203 } |
| 1204 case kMips64MaxD: | 1204 case kMips64MaxD: |
| 1205 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1205 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 1206 i.InputDoubleRegister(1)); | 1206 i.InputDoubleRegister(1)); |
| 1207 break; | 1207 break; |
| 1208 case kMips64MinD: | 1208 case kMips64MinD: |
| 1209 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1209 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2267 padding_size -= v8::internal::Assembler::kInstrSize; | 2267 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2268 } | 2268 } |
| 2269 } | 2269 } |
| 2270 } | 2270 } |
| 2271 | 2271 |
| 2272 #undef __ | 2272 #undef __ |
| 2273 | 2273 |
| 2274 } // namespace compiler | 2274 } // namespace compiler |
| 2275 } // namespace internal | 2275 } // namespace internal |
| 2276 } // namespace v8 | 2276 } // namespace v8 |
| OLD | NEW |