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

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

Issue 1029723002: PPC: Serializer: serialize internal references via object visitor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months 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
« no previous file with comments | « src/ppc/assembler-ppc.h ('k') | src/ppc/assembler-ppc-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 } 2296 }
2297 } 2297 }
2298 2298
2299 2299
2300 void Assembler::EmitRelocations() { 2300 void Assembler::EmitRelocations() {
2301 EnsureSpaceFor(relocations_.size() * kMaxRelocSize); 2301 EnsureSpaceFor(relocations_.size() * kMaxRelocSize);
2302 2302
2303 for (std::vector<DeferredRelocInfo>::iterator it = relocations_.begin(); 2303 for (std::vector<DeferredRelocInfo>::iterator it = relocations_.begin();
2304 it != relocations_.end(); it++) { 2304 it != relocations_.end(); it++) {
2305 RelocInfo::Mode rmode = it->rmode(); 2305 RelocInfo::Mode rmode = it->rmode();
2306 RelocInfo rinfo(buffer_ + it->position(), rmode, it->data(), NULL); 2306 Address pc = buffer_ + it->position();
2307 Code* code = NULL;
2308 RelocInfo rinfo(pc, rmode, it->data(), code);
2307 2309
2308 // Fix up internal references now that they are guaranteed to be bound. 2310 // Fix up internal references now that they are guaranteed to be bound.
2309 if (RelocInfo::IsInternalReference(rmode) || 2311 if (RelocInfo::IsInternalReference(rmode)) {
2310 RelocInfo::IsInternalReferenceEncoded(rmode)) { 2312 // Jump table entry
2311 intptr_t pos = 2313 intptr_t pos = reinterpret_cast<intptr_t>(Memory::Address_at(pc));
2312 reinterpret_cast<intptr_t>(rinfo.target_internal_reference()); 2314 Memory::Address_at(pc) = buffer_ + pos;
2313 rinfo.set_target_internal_reference(buffer_ + pos); 2315 } else if (RelocInfo::IsInternalReferenceEncoded(rmode)) {
2316 // mov sequence
2317 intptr_t pos = reinterpret_cast<intptr_t>(target_address_at(pc, code));
2318 set_target_address_at(pc, code, buffer_ + pos, SKIP_ICACHE_FLUSH);
2314 } 2319 }
2315 2320
2316 reloc_info_writer.Write(&rinfo); 2321 reloc_info_writer.Write(&rinfo);
2317 } 2322 }
2318 2323
2319 reloc_info_writer.Finish(); 2324 reloc_info_writer.Finish();
2320 } 2325 }
2321 2326
2322 2327
2323 void Assembler::BlockTrampolinePoolFor(int instructions) { 2328 void Assembler::BlockTrampolinePoolFor(int instructions) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 } 2385 }
2381 2386
2382 2387
2383 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { 2388 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
2384 DCHECK(!FLAG_enable_ool_constant_pool); 2389 DCHECK(!FLAG_enable_ool_constant_pool);
2385 } 2390 }
2386 } 2391 }
2387 } // namespace v8::internal 2392 } // namespace v8::internal
2388 2393
2389 #endif // V8_TARGET_ARCH_PPC 2394 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/assembler-ppc.h ('k') | src/ppc/assembler-ppc-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698