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 5209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5220 __ jmp(&done); | 5220 __ jmp(&done); |
5221 | 5221 |
5222 // smi | 5222 // smi |
5223 __ bind(&is_smi); | 5223 __ bind(&is_smi); |
5224 __ ClampUint8(result_reg, result_reg); | 5224 __ ClampUint8(result_reg, result_reg); |
5225 | 5225 |
5226 __ bind(&done); | 5226 __ bind(&done); |
5227 } | 5227 } |
5228 | 5228 |
5229 | 5229 |
5230 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { | |
5231 DwVfpRegister value_reg = ToDoubleRegister(instr->value()); | |
5232 Register result_reg = ToRegister(instr->result()); | |
5233 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { | |
5234 __ VmovHigh(result_reg, value_reg); | |
5235 } else { | |
5236 __ VmovLow(result_reg, value_reg); | |
5237 } | |
5238 } | |
5239 | |
5240 | |
5241 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { | |
5242 Register hi_reg = ToRegister(instr->hi()); | |
5243 Register lo_reg = ToRegister(instr->lo()); | |
5244 DwVfpRegister result_reg = ToDoubleRegister(instr->result()); | |
5245 __ VmovHigh(result_reg, hi_reg); | |
5246 __ VmovLow(result_reg, lo_reg); | |
5247 } | |
5248 | |
5249 | |
5250 void LCodeGen::DoAllocate(LAllocate* instr) { | 5230 void LCodeGen::DoAllocate(LAllocate* instr) { |
5251 class DeferredAllocate V8_FINAL : public LDeferredCode { | 5231 class DeferredAllocate V8_FINAL : public LDeferredCode { |
5252 public: | 5232 public: |
5253 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5233 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
5254 : LDeferredCode(codegen), instr_(instr) { } | 5234 : LDeferredCode(codegen), instr_(instr) { } |
5255 virtual void Generate() V8_OVERRIDE { | 5235 virtual void Generate() V8_OVERRIDE { |
5256 codegen()->DoDeferredAllocate(instr_); | 5236 codegen()->DoDeferredAllocate(instr_); |
5257 } | 5237 } |
5258 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } | 5238 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } |
5259 private: | 5239 private: |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5773 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5753 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5774 __ ldr(result, FieldMemOperand(scratch, | 5754 __ ldr(result, FieldMemOperand(scratch, |
5775 FixedArray::kHeaderSize - kPointerSize)); | 5755 FixedArray::kHeaderSize - kPointerSize)); |
5776 __ bind(&done); | 5756 __ bind(&done); |
5777 } | 5757 } |
5778 | 5758 |
5779 | 5759 |
5780 #undef __ | 5760 #undef __ |
5781 | 5761 |
5782 } } // namespace v8::internal | 5762 } } // namespace v8::internal |
OLD | NEW |