| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 91ed9678c5b43a45388282e9075ea5f1bb5ca0a0..1bbc1404d37cb7b816b930463cf5686c7436ad7a 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -3368,7 +3368,7 @@ void LCodeGen::DoCallConstantFunction(LCallConstantFunction* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr) {
|
| Register input_reg = ToRegister(instr->value());
|
| __ CompareRoot(FieldOperand(input_reg, HeapObject::kMapOffset),
|
| Heap::kHeapNumberMapRootIndex);
|
| @@ -3420,7 +3420,7 @@ void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::EmitIntegerMathAbs(LUnaryMathOperation* instr) {
|
| +void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) {
|
| Register input_reg = ToRegister(instr->value());
|
| __ testl(input_reg, input_reg);
|
| Label is_positive;
|
| @@ -3431,19 +3431,18 @@ void LCodeGen::EmitIntegerMathAbs(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathAbs(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathAbs(LMathAbs* instr) {
|
| // Class for deferred case.
|
| class DeferredMathAbsTaggedHeapNumber: public LDeferredCode {
|
| public:
|
| - DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen,
|
| - LUnaryMathOperation* instr)
|
| + DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
|
| : LDeferredCode(codegen), instr_(instr) { }
|
| virtual void Generate() {
|
| codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
|
| }
|
| virtual LInstruction* instr() { return instr_; }
|
| private:
|
| - LUnaryMathOperation* instr_;
|
| + LMathAbs* instr_;
|
| };
|
|
|
| ASSERT(instr->value()->Equals(instr->result()));
|
| @@ -3471,7 +3470,7 @@ void LCodeGen::DoMathAbs(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathFloor(LMathFloor* instr) {
|
| XMMRegister xmm_scratch = xmm0;
|
| Register output_reg = ToRegister(instr->result());
|
| XMMRegister input_reg = ToDoubleRegister(instr->value());
|
| @@ -3530,7 +3529,7 @@ void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathRound(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathRound(LMathRound* instr) {
|
| const XMMRegister xmm_scratch = xmm0;
|
| Register output_reg = ToRegister(instr->result());
|
| XMMRegister input_reg = ToDoubleRegister(instr->value());
|
| @@ -3591,14 +3590,14 @@ void LCodeGen::DoMathRound(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathSqrt(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathSqrt(LMathSqrt* instr) {
|
| XMMRegister input_reg = ToDoubleRegister(instr->value());
|
| ASSERT(ToDoubleRegister(instr->result()).is(input_reg));
|
| __ sqrtsd(input_reg, input_reg);
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathPowHalf(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) {
|
| XMMRegister xmm_scratch = xmm0;
|
| XMMRegister input_reg = ToDoubleRegister(instr->value());
|
| ASSERT(ToDoubleRegister(instr->result()).is(input_reg));
|
| @@ -3765,7 +3764,7 @@ void LCodeGen::DoMathExp(LMathExp* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathLog(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathLog(LMathLog* instr) {
|
| ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
|
| TranscendentalCacheStub stub(TranscendentalCache::LOG,
|
| TranscendentalCacheStub::UNTAGGED);
|
| @@ -3773,7 +3772,7 @@ void LCodeGen::DoMathLog(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathTan(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathTan(LMathTan* instr) {
|
| ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
|
| TranscendentalCacheStub stub(TranscendentalCache::TAN,
|
| TranscendentalCacheStub::UNTAGGED);
|
| @@ -3781,7 +3780,7 @@ void LCodeGen::DoMathTan(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathCos(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathCos(LMathCos* instr) {
|
| ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
|
| TranscendentalCacheStub stub(TranscendentalCache::COS,
|
| TranscendentalCacheStub::UNTAGGED);
|
| @@ -3789,7 +3788,7 @@ void LCodeGen::DoMathCos(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathSin(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathSin(LMathSin* instr) {
|
| ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
|
| TranscendentalCacheStub stub(TranscendentalCache::SIN,
|
| TranscendentalCacheStub::UNTAGGED);
|
| @@ -3797,42 +3796,6 @@ void LCodeGen::DoMathSin(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoUnaryMathOperation(LUnaryMathOperation* instr) {
|
| - switch (instr->op()) {
|
| - case kMathAbs:
|
| - DoMathAbs(instr);
|
| - break;
|
| - case kMathFloor:
|
| - DoMathFloor(instr);
|
| - break;
|
| - case kMathRound:
|
| - DoMathRound(instr);
|
| - break;
|
| - case kMathSqrt:
|
| - DoMathSqrt(instr);
|
| - break;
|
| - case kMathPowHalf:
|
| - DoMathPowHalf(instr);
|
| - break;
|
| - case kMathCos:
|
| - DoMathCos(instr);
|
| - break;
|
| - case kMathSin:
|
| - DoMathSin(instr);
|
| - break;
|
| - case kMathTan:
|
| - DoMathTan(instr);
|
| - break;
|
| - case kMathLog:
|
| - DoMathLog(instr);
|
| - break;
|
| -
|
| - default:
|
| - UNREACHABLE();
|
| - }
|
| -}
|
| -
|
| -
|
| void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) {
|
| ASSERT(ToRegister(instr->function()).is(rdi));
|
| ASSERT(instr->HasPointerMap());
|
|
|