175 } |
175 } |
176 #endif // AMD64 |
176 #endif // AMD64 |
177 return *pd_address_in_code(); |
177 return *pd_address_in_code(); |
178 } |
178 } |
179 |
179 |
180 int Relocation::pd_breakpoint_size() { |
|
181 // minimum breakpoint size, in short words |
|
182 return NativeIllegalInstruction::instruction_size / sizeof(short); |
|
183 } |
|
184 |
|
185 void Relocation::pd_swap_in_breakpoint(address x, short* instrs, int instrlen) { |
|
186 Untested("pd_swap_in_breakpoint"); |
|
187 if (instrs != NULL) { |
|
188 assert(instrlen * sizeof(short) == NativeIllegalInstruction::instruction_size, "enough instrlen in reloc. data"); |
|
189 for (int i = 0; i < instrlen; i++) { |
|
190 instrs[i] = ((short*)x)[i]; |
|
191 } |
|
192 } |
|
193 NativeIllegalInstruction::insert(x); |
|
194 } |
|
195 |
|
196 |
|
197 void Relocation::pd_swap_out_breakpoint(address x, short* instrs, int instrlen) { |
|
198 Untested("pd_swap_out_breakpoint"); |
|
199 assert(NativeIllegalInstruction::instruction_size == sizeof(short), "right address unit for update"); |
|
200 NativeInstruction* ni = nativeInstruction_at(x); |
|
201 *(short*)ni->addr_at(0) = instrs[0]; |
|
202 } |
|
203 |
|
204 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) { |
205 #ifdef _LP64 |
181 #ifdef _LP64 |
206 if (!Assembler::is_polling_page_far()) { |
182 if (!Assembler::is_polling_page_far()) { |
207 typedef Assembler::WhichOperand WhichOperand; |
183 typedef Assembler::WhichOperand WhichOperand; |
208 WhichOperand which = (WhichOperand) format(); |
184 WhichOperand which = (WhichOperand) format(); |