| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 2 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 3 // All Rights Reserved. | 3 // All Rights Reserved. |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // - Redistributions of source code must retain the above copyright notice, | 9 // - Redistributions of source code must retain the above copyright notice, |
| 10 // this list of conditions and the following disclaimer. | 10 // this list of conditions and the following disclaimer. |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 // Assembler. | 497 // Assembler. |
| 498 | 498 |
| 499 | 499 |
| 500 void Assembler::CheckBuffer() { | 500 void Assembler::CheckBuffer() { |
| 501 if (buffer_space() <= kGap) { | 501 if (buffer_space() <= kGap) { |
| 502 GrowBuffer(); | 502 GrowBuffer(); |
| 503 } | 503 } |
| 504 } | 504 } |
| 505 | 505 |
| 506 | 506 |
| 507 void Assembler::CheckTrampolinePoolQuick() { | 507 void Assembler::CheckTrampolinePoolQuick(int extra_instructions) { |
| 508 if (pc_offset() >= next_buffer_check_) { | 508 if (pc_offset() >= next_buffer_check_ - extra_instructions * kInstrSize) { |
| 509 CheckTrampolinePool(); | 509 CheckTrampolinePool(); |
| 510 } | 510 } |
| 511 } | 511 } |
| 512 | 512 |
| 513 | 513 |
| 514 void Assembler::emit(Instr x) { | 514 void Assembler::emit(Instr x) { |
| 515 if (!is_buffer_growth_blocked()) { | 515 if (!is_buffer_growth_blocked()) { |
| 516 CheckBuffer(); | 516 CheckBuffer(); |
| 517 } | 517 } |
| 518 *reinterpret_cast<Instr*>(pc_) = x; | 518 *reinterpret_cast<Instr*>(pc_) = x; |
| 519 pc_ += kInstrSize; | 519 pc_ += kInstrSize; |
| 520 CheckTrampolinePoolQuick(); | 520 CheckTrampolinePoolQuick(); |
| 521 } | 521 } |
| 522 | 522 |
| 523 | 523 |
| 524 void Assembler::emit(uint64_t x) { | 524 void Assembler::emit(uint64_t x) { |
| 525 if (!is_buffer_growth_blocked()) { | 525 if (!is_buffer_growth_blocked()) { |
| 526 CheckBuffer(); | 526 CheckBuffer(); |
| 527 } | 527 } |
| 528 *reinterpret_cast<uint64_t*>(pc_) = x; | 528 *reinterpret_cast<uint64_t*>(pc_) = x; |
| 529 pc_ += kInstrSize * 2; | 529 pc_ += kInstrSize * 2; |
| 530 CheckTrampolinePoolQuick(); | 530 CheckTrampolinePoolQuick(); |
| 531 } | 531 } |
| 532 | 532 |
| 533 | 533 |
| 534 } } // namespace v8::internal | 534 } } // namespace v8::internal |
| 535 | 535 |
| 536 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 536 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
| OLD | NEW |