OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_POS_INF); | 1212 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_POS_INF); |
1213 break; | 1213 break; |
1214 case kS390_TruncateFloat: | 1214 case kS390_TruncateFloat: |
1215 __ fiebra(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1215 __ fiebra(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
1216 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_0); | 1216 v8::internal::Assembler::FIDBRA_ROUND_TOWARD_0); |
1217 break; | 1217 break; |
1218 // Double operations | 1218 // Double operations |
1219 case kS390_ModDouble: | 1219 case kS390_ModDouble: |
1220 ASSEMBLE_FLOAT_MODULO(); | 1220 ASSEMBLE_FLOAT_MODULO(); |
1221 break; | 1221 break; |
| 1222 case kS390_LogDouble: { |
| 1223 // TODO(bmeurer): We should really get rid of this special instruction, |
| 1224 // and generate a CallAddress instruction instead. |
| 1225 FrameScope scope(masm(), StackFrame::MANUAL); |
| 1226 __ PrepareCallCFunction(0, 1, kScratchReg); |
| 1227 __ MovToFloatParameter(i.InputDoubleRegister(0)); |
| 1228 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), |
| 1229 0, 1); |
| 1230 // Move the result in the double result register. |
| 1231 __ MovFromFloatResult(i.OutputDoubleRegister()); |
| 1232 break; |
| 1233 } |
1222 case kS390_Neg: | 1234 case kS390_Neg: |
1223 __ LoadComplementRR(i.OutputRegister(), i.InputRegister(0)); | 1235 __ LoadComplementRR(i.OutputRegister(), i.InputRegister(0)); |
1224 break; | 1236 break; |
1225 case kS390_MaxDouble: | 1237 case kS390_MaxDouble: |
1226 ASSEMBLE_FLOAT_MAX(kScratchDoubleReg, kScratchReg); | 1238 ASSEMBLE_FLOAT_MAX(kScratchDoubleReg, kScratchReg); |
1227 break; | 1239 break; |
1228 case kS390_MinDouble: | 1240 case kS390_MinDouble: |
1229 ASSEMBLE_FLOAT_MIN(kScratchDoubleReg, kScratchReg); | 1241 ASSEMBLE_FLOAT_MIN(kScratchDoubleReg, kScratchReg); |
1230 break; | 1242 break; |
1231 case kS390_AbsDouble: | 1243 case kS390_AbsDouble: |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2154 padding_size -= 2; | 2166 padding_size -= 2; |
2155 } | 2167 } |
2156 } | 2168 } |
2157 } | 2169 } |
2158 | 2170 |
2159 #undef __ | 2171 #undef __ |
2160 | 2172 |
2161 } // namespace compiler | 2173 } // namespace compiler |
2162 } // namespace internal | 2174 } // namespace internal |
2163 } // namespace v8 | 2175 } // namespace v8 |
OLD | NEW |