| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 int RelocInfo::target_address_size() { | 72 int RelocInfo::target_address_size() { |
| 73 return Assembler::kExternalTargetSize; | 73 return Assembler::kExternalTargetSize; |
| 74 } | 74 } |
| 75 | 75 |
| 76 | 76 |
| 77 void RelocInfo::set_target_address(Address target, Code* code) { | 77 void RelocInfo::set_target_address(Address target, Code* code) { |
| 78 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); | 78 ASSERT(IsCodeTarget(rmode_) || rmode_ == RUNTIME_ENTRY); |
| 79 Assembler::set_target_address_at(pc_, target); | 79 Assembler::set_target_address_at(pc_, target); |
| 80 if (code != NULL && IsCodeTarget(rmode_)) { | 80 if (code != NULL && IsCodeTarget(rmode_)) { |
| 81 Object* target_code = Code::GetCodeFromTargetAddress(target); | 81 Object* target_code = Code::GetCodeFromTargetAddress(target); |
| 82 // TODO(gc) We do not compact code pages. | 82 // TODO(1550) We do not compact code pages. |
| 83 code->GetHeap()->incremental_marking()->RecordWrite( | 83 code->GetHeap()->incremental_marking()->RecordWrite( |
| 84 code, NULL, HeapObject::cast(target_code)); | 84 code, NULL, HeapObject::cast(target_code)); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 | 88 |
| 89 Object* RelocInfo::target_object() { | 89 Object* RelocInfo::target_object() { |
| 90 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 90 ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
| 91 return Memory::Object_at(Assembler::target_address_address_at(pc_)); | 91 return Memory::Object_at(Assembler::target_address_address_at(pc_)); |
| 92 } | 92 } |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 // CPU::FlushICache(pc, sizeof(target)); | 361 // CPU::FlushICache(pc, sizeof(target)); |
| 362 // However, on ARM, no instruction was actually patched by the assignment | 362 // However, on ARM, no instruction was actually patched by the assignment |
| 363 // above; the target address is not part of an instruction, it is patched in | 363 // above; the target address is not part of an instruction, it is patched in |
| 364 // the constant pool and is read via a data access; the instruction accessing | 364 // the constant pool and is read via a data access; the instruction accessing |
| 365 // this address in the constant pool remains unchanged. | 365 // this address in the constant pool remains unchanged. |
| 366 } | 366 } |
| 367 | 367 |
| 368 } } // namespace v8::internal | 368 } } // namespace v8::internal |
| 369 | 369 |
| 370 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ | 370 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ |
| OLD | NEW |