OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 5062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5073 | 5073 |
5074 if (instr->size()->IsConstantOperand()) { | 5074 if (instr->size()->IsConstantOperand()) { |
5075 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5075 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5076 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 5076 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
5077 } else { | 5077 } else { |
5078 Register size = ToRegister(instr->size()); | 5078 Register size = ToRegister(instr->size()); |
5079 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 5079 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
5080 } | 5080 } |
5081 | 5081 |
5082 __ bind(deferred->exit()); | 5082 __ bind(deferred->exit()); |
| 5083 |
| 5084 if (instr->hydrogen()->MustPrefillWithFiller()) { |
| 5085 if (instr->size()->IsConstantOperand()) { |
| 5086 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 5087 __ movl(temp, Immediate((size / kPointerSize) - 1)); |
| 5088 } else { |
| 5089 temp = ToRegister(instr->size()); |
| 5090 __ sar(temp, Immediate(kPointerSizeLog2)); |
| 5091 __ decl(temp); |
| 5092 } |
| 5093 Label loop; |
| 5094 __ bind(&loop); |
| 5095 __ Move(FieldOperand(result, temp, times_pointer_size, 0), |
| 5096 isolate()->factory()->one_pointer_filler_map()); |
| 5097 __ decl(temp); |
| 5098 __ j(not_zero, &loop); |
| 5099 } |
5083 } | 5100 } |
5084 | 5101 |
5085 | 5102 |
5086 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 5103 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
5087 Register result = ToRegister(instr->result()); | 5104 Register result = ToRegister(instr->result()); |
5088 | 5105 |
5089 // TODO(3095996): Get rid of this. For now, we need to make the | 5106 // TODO(3095996): Get rid of this. For now, we need to make the |
5090 // result register contain a valid pointer because it is already | 5107 // result register contain a valid pointer because it is already |
5091 // contained in the register pointer map. | 5108 // contained in the register pointer map. |
5092 __ Move(result, Smi::FromInt(0)); | 5109 __ Move(result, Smi::FromInt(0)); |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5526 FixedArray::kHeaderSize - kPointerSize)); | 5543 FixedArray::kHeaderSize - kPointerSize)); |
5527 __ bind(&done); | 5544 __ bind(&done); |
5528 } | 5545 } |
5529 | 5546 |
5530 | 5547 |
5531 #undef __ | 5548 #undef __ |
5532 | 5549 |
5533 } } // namespace v8::internal | 5550 } } // namespace v8::internal |
5534 | 5551 |
5535 #endif // V8_TARGET_ARCH_X64 | 5552 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |