OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 void Assembler::GetCode(CodeDesc* desc) { | 361 void Assembler::GetCode(CodeDesc* desc) { |
362 // Finalize code (at this point overflow() may be true, but the gap ensures | 362 // Finalize code (at this point overflow() may be true, but the gap ensures |
363 // that we are still not overlapping instructions and relocation info). | 363 // that we are still not overlapping instructions and relocation info). |
364 ASSERT(pc_ <= reloc_info_writer.pos()); // No overlap. | 364 ASSERT(pc_ <= reloc_info_writer.pos()); // No overlap. |
365 // Setup code descriptor. | 365 // Setup code descriptor. |
366 desc->buffer = buffer_; | 366 desc->buffer = buffer_; |
367 desc->buffer_size = buffer_size_; | 367 desc->buffer_size = buffer_size_; |
368 desc->instr_size = pc_offset(); | 368 desc->instr_size = pc_offset(); |
369 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); | 369 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); |
370 desc->origin = this; | 370 desc->origin = this; |
371 | |
372 COUNTERS->reloc_info_size()->Increment(desc->reloc_size); | |
373 } | 371 } |
374 | 372 |
375 | 373 |
376 void Assembler::Align(int m) { | 374 void Assembler::Align(int m) { |
377 ASSERT(IsPowerOf2(m)); | 375 ASSERT(IsPowerOf2(m)); |
378 while ((pc_offset() & (m - 1)) != 0) { | 376 while ((pc_offset() & (m - 1)) != 0) { |
379 nop(); | 377 nop(); |
380 } | 378 } |
381 } | 379 } |
382 | 380 |
(...skipping 2410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2793 fprintf(coverage_log, "%s\n", file_line); | 2791 fprintf(coverage_log, "%s\n", file_line); |
2794 fflush(coverage_log); | 2792 fflush(coverage_log); |
2795 } | 2793 } |
2796 } | 2794 } |
2797 | 2795 |
2798 #endif | 2796 #endif |
2799 | 2797 |
2800 } } // namespace v8::internal | 2798 } } // namespace v8::internal |
2801 | 2799 |
2802 #endif // V8_TARGET_ARCH_IA32 | 2800 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |