| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 | 319 |
| 320 | 320 |
| 321 void Assembler::Align(int m) { | 321 void Assembler::Align(int m) { |
| 322 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m)); | 322 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m)); |
| 323 while ((pc_offset() & (m - 1)) != 0) { | 323 while ((pc_offset() & (m - 1)) != 0) { |
| 324 nop(); | 324 nop(); |
| 325 } | 325 } |
| 326 } | 326 } |
| 327 | 327 |
| 328 | 328 |
| 329 void Assembler::DataAlign(int m) { |
| 330 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 331 while ((pc_offset() & (m - 1)) != 0) { |
| 332 db(0); |
| 333 } |
| 334 } |
| 335 |
| 336 |
| 329 void Assembler::CodeTargetAlign() { | 337 void Assembler::CodeTargetAlign() { |
| 330 // No advantage to aligning branch/call targets to more than | 338 // No advantage to aligning branch/call targets to more than |
| 331 // single instruction, that I am aware of. | 339 // single instruction, that I am aware of. |
| 332 Align(4); | 340 Align(4); |
| 333 } | 341 } |
| 334 | 342 |
| 335 | 343 |
| 336 Register Assembler::GetRtReg(Instr instr) { | 344 Register Assembler::GetRtReg(Instr instr) { |
| 337 Register rt; | 345 Register rt; |
| 338 rt.code_ = (instr & kRtFieldMask) >> kRtShift; | 346 rt.code_ = (instr & kRtFieldMask) >> kRtShift; |
| (...skipping 2690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3029 if (patched) { | 3037 if (patched) { |
| 3030 CpuFeatures::FlushICache(pc + 2, sizeof(Address)); | 3038 CpuFeatures::FlushICache(pc + 2, sizeof(Address)); |
| 3031 } | 3039 } |
| 3032 } | 3040 } |
| 3033 | 3041 |
| 3034 | 3042 |
| 3035 } // namespace internal | 3043 } // namespace internal |
| 3036 } // namespace v8 | 3044 } // namespace v8 |
| 3037 | 3045 |
| 3038 #endif // V8_TARGET_ARCH_MIPS | 3046 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |