comparison src/cpu/x86/vm/relocInfo_x86.cpp @ 13512:8085ce95b6f5

reloc info for safepoint polls includes whether the poison page is far or near
author Doug Simon <doug.simon@oracle.com>
date Mon, 06 Jan 2014 13:41:59 +0100
parents 740e263c80c6
children fa5180b3c18e
comparison
equal deleted inserted replaced
13511:51e16c7a5685 13512:8085ce95b6f5
177 return *pd_address_in_code(); 177 return *pd_address_in_code();
178 } 178 }
179 179
180 void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { 180 void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) {
181 #ifdef _LP64 181 #ifdef _LP64
182 if (!Assembler::is_polling_page_far()) { 182 if (_distance == near) {
183 typedef Assembler::WhichOperand WhichOperand; 183 typedef Assembler::WhichOperand WhichOperand;
184 WhichOperand which = (WhichOperand) format(); 184 WhichOperand which = (WhichOperand) format();
185 // This format is imm but it is really disp32 185 // This format is imm but it is really disp32
186 which = Assembler::disp32_operand; 186 which = Assembler::disp32_operand;
187 address orig_addr = old_addr_for(addr(), src, dest); 187 address orig_addr = old_addr_for(addr(), src, dest);
197 * disp = (int32_t)new_disp; 197 * disp = (int32_t)new_disp;
198 } 198 }
199 #endif // _LP64 199 #endif // _LP64
200 } 200 }
201 201
202 void poll_return_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) {
203 #ifdef _LP64
204 if (!Assembler::is_polling_page_far()) {
205 typedef Assembler::WhichOperand WhichOperand;
206 WhichOperand which = (WhichOperand) format();
207 // This format is imm but it is really disp32
208 which = Assembler::disp32_operand;
209 address orig_addr = old_addr_for(addr(), src, dest);
210 NativeInstruction* oni = nativeInstruction_at(orig_addr);
211 int32_t* orig_disp = (int32_t*) Assembler::locate_operand(orig_addr, which);
212 // This poll_addr is incorrect by the size of the instruction it is irrelevant
213 intptr_t poll_addr = (intptr_t)oni + *orig_disp;
214
215 NativeInstruction* ni = nativeInstruction_at(addr());
216 intptr_t new_disp = poll_addr - (intptr_t) ni;
217
218 int32_t* disp = (int32_t*) Assembler::locate_operand(addr(), which);
219 * disp = (int32_t)new_disp;
220 }
221 #endif // _LP64
222 }
223
224 void metadata_Relocation::pd_fix_value(address x) { 202 void metadata_Relocation::pd_fix_value(address x) {
225 } 203 }