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 are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 } | 142 } |
143 } | 143 } |
144 | 144 |
145 | 145 |
146 Address* RelocInfo::target_reference_address() { | 146 Address* RelocInfo::target_reference_address() { |
147 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); | 147 ASSERT(rmode_ == RelocInfo::EXTERNAL_REFERENCE); |
148 return reinterpret_cast<Address*>(pc_); | 148 return reinterpret_cast<Address*>(pc_); |
149 } | 149 } |
150 | 150 |
151 | 151 |
| 152 Address RelocInfo::target_runtime_entry(Assembler* origin, intptr_t delta) { |
| 153 ASSERT(IsRuntimeEntry(rmode_)); |
| 154 return target_address() - delta; |
| 155 } |
| 156 |
| 157 |
| 158 void RelocInfo::set_target_runtime_entry(Address target, |
| 159 WriteBarrierMode mode) { |
| 160 ASSERT(IsRuntimeEntry(rmode_)); |
| 161 if (target_address() != target) set_target_address(target, mode); |
| 162 } |
| 163 |
| 164 |
152 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { | 165 Handle<JSGlobalPropertyCell> RelocInfo::target_cell_handle() { |
153 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 166 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
154 Address address = Memory::Address_at(pc_); | 167 Address address = Memory::Address_at(pc_); |
155 return Handle<JSGlobalPropertyCell>( | 168 return Handle<JSGlobalPropertyCell>( |
156 reinterpret_cast<JSGlobalPropertyCell**>(address)); | 169 reinterpret_cast<JSGlobalPropertyCell**>(address)); |
157 } | 170 } |
158 | 171 |
159 | 172 |
160 JSGlobalPropertyCell* RelocInfo::target_cell() { | 173 JSGlobalPropertyCell* RelocInfo::target_cell() { |
161 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); | 174 ASSERT(rmode_ == RelocInfo::GLOBAL_PROPERTY_CELL); |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 | 507 |
495 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { | 508 Operand::Operand(int32_t disp, RelocInfo::Mode rmode) { |
496 // [disp/r] | 509 // [disp/r] |
497 set_modrm(0, ebp); | 510 set_modrm(0, ebp); |
498 set_dispr(disp, rmode); | 511 set_dispr(disp, rmode); |
499 } | 512 } |
500 | 513 |
501 } } // namespace v8::internal | 514 } } // namespace v8::internal |
502 | 515 |
503 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 516 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |