| 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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 | 778 |
| 779 // Returns the branch offset to the given label from the current code position | 779 // Returns the branch offset to the given label from the current code position |
| 780 // Links the label to the current position if it is still unbound | 780 // Links the label to the current position if it is still unbound |
| 781 // Manages the jump elimination optimization if the second parameter is true. | 781 // Manages the jump elimination optimization if the second parameter is true. |
| 782 int branch_offset(Label* L, bool jump_elimination_allowed); | 782 int branch_offset(Label* L, bool jump_elimination_allowed); |
| 783 | 783 |
| 784 // Return the address in the constant pool of the code target address used by | 784 // Return the address in the constant pool of the code target address used by |
| 785 // the branch/call instruction at pc, or the object in a mov. | 785 // the branch/call instruction at pc, or the object in a mov. |
| 786 INLINE(static Address target_pointer_address_at(Address pc)); | 786 INLINE(static Address target_pointer_address_at(Address pc)); |
| 787 | 787 |
| 788 // Read/Modify the pointer in the branch/call/move instruction at pc. | |
| 789 INLINE(static Address target_pointer_at(Address pc)); | |
| 790 INLINE(static void set_target_pointer_at(Address pc, Address target)); | |
| 791 | |
| 792 // Read/Modify the code target address in the branch/call instruction at pc. | 788 // Read/Modify the code target address in the branch/call instruction at pc. |
| 793 INLINE(static Address target_address_at(Address pc)); | 789 INLINE(static Address target_address_at(Address pc)); |
| 794 INLINE(static void set_target_address_at(Address pc, Address target)); | 790 INLINE(static void set_target_address_at(Address pc, Address target)); |
| 795 | 791 |
| 796 // Return the code target address at a call site from the return address | 792 // Return the code target address at a call site from the return address |
| 797 // of that call in the instruction stream. | 793 // of that call in the instruction stream. |
| 798 INLINE(static Address target_address_from_return_address(Address pc)); | 794 INLINE(static Address target_address_from_return_address(Address pc)); |
| 799 | 795 |
| 800 // Given the address of the beginning of a call, return the address | 796 // Given the address of the beginning of a call, return the address |
| 801 // in the instruction stream that the call will return from. | 797 // in the instruction stream that the call will return from. |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 // the marker and branch over the data. | 1382 // the marker and branch over the data. |
| 1387 void RecordConstPool(int size); | 1383 void RecordConstPool(int size); |
| 1388 | 1384 |
| 1389 // Writes a single byte or word of data in the code stream. Used | 1385 // Writes a single byte or word of data in the code stream. Used |
| 1390 // for inline tables, e.g., jump-tables. The constant pool should be | 1386 // for inline tables, e.g., jump-tables. The constant pool should be |
| 1391 // emitted before any use of db and dd to ensure that constant pools | 1387 // emitted before any use of db and dd to ensure that constant pools |
| 1392 // are not emitted as part of the tables generated. | 1388 // are not emitted as part of the tables generated. |
| 1393 void db(uint8_t data); | 1389 void db(uint8_t data); |
| 1394 void dd(uint32_t data); | 1390 void dd(uint32_t data); |
| 1395 | 1391 |
| 1392 // Emits the address of the code stub's first instruction. |
| 1393 void emit_code_stub_address(Code* stub); |
| 1394 |
| 1396 PositionsRecorder* positions_recorder() { return &positions_recorder_; } | 1395 PositionsRecorder* positions_recorder() { return &positions_recorder_; } |
| 1397 | 1396 |
| 1398 // Read/patch instructions | 1397 // Read/patch instructions |
| 1399 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } | 1398 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } |
| 1400 void instr_at_put(int pos, Instr instr) { | 1399 void instr_at_put(int pos, Instr instr) { |
| 1401 *reinterpret_cast<Instr*>(buffer_ + pos) = instr; | 1400 *reinterpret_cast<Instr*>(buffer_ + pos) = instr; |
| 1402 } | 1401 } |
| 1403 static Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } | 1402 static Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } |
| 1404 static void instr_at_put(byte* pc, Instr instr) { | 1403 static void instr_at_put(byte* pc, Instr instr) { |
| 1405 *reinterpret_cast<Instr*>(pc) = instr; | 1404 *reinterpret_cast<Instr*>(pc) = instr; |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1608 public: | 1607 public: |
| 1609 explicit EnsureSpace(Assembler* assembler) { | 1608 explicit EnsureSpace(Assembler* assembler) { |
| 1610 assembler->CheckBuffer(); | 1609 assembler->CheckBuffer(); |
| 1611 } | 1610 } |
| 1612 }; | 1611 }; |
| 1613 | 1612 |
| 1614 | 1613 |
| 1615 } } // namespace v8::internal | 1614 } } // namespace v8::internal |
| 1616 | 1615 |
| 1617 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1616 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |