Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/assembler-ia32.cc

Issue 14888: Code regions (Closed)
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 void Assembler::GetCode(CodeDesc* desc) { 337 void Assembler::GetCode(CodeDesc* desc) {
338 // finalize code 338 // finalize code
339 // (at this point overflow() may be true, but the gap ensures that 339 // (at this point overflow() may be true, but the gap ensures that
340 // we are still not overlapping instructions and relocation info) 340 // we are still not overlapping instructions and relocation info)
341 ASSERT(pc_ <= reloc_info_writer.pos()); // no overlap 341 ASSERT(pc_ <= reloc_info_writer.pos()); // no overlap
342 // setup desc 342 // setup desc
343 desc->buffer = buffer_; 343 desc->buffer = buffer_;
344 desc->buffer_size = buffer_size_; 344 desc->buffer_size = buffer_size_;
345 desc->instr_size = pc_offset(); 345 desc->instr_size = pc_offset();
346 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); 346 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos();
347 desc->origin = this;
347 348
348 Counters::reloc_info_size.Increment(desc->reloc_size); 349 Counters::reloc_info_size.Increment(desc->reloc_size);
349 } 350 }
350 351
351 352
352 void Assembler::Align(int m) { 353 void Assembler::Align(int m) {
353 ASSERT(IsPowerOf2(m)); 354 ASSERT(IsPowerOf2(m));
354 while ((pc_offset() & (m - 1)) != 0) { 355 while ((pc_offset() & (m - 1)) != 0) {
355 nop(); 356 nop();
356 } 357 }
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 ASSERT(bound_label.is_bound()); 2140 ASSERT(bound_label.is_bound());
2140 ASSERT(0 <= position); 2141 ASSERT(0 <= position);
2141 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset()); 2142 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset());
2142 ASSERT(long_at(position) == 0); // only initialize once! 2143 ASSERT(long_at(position) == 0); // only initialize once!
2143 2144
2144 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos())); 2145 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos()));
2145 long_at_put(position, label_loc); 2146 long_at_put(position, label_loc);
2146 } 2147 }
2147 2148
2148 } } // namespace v8::internal 2149 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698