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

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

Issue 1155673005: Fix issues with Arm's use of embedded constant pools (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move DataAlign implementation to common code Created 5 years, 6 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 desc->buffer_size = buffer_size_; 237 desc->buffer_size = buffer_size_;
238 desc->instr_size = pc_offset(); 238 desc->instr_size = pc_offset();
239 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); 239 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos();
240 desc->constant_pool_size = 240 desc->constant_pool_size =
241 (constant_pool_offset ? desc->instr_size - constant_pool_offset : 0); 241 (constant_pool_offset ? desc->instr_size - constant_pool_offset : 0);
242 desc->origin = this; 242 desc->origin = this;
243 } 243 }
244 244
245 245
246 void Assembler::Align(int m) { 246 void Assembler::Align(int m) {
247 #if V8_TARGET_ARCH_PPC64
248 DCHECK(m >= 4 && base::bits::IsPowerOfTwo64(m));
249 #else
250 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m)); 247 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m));
251 #endif 248 DCHECK((pc_offset() & (kInstrSize - 1)) == 0);
252 // First ensure instruction alignment 249 while ((pc_offset() & (m - 1)) != 0) {
253 while (pc_offset() & (kInstrSize - 1)) {
254 db(0);
255 }
256 // Then pad to requested alignedment with nops
257 while (pc_offset() & (m - 1)) {
258 nop(); 250 nop();
259 } 251 }
260 } 252 }
261 253
262 254
263 void Assembler::CodeTargetAlign() { Align(8); } 255 void Assembler::CodeTargetAlign() { Align(8); }
264 256
265 257
266 Condition Assembler::GetCondition(Instr instr) { 258 Condition Assembler::GetCondition(Instr instr) {
267 switch (instr & kCondMask) { 259 switch (instr & kCondMask) {
(...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2443 pc_offset() + kMaxCondBranchReach - kMaxBlockTrampolineSectionSize; 2435 pc_offset() + kMaxCondBranchReach - kMaxBlockTrampolineSectionSize;
2444 } 2436 }
2445 return; 2437 return;
2446 } 2438 }
2447 2439
2448 2440
2449 } // namespace internal 2441 } // namespace internal
2450 } // namespace v8 2442 } // namespace v8
2451 2443
2452 #endif // V8_TARGET_ARCH_PPC 2444 #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