| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 5165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5176 __ ClampDoubleToUint8(result_reg, double_scratch0(), temp_reg); | 5176 __ ClampDoubleToUint8(result_reg, double_scratch0(), temp_reg); |
| 5177 __ jmp(&done); | 5177 __ jmp(&done); |
| 5178 | 5178 |
| 5179 __ bind(&is_smi); | 5179 __ bind(&is_smi); |
| 5180 __ ClampUint8(result_reg, scratch); | 5180 __ ClampUint8(result_reg, scratch); |
| 5181 | 5181 |
| 5182 __ bind(&done); | 5182 __ bind(&done); |
| 5183 } | 5183 } |
| 5184 | 5184 |
| 5185 | 5185 |
| 5186 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { |
| 5187 DoubleRegister value_reg = ToDoubleRegister(instr->value()); |
| 5188 Register result_reg = ToRegister(instr->result()); |
| 5189 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { |
| 5190 __ FmoveHigh(result_reg, value_reg); |
| 5191 } else { |
| 5192 __ FmoveLow(result_reg, value_reg); |
| 5193 } |
| 5194 } |
| 5195 |
| 5196 |
| 5197 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { |
| 5198 Register hi_reg = ToRegister(instr->hi()); |
| 5199 Register lo_reg = ToRegister(instr->lo()); |
| 5200 DoubleRegister result_reg = ToDoubleRegister(instr->result()); |
| 5201 __ Move(result_reg, lo_reg, hi_reg); |
| 5202 } |
| 5203 |
| 5204 |
| 5186 void LCodeGen::DoAllocate(LAllocate* instr) { | 5205 void LCodeGen::DoAllocate(LAllocate* instr) { |
| 5187 class DeferredAllocate V8_FINAL : public LDeferredCode { | 5206 class DeferredAllocate V8_FINAL : public LDeferredCode { |
| 5188 public: | 5207 public: |
| 5189 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5208 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
| 5190 : LDeferredCode(codegen), instr_(instr) { } | 5209 : LDeferredCode(codegen), instr_(instr) { } |
| 5191 virtual void Generate() V8_OVERRIDE { | 5210 virtual void Generate() V8_OVERRIDE { |
| 5192 codegen()->DoDeferredAllocate(instr_); | 5211 codegen()->DoDeferredAllocate(instr_); |
| 5193 } | 5212 } |
| 5194 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } | 5213 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } |
| 5195 private: | 5214 private: |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5752 __ Subu(scratch, result, scratch); | 5771 __ Subu(scratch, result, scratch); |
| 5753 __ lw(result, FieldMemOperand(scratch, | 5772 __ lw(result, FieldMemOperand(scratch, |
| 5754 FixedArray::kHeaderSize - kPointerSize)); | 5773 FixedArray::kHeaderSize - kPointerSize)); |
| 5755 __ bind(&done); | 5774 __ bind(&done); |
| 5756 } | 5775 } |
| 5757 | 5776 |
| 5758 | 5777 |
| 5759 #undef __ | 5778 #undef __ |
| 5760 | 5779 |
| 5761 } } // namespace v8::internal | 5780 } } // namespace v8::internal |
| OLD | NEW |