| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 the V8 project authors. All rights reserved. | 
|     2 // Redistribution and use in source and binary forms, with or without |     2 // Redistribution and use in source and binary forms, with or without | 
|     3 // modification, are permitted provided that the following conditions are |     3 // modification, are permitted provided that the following conditions are | 
|     4 // met: |     4 // met: | 
|     5 // |     5 // | 
|     6 //     * Redistributions of source code must retain the above copyright |     6 //     * Redistributions of source code must retain the above copyright | 
|     7 //       notice, this list of conditions and the following disclaimer. |     7 //       notice, this list of conditions and the following disclaimer. | 
|     8 //     * Redistributions in binary form must reproduce the above |     8 //     * Redistributions in binary form must reproduce the above | 
|     9 //       copyright notice, this list of conditions and the following |     9 //       copyright notice, this list of conditions and the following | 
|    10 //       disclaimer in the documentation and/or other materials provided |    10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 3634 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3645     virtual LInstruction* instr() { return instr_; } |  3645     virtual LInstruction* instr() { return instr_; } | 
|  3646    private: |  3646    private: | 
|  3647     LMathAbs* instr_; |  3647     LMathAbs* instr_; | 
|  3648   }; |  3648   }; | 
|  3649  |  3649  | 
|  3650   Representation r = instr->hydrogen()->value()->representation(); |  3650   Representation r = instr->hydrogen()->value()->representation(); | 
|  3651   if (r.IsDouble()) { |  3651   if (r.IsDouble()) { | 
|  3652     FPURegister input = ToDoubleRegister(instr->value()); |  3652     FPURegister input = ToDoubleRegister(instr->value()); | 
|  3653     FPURegister result = ToDoubleRegister(instr->result()); |  3653     FPURegister result = ToDoubleRegister(instr->result()); | 
|  3654     __ abs_d(result, input); |  3654     __ abs_d(result, input); | 
|  3655   } else if (r.IsInteger32()) { |  3655   } else if (r.IsSmiOrInteger32()) { | 
|  3656     EmitIntegerMathAbs(instr); |  3656     EmitIntegerMathAbs(instr); | 
|  3657   } else { |  3657   } else { | 
|  3658     // Representation is tagged. |  3658     // Representation is tagged. | 
|  3659     DeferredMathAbsTaggedHeapNumber* deferred = |  3659     DeferredMathAbsTaggedHeapNumber* deferred = | 
|  3660         new(zone()) DeferredMathAbsTaggedHeapNumber(this, instr); |  3660         new(zone()) DeferredMathAbsTaggedHeapNumber(this, instr); | 
|  3661     Register input = ToRegister(instr->value()); |  3661     Register input = ToRegister(instr->value()); | 
|  3662     // Smi check. |  3662     // Smi check. | 
|  3663     __ JumpIfNotSmi(input, deferred->entry()); |  3663     __ JumpIfNotSmi(input, deferred->entry()); | 
|  3664     // If smi, handle it directly. |  3664     // If smi, handle it directly. | 
|  3665     EmitIntegerMathAbs(instr); |  3665     EmitIntegerMathAbs(instr); | 
| (...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5842   __ Subu(scratch, result, scratch); |  5842   __ Subu(scratch, result, scratch); | 
|  5843   __ lw(result, FieldMemOperand(scratch, |  5843   __ lw(result, FieldMemOperand(scratch, | 
|  5844                                 FixedArray::kHeaderSize - kPointerSize)); |  5844                                 FixedArray::kHeaderSize - kPointerSize)); | 
|  5845   __ bind(&done); |  5845   __ bind(&done); | 
|  5846 } |  5846 } | 
|  5847  |  5847  | 
|  5848  |  5848  | 
|  5849 #undef __ |  5849 #undef __ | 
|  5850  |  5850  | 
|  5851 } }  // namespace v8::internal |  5851 } }  // namespace v8::internal | 
| OLD | NEW |