| 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 // Modify the code target address in a constant pool entry. | 440 // This sets the branch destination (which is in the constant pool on ARM). |
| 441 inline static void set_target_at(Address constant_pool_entry, Address target); | 441 // This is for calls and branches within generated code. |
| 442 inline static void set_target_at(Address constant_pool_entry, |
| 443 Address target) { |
| 444 set_target_address_at(constant_pool_entry, target); |
| 445 } |
| 446 |
| 447 // This sets the branch destination (which is in the constant pool on ARM). |
| 448 // This is for calls and branches to runtime code. |
| 449 inline static void set_external_target_at(Address constant_pool_entry, |
| 450 Address target) { |
| 451 set_target_address_at(constant_pool_entry, target); |
| 452 } |
| 442 | 453 |
| 443 // Here we are patching the address in the constant pool, not the actual call | 454 // Here we are patching the address in the constant pool, not the actual call |
| 444 // instruction. The address in the constant pool is the same size as a | 455 // instruction. The address in the constant pool is the same size as a |
| 445 // pointer. | 456 // pointer. |
| 446 static const int kCallTargetSize = kPointerSize; | 457 static const int kCallTargetSize = kPointerSize; |
| 458 static const int kExternalTargetSize = kPointerSize; |
| 447 | 459 |
| 448 // Size of an instruction. | 460 // Size of an instruction. |
| 449 static const int kInstrSize = sizeof(Instr); | 461 static const int kInstrSize = sizeof(Instr); |
| 450 | 462 |
| 451 // Distance between the instruction referring to the address of the call | 463 // Distance between the instruction referring to the address of the call |
| 452 // target (ldr pc, [target addr in const pool]) and the return address | 464 // target (ldr pc, [target addr in const pool]) and the return address |
| 453 static const int kCallTargetAddressOffset = kInstrSize; | 465 static const int kCallTargetAddressOffset = kInstrSize; |
| 454 | 466 |
| 455 // Distance between start of patched return sequence and the emitted address | 467 // Distance between start of patched return sequence and the emitted address |
| 456 // to jump to. | 468 // to jump to. |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | 829 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
| 818 | 830 |
| 819 friend class RegExpMacroAssemblerARM; | 831 friend class RegExpMacroAssemblerARM; |
| 820 friend class RelocInfo; | 832 friend class RelocInfo; |
| 821 friend class CodePatcher; | 833 friend class CodePatcher; |
| 822 }; | 834 }; |
| 823 | 835 |
| 824 } } // namespace v8::internal | 836 } } // namespace v8::internal |
| 825 | 837 |
| 826 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 838 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |