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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // This sets the branch destination (which is in the constant pool on ARM). | 440 // This sets the branch destination (which is in the constant pool on ARM). |
441 // This is for calls and branches within generated code. | 441 // This is for calls and branches within generated code. |
442 inline static void set_target_at(Address constant_pool_entry, | 442 inline static void set_target_at(Address constant_pool_entry, Address target); |
443 Address target) { | |
444 set_target_address_at(constant_pool_entry, target); | |
445 } | |
446 | 443 |
447 // This sets the branch destination (which is in the constant pool on ARM). | 444 // This sets the branch destination (which is in the constant pool on ARM). |
448 // This is for calls and branches to runtime code. | 445 // This is for calls and branches to runtime code. |
449 inline static void set_external_target_at(Address constant_pool_entry, | 446 inline static void set_external_target_at(Address constant_pool_entry, |
450 Address target) { | 447 Address target) { |
451 set_target_address_at(constant_pool_entry, target); | 448 set_target_at(constant_pool_entry, target); |
452 } | 449 } |
453 | 450 |
454 // Here we are patching the address in the constant pool, not the actual call | 451 // Here we are patching the address in the constant pool, not the actual call |
455 // instruction. The address in the constant pool is the same size as a | 452 // instruction. The address in the constant pool is the same size as a |
456 // pointer. | 453 // pointer. |
457 static const int kCallTargetSize = kPointerSize; | 454 static const int kCallTargetSize = kPointerSize; |
458 static const int kExternalTargetSize = kPointerSize; | 455 static const int kExternalTargetSize = kPointerSize; |
459 | 456 |
460 // Size of an instruction. | 457 // Size of an instruction. |
461 static const int kInstrSize = sizeof(Instr); | 458 static const int kInstrSize = sizeof(Instr); |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | 826 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
830 | 827 |
831 friend class RegExpMacroAssemblerARM; | 828 friend class RegExpMacroAssemblerARM; |
832 friend class RelocInfo; | 829 friend class RelocInfo; |
833 friend class CodePatcher; | 830 friend class CodePatcher; |
834 }; | 831 }; |
835 | 832 |
836 } } // namespace v8::internal | 833 } } // namespace v8::internal |
837 | 834 |
838 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 835 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
OLD | NEW |