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 5178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5189 __ jmp(&done); | 5189 __ jmp(&done); |
5190 | 5190 |
5191 // smi | 5191 // smi |
5192 __ bind(&is_smi); | 5192 __ bind(&is_smi); |
5193 __ ClampUint8(result_reg, result_reg); | 5193 __ ClampUint8(result_reg, result_reg); |
5194 | 5194 |
5195 __ bind(&done); | 5195 __ bind(&done); |
5196 } | 5196 } |
5197 | 5197 |
5198 | 5198 |
| 5199 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { |
| 5200 DwVfpRegister value_reg = ToDoubleRegister(instr->value()); |
| 5201 Register result_reg = ToRegister(instr->result()); |
| 5202 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { |
| 5203 __ VmovHigh(result_reg, value_reg); |
| 5204 } else { |
| 5205 __ VmovLow(result_reg, value_reg); |
| 5206 } |
| 5207 } |
| 5208 |
| 5209 |
| 5210 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { |
| 5211 Register hi_reg = ToRegister(instr->hi()); |
| 5212 Register lo_reg = ToRegister(instr->lo()); |
| 5213 DwVfpRegister result_reg = ToDoubleRegister(instr->result()); |
| 5214 __ VmovHigh(result_reg, hi_reg); |
| 5215 __ VmovLow(result_reg, lo_reg); |
| 5216 } |
| 5217 |
| 5218 |
5199 void LCodeGen::DoAllocate(LAllocate* instr) { | 5219 void LCodeGen::DoAllocate(LAllocate* instr) { |
5200 class DeferredAllocate V8_FINAL : public LDeferredCode { | 5220 class DeferredAllocate V8_FINAL : public LDeferredCode { |
5201 public: | 5221 public: |
5202 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) | 5222 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) |
5203 : LDeferredCode(codegen), instr_(instr) { } | 5223 : LDeferredCode(codegen), instr_(instr) { } |
5204 virtual void Generate() V8_OVERRIDE { | 5224 virtual void Generate() V8_OVERRIDE { |
5205 codegen()->DoDeferredAllocate(instr_); | 5225 codegen()->DoDeferredAllocate(instr_); |
5206 } | 5226 } |
5207 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } | 5227 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } |
5208 private: | 5228 private: |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5722 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5742 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5723 __ ldr(result, FieldMemOperand(scratch, | 5743 __ ldr(result, FieldMemOperand(scratch, |
5724 FixedArray::kHeaderSize - kPointerSize)); | 5744 FixedArray::kHeaderSize - kPointerSize)); |
5725 __ bind(&done); | 5745 __ bind(&done); |
5726 } | 5746 } |
5727 | 5747 |
5728 | 5748 |
5729 #undef __ | 5749 #undef __ |
5730 | 5750 |
5731 } } // namespace v8::internal | 5751 } } // namespace v8::internal |
OLD | NEW |