| OLD | NEW |
| 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 | 296 |
| 297 | 297 |
| 298 void Assembler::Align(int m) { | 298 void Assembler::Align(int m) { |
| 299 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m)); | 299 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m)); |
| 300 while ((pc_offset() & (m - 1)) != 0) { | 300 while ((pc_offset() & (m - 1)) != 0) { |
| 301 nop(); | 301 nop(); |
| 302 } | 302 } |
| 303 } | 303 } |
| 304 | 304 |
| 305 | 305 |
| 306 void Assembler::DataAlign(int m) { |
| 307 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 308 while ((pc_offset() & (m - 1)) != 0) { |
| 309 db(0); |
| 310 } |
| 311 } |
| 312 |
| 313 |
| 306 void Assembler::CodeTargetAlign() { | 314 void Assembler::CodeTargetAlign() { |
| 307 // No advantage to aligning branch/call targets to more than | 315 // No advantage to aligning branch/call targets to more than |
| 308 // single instruction, that I am aware of. | 316 // single instruction, that I am aware of. |
| 309 Align(4); | 317 Align(4); |
| 310 } | 318 } |
| 311 | 319 |
| 312 | 320 |
| 313 Register Assembler::GetRtReg(Instr instr) { | 321 Register Assembler::GetRtReg(Instr instr) { |
| 314 Register rt; | 322 Register rt; |
| 315 rt.code_ = (instr & kRtFieldMask) >> kRtShift; | 323 rt.code_ = (instr & kRtFieldMask) >> kRtShift; |
| (...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3121 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 3129 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
| 3122 CpuFeatures::FlushICache(pc, 4 * Assembler::kInstrSize); | 3130 CpuFeatures::FlushICache(pc, 4 * Assembler::kInstrSize); |
| 3123 } | 3131 } |
| 3124 } | 3132 } |
| 3125 | 3133 |
| 3126 | 3134 |
| 3127 } // namespace internal | 3135 } // namespace internal |
| 3128 } // namespace v8 | 3136 } // namespace v8 |
| 3129 | 3137 |
| 3130 #endif // V8_TARGET_ARCH_MIPS64 | 3138 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |