| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 } | 109 } |
| 110 | 110 |
| 111 | 111 |
| 112 Address* RelocInfo::target_reference_address() { | 112 Address* RelocInfo::target_reference_address() { |
| 113 ASSERT(rmode_ == EXTERNAL_REFERENCE); | 113 ASSERT(rmode_ == EXTERNAL_REFERENCE); |
| 114 return reinterpret_cast<Address*>(Assembler::target_address_address_at(pc_)); | 114 return reinterpret_cast<Address*>(Assembler::target_address_address_at(pc_)); |
| 115 } | 115 } |
| 116 | 116 |
| 117 | 117 |
| 118 Address RelocInfo::call_address() { | 118 Address RelocInfo::call_address() { |
| 119 ASSERT(IsPatchedReturnSequence()); | 119 // The 2 instructions offset assumes patched debug break slot or return |
| 120 // The 2 instructions offset assumes patched return sequence. | 120 // sequence. |
| 121 ASSERT(IsJSReturn(rmode())); | 121 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || |
| 122 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); |
| 122 return Memory::Address_at(pc_ + 2 * Assembler::kInstrSize); | 123 return Memory::Address_at(pc_ + 2 * Assembler::kInstrSize); |
| 123 } | 124 } |
| 124 | 125 |
| 125 | 126 |
| 126 void RelocInfo::set_call_address(Address target) { | 127 void RelocInfo::set_call_address(Address target) { |
| 127 ASSERT(IsPatchedReturnSequence()); | 128 ASSERT(IsPatchedReturnSequence()); |
| 128 // The 2 instructions offset assumes patched return sequence. | 129 // The 2 instructions offset assumes patched return sequence. |
| 129 ASSERT(IsJSReturn(rmode())); | 130 ASSERT(IsJSReturn(rmode())); |
| 130 Memory::Address_at(pc_ + 2 * Assembler::kInstrSize) = target; | 131 Memory::Address_at(pc_ + 2 * Assembler::kInstrSize) = target; |
| 131 } | 132 } |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 // CPU::FlushICache(pc, sizeof(target)); | 301 // CPU::FlushICache(pc, sizeof(target)); |
| 301 // However, on ARM, no instruction was actually patched by the assignment | 302 // However, on ARM, no instruction was actually patched by the assignment |
| 302 // above; the target address is not part of an instruction, it is patched in | 303 // above; the target address is not part of an instruction, it is patched in |
| 303 // the constant pool and is read via a data access; the instruction accessing | 304 // the constant pool and is read via a data access; the instruction accessing |
| 304 // this address in the constant pool remains unchanged. | 305 // this address in the constant pool remains unchanged. |
| 305 } | 306 } |
| 306 | 307 |
| 307 } } // namespace v8::internal | 308 } } // namespace v8::internal |
| 308 | 309 |
| 309 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ | 310 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ |
| OLD | NEW |