275 Node* nj = block->get_node(j); 276 // Handle machine instruction nodes 277 if (nj->is_Mach()) { 278 MachNode *mach = nj->as_Mach(); 279 blk_size += (mach->alignment_required() - 1) * relocInfo::addr_unit(); // assume worst case padding 280 reloc_size += mach->reloc(); 281 if (mach->is_MachCall()) { 282 // add size information for trampoline stub 283 // class CallStubImpl is platform-specific and defined in the *.ad files. 284 stub_size += CallStubImpl::size_call_trampoline(); 285 reloc_size += CallStubImpl::reloc_call_trampoline(); 286 287 MachCallNode *mcall = mach->as_MachCall(); 288 // This destination address is NOT PC-relative 289 290 mcall->method_set((intptr_t)mcall->entry_point()); 291 292 if (mcall->is_MachCallJava() && mcall->as_MachCallJava()->_method) { 293 stub_size += CompiledStaticCall::to_interp_stub_size(); 294 reloc_size += CompiledStaticCall::reloc_to_interp_stub(); 295 } 296 } else if (mach->is_MachSafePoint()) { 297 // If call/safepoint are adjacent, account for possible 298 // nop to disambiguate the two safepoints. 299 // ScheduleAndBundle() can rearrange nodes in a block, 300 // check for all offsets inside this block. 301 if (last_call_adr >= blk_starts[i]) { 302 blk_size += nop_size; 303 } 304 } 305 if (mach->avoid_back_to_back(MachNode::AVOID_BEFORE)) { 306 // Nop is inserted between "avoid back to back" instructions. 307 // ScheduleAndBundle() can rearrange nodes in a block, 308 // check for all offsets inside this block. 309 if (last_avoid_back_to_back_adr >= blk_starts[i]) { 310 blk_size += nop_size; 311 } 312 } 313 if (mach->may_be_short_branch()) { 314 if (!nj->is_MachBranch()) { | 275 Node* nj = block->get_node(j); 276 // Handle machine instruction nodes 277 if (nj->is_Mach()) { 278 MachNode *mach = nj->as_Mach(); 279 blk_size += (mach->alignment_required() - 1) * relocInfo::addr_unit(); // assume worst case padding 280 reloc_size += mach->reloc(); 281 if (mach->is_MachCall()) { 282 // add size information for trampoline stub 283 // class CallStubImpl is platform-specific and defined in the *.ad files. 284 stub_size += CallStubImpl::size_call_trampoline(); 285 reloc_size += CallStubImpl::reloc_call_trampoline(); 286 287 MachCallNode *mcall = mach->as_MachCall(); 288 // This destination address is NOT PC-relative 289 290 mcall->method_set((intptr_t)mcall->entry_point()); 291 292 if (mcall->is_MachCallJava() && mcall->as_MachCallJava()->_method) { 293 stub_size += CompiledStaticCall::to_interp_stub_size(); 294 reloc_size += CompiledStaticCall::reloc_to_interp_stub(); 295 #if INCLUDE_AOT 296 stub_size += CompiledStaticCall::to_aot_stub_size(); 297 reloc_size += CompiledStaticCall::reloc_to_aot_stub(); 298 #endif 299 } 300 } else if (mach->is_MachSafePoint()) { 301 // If call/safepoint are adjacent, account for possible 302 // nop to disambiguate the two safepoints. 303 // ScheduleAndBundle() can rearrange nodes in a block, 304 // check for all offsets inside this block. 305 if (last_call_adr >= blk_starts[i]) { 306 blk_size += nop_size; 307 } 308 } 309 if (mach->avoid_back_to_back(MachNode::AVOID_BEFORE)) { 310 // Nop is inserted between "avoid back to back" instructions. 311 // ScheduleAndBundle() can rearrange nodes in a block, 312 // check for all offsets inside this block. 313 if (last_avoid_back_to_back_adr >= blk_starts[i]) { 314 blk_size += nop_size; 315 } 316 } 317 if (mach->may_be_short_branch()) { 318 if (!nj->is_MachBranch()) { |