| 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 4690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4701 virtual void Generate() V8_OVERRIDE { | 4701 virtual void Generate() V8_OVERRIDE { |
| 4702 codegen()->DoDeferredNumberTagI(instr_, | 4702 codegen()->DoDeferredNumberTagI(instr_, |
| 4703 instr_->value(), | 4703 instr_->value(), |
| 4704 UNSIGNED_INT32); | 4704 UNSIGNED_INT32); |
| 4705 } | 4705 } |
| 4706 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } | 4706 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } |
| 4707 private: | 4707 private: |
| 4708 LNumberTagU* instr_; | 4708 LNumberTagU* instr_; |
| 4709 }; | 4709 }; |
| 4710 | 4710 |
| 4711 LOperand* input = instr->value(); | 4711 Register input = ToRegister(instr->value()); |
| 4712 ASSERT(input->IsRegister() && input->Equals(instr->result())); | 4712 Register result = ToRegister(instr->result()); |
| 4713 Register reg = ToRegister(input); | |
| 4714 | 4713 |
| 4715 DeferredNumberTagU* deferred = new(zone()) DeferredNumberTagU(this, instr); | 4714 DeferredNumberTagU* deferred = new(zone()) DeferredNumberTagU(this, instr); |
| 4716 __ Branch(deferred->entry(), hi, reg, Operand(Smi::kMaxValue)); | 4715 __ Branch(deferred->entry(), hi, input, Operand(Smi::kMaxValue)); |
| 4717 __ SmiTag(reg, reg); | 4716 __ SmiTag(result, input); |
| 4718 __ bind(deferred->exit()); | 4717 __ bind(deferred->exit()); |
| 4719 } | 4718 } |
| 4720 | 4719 |
| 4721 | 4720 |
| 4722 void LCodeGen::DoDeferredNumberTagI(LInstruction* instr, | 4721 void LCodeGen::DoDeferredNumberTagI(LInstruction* instr, |
| 4723 LOperand* value, | 4722 LOperand* value, |
| 4724 IntegerSignedness signedness) { | 4723 IntegerSignedness signedness) { |
| 4725 Label slow; | 4724 Label slow; |
| 4726 Register src = ToRegister(value); | 4725 Register src = ToRegister(value); |
| 4727 Register dst = ToRegister(instr->result()); | 4726 Register dst = ToRegister(instr->result()); |
| (...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5870 __ Subu(scratch, result, scratch); | 5869 __ Subu(scratch, result, scratch); |
| 5871 __ lw(result, FieldMemOperand(scratch, | 5870 __ lw(result, FieldMemOperand(scratch, |
| 5872 FixedArray::kHeaderSize - kPointerSize)); | 5871 FixedArray::kHeaderSize - kPointerSize)); |
| 5873 __ bind(&done); | 5872 __ bind(&done); |
| 5874 } | 5873 } |
| 5875 | 5874 |
| 5876 | 5875 |
| 5877 #undef __ | 5876 #undef __ |
| 5878 | 5877 |
| 5879 } } // namespace v8::internal | 5878 } } // namespace v8::internal |
| OLD | NEW |