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/mips/assembler-mips.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 | « no previous file | src/mips/code-stubs-mips.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 19 matching lines...) Expand all
30 30
31 // The original source code covered by the above license above has been 31 // The original source code covered by the above license above has been
32 // modified significantly by Google Inc. 32 // modified significantly by Google Inc.
33 // Copyright 2012 the V8 project authors. All rights reserved. 33 // Copyright 2012 the V8 project authors. All rights reserved.
34 34
35 35
36 #include "src/v8.h" 36 #include "src/v8.h"
37 37
38 #if V8_TARGET_ARCH_MIPS 38 #if V8_TARGET_ARCH_MIPS
39 39
40 #include "src/base/bits.h"
40 #include "src/base/cpu.h" 41 #include "src/base/cpu.h"
41 #include "src/mips/assembler-mips-inl.h" 42 #include "src/mips/assembler-mips-inl.h"
42 #include "src/serialize.h" 43 #include "src/serialize.h"
43 44
44 namespace v8 { 45 namespace v8 {
45 namespace internal { 46 namespace internal {
46 47
47 // Get the CPU features enabled by the build. For cross compilation the 48 // Get the CPU features enabled by the build. For cross compilation the
48 // preprocessor symbols CAN_USE_FPU_INSTRUCTIONS 49 // preprocessor symbols CAN_USE_FPU_INSTRUCTIONS
49 // can be defined to enable FPU instructions when building the 50 // can be defined to enable FPU instructions when building the
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // Set up code descriptor. 333 // Set up code descriptor.
333 desc->buffer = buffer_; 334 desc->buffer = buffer_;
334 desc->buffer_size = buffer_size_; 335 desc->buffer_size = buffer_size_;
335 desc->instr_size = pc_offset(); 336 desc->instr_size = pc_offset();
336 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos(); 337 desc->reloc_size = (buffer_ + buffer_size_) - reloc_info_writer.pos();
337 desc->origin = this; 338 desc->origin = this;
338 } 339 }
339 340
340 341
341 void Assembler::Align(int m) { 342 void Assembler::Align(int m) {
342 DCHECK(m >= 4 && IsPowerOf2(m)); 343 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m));
343 while ((pc_offset() & (m - 1)) != 0) { 344 while ((pc_offset() & (m - 1)) != 0) {
344 nop(); 345 nop();
345 } 346 }
346 } 347 }
347 348
348 349
349 void Assembler::CodeTargetAlign() { 350 void Assembler::CodeTargetAlign() {
350 // No advantage to aligning branch/call targets to more than 351 // No advantage to aligning branch/call targets to more than
351 // single instruction, that I am aware of. 352 // single instruction, that I am aware of.
352 Align(4); 353 Align(4);
(...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after
2738 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) { 2739 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
2739 // No out-of-line constant pool support. 2740 // No out-of-line constant pool support.
2740 DCHECK(!FLAG_enable_ool_constant_pool); 2741 DCHECK(!FLAG_enable_ool_constant_pool);
2741 return; 2742 return;
2742 } 2743 }
2743 2744
2744 2745
2745 } } // namespace v8::internal 2746 } } // namespace v8::internal
2746 2747
2747 #endif // V8_TARGET_ARCH_MIPS 2748 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698