Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/relocInfo_x86.cpp @ 13553:d49f00604347
removed poll_Relocation::pollingForm type and associated data field and rely solely on format field of safepoint relocation entries when deciding whether or not to relocate the operand of a safepoint poll instruction
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 08 Jan 2014 16:57:30 +0100 |
parents | fa5180b3c18e |
children | 1302b727b5cd |
comparison
equal
deleted
inserted
replaced
13552:c9daba2a2bac | 13553:d49f00604347 |
---|---|
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 (_form == pc_relative) { | 182 typedef Assembler::WhichOperand WhichOperand; |
183 typedef Assembler::WhichOperand WhichOperand; | 183 WhichOperand which = (WhichOperand) format(); |
184 WhichOperand which = (WhichOperand) format(); | 184 if (which == Assembler::disp32_operand) { |
185 // This format is imm but it is really disp32 | |
186 which = Assembler::disp32_operand; | |
187 address orig_addr = old_addr_for(addr(), src, dest); | 185 address orig_addr = old_addr_for(addr(), src, dest); |
188 NativeInstruction* oni = nativeInstruction_at(orig_addr); | 186 NativeInstruction* oni = nativeInstruction_at(orig_addr); |
189 int32_t* orig_disp = (int32_t*) Assembler::locate_operand(orig_addr, which); | 187 int32_t* orig_disp = (int32_t*) Assembler::locate_operand(orig_addr, which); |
190 // This poll_addr is incorrect by the size of the instruction it is irrelevant | 188 // This poll_addr is incorrect by the size of the instruction it is irrelevant |
191 intptr_t poll_addr = (intptr_t)oni + *orig_disp; | 189 intptr_t poll_addr = (intptr_t)oni + *orig_disp; |
192 | |
193 NativeInstruction* ni = nativeInstruction_at(addr()); | 190 NativeInstruction* ni = nativeInstruction_at(addr()); |
194 intptr_t new_disp = poll_addr - (intptr_t) ni; | 191 intptr_t new_disp = poll_addr - (intptr_t) ni; |
195 | 192 |
196 int32_t* disp = (int32_t*) Assembler::locate_operand(addr(), which); | 193 int32_t* disp = (int32_t*) Assembler::locate_operand(addr(), which); |
197 * disp = (int32_t)new_disp; | 194 * disp = (int32_t)new_disp; |