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/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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 FrameScope scope(masm(), StackFrame::MANUAL); \ | 429 FrameScope scope(masm(), StackFrame::MANUAL); \ |
430 __ PrepareCallCFunction(0, 2, kScratchReg); \ | 430 __ PrepareCallCFunction(0, 2, kScratchReg); \ |
431 __ MovToFloatParameters(i.InputDoubleRegister(0), \ | 431 __ MovToFloatParameters(i.InputDoubleRegister(0), \ |
432 i.InputDoubleRegister(1)); \ | 432 i.InputDoubleRegister(1)); \ |
433 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), \ | 433 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), \ |
434 0, 2); \ | 434 0, 2); \ |
435 __ MovFromFloatResult(i.OutputDoubleRegister()); \ | 435 __ MovFromFloatResult(i.OutputDoubleRegister()); \ |
436 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ | 436 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ |
437 } while (0) | 437 } while (0) |
438 | 438 |
439 | 439 #define ASSEMBLE_FLOAT_LOG() \ |
440 #define ASSEMBLE_FLOAT_LOG() \ | 440 do { \ |
441 do { \ | 441 FrameScope scope(masm(), StackFrame::MANUAL); \ |
442 FrameScope scope(masm(), StackFrame::MANUAL); \ | 442 __ PrepareCallCFunction(0, 1, kScratchReg); \ |
443 __ PrepareCallCFunction(0, 1, kScratchReg); \ | 443 __ MovToFloatParameter(i.InputDoubleRegister(0)); \ |
444 __ MovToFloatParameter(i.InputDoubleRegister(0)); \ | 444 __ CallCFunction(ExternalReference::ieee754_log_function(isolate()), 0, \ |
445 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), \ | 445 1); \ |
446 0, 1); \ | 446 __ MovFromFloatResult(i.OutputDoubleRegister()); \ |
447 __ MovFromFloatResult(i.OutputDoubleRegister()); \ | 447 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ |
448 DCHECK_EQ(LeaveRC, i.OutputRCBit()); \ | |
449 } while (0) | 448 } while (0) |
450 | 449 |
451 #define ASSEMBLE_FLOAT_MAX(scratch_reg) \ | 450 #define ASSEMBLE_FLOAT_MAX(scratch_reg) \ |
452 do { \ | 451 do { \ |
453 __ fsub(scratch_reg, i.InputDoubleRegister(0), i.InputDoubleRegister(1)); \ | 452 __ fsub(scratch_reg, i.InputDoubleRegister(0), i.InputDoubleRegister(1)); \ |
454 __ fsel(i.OutputDoubleRegister(), scratch_reg, i.InputDoubleRegister(0), \ | 453 __ fsel(i.OutputDoubleRegister(), scratch_reg, i.InputDoubleRegister(0), \ |
455 i.InputDoubleRegister(1)); \ | 454 i.InputDoubleRegister(1)); \ |
456 } while (0) | 455 } while (0) |
457 | 456 |
458 | 457 |
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2160 padding_size -= v8::internal::Assembler::kInstrSize; | 2159 padding_size -= v8::internal::Assembler::kInstrSize; |
2161 } | 2160 } |
2162 } | 2161 } |
2163 } | 2162 } |
2164 | 2163 |
2165 #undef __ | 2164 #undef __ |
2166 | 2165 |
2167 } // namespace compiler | 2166 } // namespace compiler |
2168 } // namespace internal | 2167 } // namespace internal |
2169 } // namespace v8 | 2168 } // namespace v8 |
OLD | NEW |