| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 void label_at_put(Label* L, int at_offset); | 430 void label_at_put(Label* L, int at_offset); |
| 431 | 431 |
| 432 // Return the address in the constant pool of the code target address used by | 432 // Return the address in the constant pool of the code target address used by |
| 433 // the branch/call instruction at pc. | 433 // the branch/call instruction at pc. |
| 434 INLINE(static Address target_address_address_at(Address pc)); | 434 INLINE(static Address target_address_address_at(Address pc)); |
| 435 | 435 |
| 436 // Read/Modify the code target address in the branch/call instruction at pc. | 436 // Read/Modify the code target address in the branch/call instruction at pc. |
| 437 INLINE(static Address target_address_at(Address pc)); | 437 INLINE(static Address target_address_at(Address pc)); |
| 438 INLINE(static void set_target_address_at(Address pc, Address target)); | 438 INLINE(static void set_target_address_at(Address pc, Address target)); |
| 439 | 439 |
| 440 // Here we are patching the address in the constant pool, not the actual call |
| 441 // instruction. The address in the constant pool is the same size as a |
| 442 // pointer. |
| 443 static const int kCallTargetSize = kPointerSize; |
| 444 |
| 440 // Size of an instruction. | 445 // Size of an instruction. |
| 441 static const int kInstrSize = sizeof(Instr); | 446 static const int kInstrSize = sizeof(Instr); |
| 442 | 447 |
| 443 // Distance between the instruction referring to the address of the call | 448 // Distance between the instruction referring to the address of the call |
| 444 // target (ldr pc, [target addr in const pool]) and the return address | 449 // target (ldr pc, [target addr in const pool]) and the return address |
| 445 static const int kCallTargetAddressOffset = kInstrSize; | 450 static const int kCallTargetAddressOffset = kInstrSize; |
| 446 | 451 |
| 447 // Distance between start of patched return sequence and the emitted address | 452 // Distance between start of patched return sequence and the emitted address |
| 448 // to jump to. | 453 // to jump to. |
| 449 static const int kPatchReturnSequenceAddressOffset = kInstrSize; | 454 static const int kPatchReturnSequenceAddressOffset = kInstrSize; |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | 814 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
| 810 | 815 |
| 811 friend class RegExpMacroAssemblerARM; | 816 friend class RegExpMacroAssemblerARM; |
| 812 friend class RelocInfo; | 817 friend class RelocInfo; |
| 813 friend class CodePatcher; | 818 friend class CodePatcher; |
| 814 }; | 819 }; |
| 815 | 820 |
| 816 } } // namespace v8::internal | 821 } } // namespace v8::internal |
| 817 | 822 |
| 818 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 823 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |