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 | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are 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 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 ASSERT(rinfo.rmode() != RelocInfo::COMMENT && | 2488 ASSERT(rinfo.rmode() != RelocInfo::COMMENT && |
2489 rinfo.rmode() != RelocInfo::POSITION); | 2489 rinfo.rmode() != RelocInfo::POSITION); |
2490 if (rinfo.rmode() != RelocInfo::JS_RETURN) { | 2490 if (rinfo.rmode() != RelocInfo::JS_RETURN) { |
2491 rinfo.set_pc(rinfo.pc() + pc_delta); | 2491 rinfo.set_pc(rinfo.pc() + pc_delta); |
2492 } | 2492 } |
2493 } | 2493 } |
2494 } | 2494 } |
2495 | 2495 |
2496 | 2496 |
2497 void Assembler::db(uint8_t data) { | 2497 void Assembler::db(uint8_t data) { |
| 2498 // No relocation info should be pending while using db. db is used |
| 2499 // to write pure data with no pointers and the constant pool should |
| 2500 // be emitted before using db. |
| 2501 ASSERT(num_prinfo_ == 0); |
2498 CheckBuffer(); | 2502 CheckBuffer(); |
2499 *reinterpret_cast<uint8_t*>(pc_) = data; | 2503 *reinterpret_cast<uint8_t*>(pc_) = data; |
2500 pc_ += sizeof(uint8_t); | 2504 pc_ += sizeof(uint8_t); |
2501 } | 2505 } |
2502 | 2506 |
2503 | 2507 |
2504 void Assembler::dd(uint32_t data) { | 2508 void Assembler::dd(uint32_t data) { |
| 2509 // No relocation info should be pending while using dd. dd is used |
| 2510 // to write pure data with no pointers and the constant pool should |
| 2511 // be emitted before using dd. |
| 2512 ASSERT(num_prinfo_ == 0); |
2505 CheckBuffer(); | 2513 CheckBuffer(); |
2506 *reinterpret_cast<uint32_t*>(pc_) = data; | 2514 *reinterpret_cast<uint32_t*>(pc_) = data; |
2507 pc_ += sizeof(uint32_t); | 2515 pc_ += sizeof(uint32_t); |
2508 } | 2516 } |
2509 | 2517 |
2510 | 2518 |
2511 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { | 2519 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
2512 RelocInfo rinfo(pc_, rmode, data); // we do not try to reuse pool constants | 2520 RelocInfo rinfo(pc_, rmode, data); // we do not try to reuse pool constants |
2513 if (rmode >= RelocInfo::JS_RETURN && rmode <= RelocInfo::DEBUG_BREAK_SLOT) { | 2521 if (rmode >= RelocInfo::JS_RETURN && rmode <= RelocInfo::DEBUG_BREAK_SLOT) { |
2514 // Adjust code for new modes. | 2522 // Adjust code for new modes. |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2646 | 2654 |
2647 // Since a constant pool was just emitted, move the check offset forward by | 2655 // Since a constant pool was just emitted, move the check offset forward by |
2648 // the standard interval. | 2656 // the standard interval. |
2649 next_buffer_check_ = pc_offset() + kCheckConstInterval; | 2657 next_buffer_check_ = pc_offset() + kCheckConstInterval; |
2650 } | 2658 } |
2651 | 2659 |
2652 | 2660 |
2653 } } // namespace v8::internal | 2661 } } // namespace v8::internal |
2654 | 2662 |
2655 #endif // V8_TARGET_ARCH_ARM | 2663 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |