| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/x64/assembler-x64.h" | 5 #include "src/x64/assembler-x64.h" |
| 6 | 6 |
| 7 #include <cstring> | 7 #include <cstring> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
| 10 | 10 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 | 318 |
| 319 #ifdef GENERATED_CODE_COVERAGE | 319 #ifdef GENERATED_CODE_COVERAGE |
| 320 InitCoverageLog(); | 320 InitCoverageLog(); |
| 321 #endif | 321 #endif |
| 322 } | 322 } |
| 323 | 323 |
| 324 | 324 |
| 325 void Assembler::GetCode(CodeDesc* desc) { | 325 void Assembler::GetCode(CodeDesc* desc) { |
| 326 // Finalize code (at this point overflow() may be true, but the gap ensures | 326 // Finalize code (at this point overflow() may be true, but the gap ensures |
| 327 // that we are still not overlapping instructions and relocation info). | 327 // that we are still not overlapping instructions and relocation info). |
| 328 reloc_info_writer.Finish(); |
| 328 DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap. | 329 DCHECK(pc_ <= reloc_info_writer.pos()); // No overlap. |
| 329 // Set up code descriptor. | 330 // Set up code descriptor. |
| 330 desc->buffer = buffer_; | 331 desc->buffer = buffer_; |
| 331 desc->buffer_size = buffer_size_; | 332 desc->buffer_size = buffer_size_; |
| 332 desc->instr_size = pc_offset(); | 333 desc->instr_size = pc_offset(); |
| 333 DCHECK(desc->instr_size > 0); // Zero-size code objects upset the system. | 334 DCHECK(desc->instr_size > 0); // Zero-size code objects upset the system. |
| 334 desc->reloc_size = | 335 desc->reloc_size = |
| 335 static_cast<int>((buffer_ + buffer_size_) - reloc_info_writer.pos()); | 336 static_cast<int>((buffer_ + buffer_size_) - reloc_info_writer.pos()); |
| 336 desc->origin = this; | 337 desc->origin = this; |
| 337 } | 338 } |
| (...skipping 3086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3424 | 3425 |
| 3425 | 3426 |
| 3426 bool RelocInfo::IsInConstantPool() { | 3427 bool RelocInfo::IsInConstantPool() { |
| 3427 return false; | 3428 return false; |
| 3428 } | 3429 } |
| 3429 | 3430 |
| 3430 | 3431 |
| 3431 } } // namespace v8::internal | 3432 } } // namespace v8::internal |
| 3432 | 3433 |
| 3433 #endif // V8_TARGET_ARCH_X64 | 3434 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |