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 6033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6044 | 6044 |
6045 if (instr->size()->IsConstantOperand()) { | 6045 if (instr->size()->IsConstantOperand()) { |
6046 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 6046 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
6047 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 6047 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
6048 } else { | 6048 } else { |
6049 Register size = ToRegister(instr->size()); | 6049 Register size = ToRegister(instr->size()); |
6050 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 6050 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
6051 } | 6051 } |
6052 | 6052 |
6053 __ bind(deferred->exit()); | 6053 __ bind(deferred->exit()); |
| 6054 |
| 6055 if (instr->hydrogen()->MustPrefillWithFiller()) { |
| 6056 if (instr->size()->IsConstantOperand()) { |
| 6057 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 6058 __ mov(temp, (size / kPointerSize) - 1); |
| 6059 } else { |
| 6060 temp = ToRegister(instr->size()); |
| 6061 __ shr(temp, kPointerSizeLog2); |
| 6062 __ dec(temp); |
| 6063 } |
| 6064 Label loop; |
| 6065 __ bind(&loop); |
| 6066 __ mov(FieldOperand(result, temp, times_pointer_size, 0), |
| 6067 isolate()->factory()->one_pointer_filler_map()); |
| 6068 __ dec(temp); |
| 6069 __ j(not_zero, &loop); |
| 6070 } |
6054 } | 6071 } |
6055 | 6072 |
6056 | 6073 |
6057 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 6074 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
6058 Register result = ToRegister(instr->result()); | 6075 Register result = ToRegister(instr->result()); |
6059 | 6076 |
6060 // TODO(3095996): Get rid of this. For now, we need to make the | 6077 // TODO(3095996): Get rid of this. For now, we need to make the |
6061 // result register contain a valid pointer because it is already | 6078 // result register contain a valid pointer because it is already |
6062 // contained in the register pointer map. | 6079 // contained in the register pointer map. |
6063 __ mov(result, Immediate(Smi::FromInt(0))); | 6080 __ mov(result, Immediate(Smi::FromInt(0))); |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6489 FixedArray::kHeaderSize - kPointerSize)); | 6506 FixedArray::kHeaderSize - kPointerSize)); |
6490 __ bind(&done); | 6507 __ bind(&done); |
6491 } | 6508 } |
6492 | 6509 |
6493 | 6510 |
6494 #undef __ | 6511 #undef __ |
6495 | 6512 |
6496 } } // namespace v8::internal | 6513 } } // namespace v8::internal |
6497 | 6514 |
6498 #endif // V8_TARGET_ARCH_IA32 | 6515 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |