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/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm/macro-assembler-arm.h" | 7 #include "src/arm/macro-assembler-arm.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compiler/code-generator-impl.h" | 9 #include "src/compiler/code-generator-impl.h" |
10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 __ PrepareCallCFunction(0, 2, kScratchReg); | 986 __ PrepareCallCFunction(0, 2, kScratchReg); |
987 __ MovToFloatParameters(i.InputFloat64Register(0), | 987 __ MovToFloatParameters(i.InputFloat64Register(0), |
988 i.InputFloat64Register(1)); | 988 i.InputFloat64Register(1)); |
989 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), | 989 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), |
990 0, 2); | 990 0, 2); |
991 // Move the result in the double result register. | 991 // Move the result in the double result register. |
992 __ MovFromFloatResult(i.OutputFloat64Register()); | 992 __ MovFromFloatResult(i.OutputFloat64Register()); |
993 DCHECK_EQ(LeaveCC, i.OutputSBit()); | 993 DCHECK_EQ(LeaveCC, i.OutputSBit()); |
994 break; | 994 break; |
995 } | 995 } |
| 996 case kArmVlogF64: { |
| 997 // TODO(bmeurer): We should really get rid of this special instruction, |
| 998 // and generate a CallAddress instruction instead. |
| 999 FrameScope scope(masm(), StackFrame::MANUAL); |
| 1000 __ PrepareCallCFunction(0, 1, kScratchReg); |
| 1001 __ MovToFloatParameter(i.InputFloat64Register(0)); |
| 1002 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), |
| 1003 0, 1); |
| 1004 // Move the result in the double result register. |
| 1005 __ MovFromFloatResult(i.OutputFloat64Register()); |
| 1006 DCHECK_EQ(LeaveCC, i.OutputSBit()); |
| 1007 break; |
| 1008 } |
996 case kArmVsqrtF64: | 1009 case kArmVsqrtF64: |
997 __ vsqrt(i.OutputFloat64Register(), i.InputFloat64Register(0)); | 1010 __ vsqrt(i.OutputFloat64Register(), i.InputFloat64Register(0)); |
998 break; | 1011 break; |
999 case kArmVabsF64: | 1012 case kArmVabsF64: |
1000 __ vabs(i.OutputFloat64Register(), i.InputFloat64Register(0)); | 1013 __ vabs(i.OutputFloat64Register(), i.InputFloat64Register(0)); |
1001 break; | 1014 break; |
1002 case kArmVnegF64: | 1015 case kArmVnegF64: |
1003 __ vneg(i.OutputFloat64Register(), i.InputFloat64Register(0)); | 1016 __ vneg(i.OutputFloat64Register(), i.InputFloat64Register(0)); |
1004 break; | 1017 break; |
1005 case kArmVrintmF32: | 1018 case kArmVrintmF32: |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1694 padding_size -= v8::internal::Assembler::kInstrSize; | 1707 padding_size -= v8::internal::Assembler::kInstrSize; |
1695 } | 1708 } |
1696 } | 1709 } |
1697 } | 1710 } |
1698 | 1711 |
1699 #undef __ | 1712 #undef __ |
1700 | 1713 |
1701 } // namespace compiler | 1714 } // namespace compiler |
1702 } // namespace internal | 1715 } // namespace internal |
1703 } // namespace v8 | 1716 } // namespace v8 |
OLD | NEW |