1229 // Make sure safepoint node for polling is distinct from a call's |
1229 // Make sure safepoint node for polling is distinct from a call's |
1230 // return by adding a nop if needed. |
1230 // return by adding a nop if needed. |
1231 if (is_sfn && !is_mcall && padding == 0 && current_offset == last_call_offset ) { |
1231 if (is_sfn && !is_mcall && padding == 0 && current_offset == last_call_offset ) { |
1232 padding = nop_size; |
1232 padding = nop_size; |
1233 } |
1233 } |
1234 assert( labels_not_set || padding == 0, "instruction should already be aligned") |
1234 assert( labels_not_set || padding == 0, "instruction should already be aligned"); |
1235 |
1235 |
1236 if(padding > 0) { |
1236 if(padding > 0) { |
1237 assert((padding % nop_size) == 0, "padding is not a multiple of NOP size"); |
1237 assert((padding % nop_size) == 0, "padding is not a multiple of NOP size"); |
1238 int nops_cnt = padding / nop_size; |
1238 int nops_cnt = padding / nop_size; |
1239 MachNode *nop = new (this) MachNopNode(nops_cnt); |
1239 MachNode *nop = new (this) MachNopNode(nops_cnt); |