| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index c593e65180934b27e19a1bbc714277435c778a09..f5cdbe930834400e8177cdef2a8009ebab0d3f59 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -3645,7 +3645,7 @@ void LCodeGen::DoCallConstantFunction(LCallConstantFunction* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr) {
|
| Register input_reg = ToRegister(instr->value());
|
| __ cmp(FieldOperand(input_reg, HeapObject::kMapOffset),
|
| factory()->heap_number_map());
|
| @@ -3698,7 +3698,7 @@ void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::EmitIntegerMathAbs(LUnaryMathOperation* instr) {
|
| +void LCodeGen::EmitIntegerMathAbs(LMathAbs* instr) {
|
| Register input_reg = ToRegister(instr->value());
|
| __ test(input_reg, Operand(input_reg));
|
| Label is_positive;
|
| @@ -3710,19 +3710,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()));
|
| @@ -3749,7 +3748,7 @@ void LCodeGen::DoMathAbs(LUnaryMathOperation* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathFloor(LMathFloor* instr) {
|
| CpuFeatureScope scope(masm(), SSE2);
|
| XMMRegister xmm_scratch = xmm0;
|
| Register output_reg = ToRegister(instr->result());
|
| @@ -3875,7 +3874,7 @@ void LCodeGen::DoMathRound(LMathRound* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathSqrt(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathSqrt(LMathSqrt* instr) {
|
| CpuFeatureScope scope(masm(), SSE2);
|
| XMMRegister input_reg = ToDoubleRegister(instr->value());
|
| ASSERT(ToDoubleRegister(instr->result()).is(input_reg));
|
| @@ -4028,7 +4027,7 @@ void LCodeGen::DoDeferredRandom(LRandom* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathLog(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathLog(LMathLog* instr) {
|
| CpuFeatureScope scope(masm(), SSE2);
|
| ASSERT(instr->value()->Equals(instr->result()));
|
| XMMRegister input_reg = ToDoubleRegister(instr->value());
|
| @@ -4071,7 +4070,7 @@ void LCodeGen::DoMathExp(LMathExp* instr) {
|
| }
|
|
|
|
|
| -void LCodeGen::DoMathTan(LUnaryMathOperation* instr) {
|
| +void LCodeGen::DoMathTan(LMathTan* instr) {
|
| ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
|
| TranscendentalCacheStub stub(TranscendentalCache::TAN,
|
| TranscendentalCacheStub::UNTAGGED);
|
| @@ -4079,7 +4078,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);
|
| @@ -4087,7 +4086,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);
|
| @@ -4095,36 +4094,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 kMathSqrt:
|
| - DoMathSqrt(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->context()).is(esi));
|
| ASSERT(ToRegister(instr->function()).is(edi));
|
|
|