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

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

Issue 519283005: MIPS: First step to cleanup the power-of-2 mess. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/regexp-macro-assembler-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 // Set up code descriptor. 311 // Set up code descriptor.
312 desc->buffer = buffer_; 312 desc->buffer = buffer_;
313 desc->buffer_size = buffer_size_; 313 desc->buffer_size = buffer_size_;
314 desc->instr_size = pc_offset(); 314 desc->instr_size = pc_offset();
315 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); 315 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos();
316 desc->origin = this; 316 desc->origin = this;
317 } 317 }
318 318
319 319
320 void Assembler::Align(int m) { 320 void Assembler::Align(int m) {
321 DCHECK(m >= 4 && IsPowerOf2(m)); 321 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m));
322 while ((pc_offset() & (m - 1)) != 0) { 322 while ((pc_offset() & (m - 1)) != 0) {
323 nop(); 323 nop();
324 } 324 }
325 } 325 }
326 326
327 327
328 void Assembler::CodeTargetAlign() { 328 void Assembler::CodeTargetAlign() {
329 // No advantage to aligning branch/call targets to more than 329 // No advantage to aligning branch/call targets to more than
330 // single instruction, that I am aware of. 330 // single instruction, that I am aware of.
331 Align(4); 331 Align(4);
(...skipping 2592 matching lines...) Expand 10 before | Expand all | Expand 10 after
2924 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { 2924 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
2925 // No out-of-line constant pool support. 2925 // No out-of-line constant pool support.
2926 DCHECK(!FLAG_enable_ool_constant_pool); 2926 DCHECK(!FLAG_enable_ool_constant_pool);
2927 return; 2927 return;
2928 } 2928 }
2929 2929
2930 2930
2931 } } // namespace v8::internal 2931 } } // namespace v8::internal
2932 2932
2933 #endif // V8_TARGET_ARCH_MIPS64 2933 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/regexp-macro-assembler-mips.cc ('k') | src/mips64/code-stubs-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698