comparison src/share/vm/opto/output.cpp @ 14440:41b780b43b74

8029015: PPC64 (part 216): opto: trap based null and range checks Summary: On PPC64 use tdi instruction that does a compare and raises SIGTRAP for NULL and range checks. Reviewed-by: kvn
author goetz
date Wed, 27 Nov 2013 16:16:21 -0800
parents 318d0622a6d7
children abec000618bf
comparison
equal deleted inserted replaced
14439:50fdb38839eb 14440:41b780b43b74
1457 // Remember the beginning of the previous instruction, in case 1457 // Remember the beginning of the previous instruction, in case
1458 // it's followed by a flag-kill and a null-check. Happens on 1458 // it's followed by a flag-kill and a null-check. Happens on
1459 // Intel all the time, with add-to-memory kind of opcodes. 1459 // Intel all the time, with add-to-memory kind of opcodes.
1460 previous_offset = current_offset; 1460 previous_offset = current_offset;
1461 } 1461 }
1462
1463 // Not an else-if!
1464 // If this is a trap based cmp then add its offset to the list.
1465 if (mach->is_TrapBasedCheckNode()) {
1466 inct_starts[inct_cnt++] = current_offset;
1467 }
1462 } 1468 }
1463 1469
1464 // Verify that there is sufficient space remaining 1470 // Verify that there is sufficient space remaining
1465 cb->insts()->maybe_expand_to_ensure_remaining(MAX_inst_size); 1471 cb->insts()->maybe_expand_to_ensure_remaining(MAX_inst_size);
1466 if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { 1472 if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) {
1723 if (n->is_MachNullCheck()) { 1729 if (n->is_MachNullCheck()) {
1724 uint block_num = block->non_connector_successor(0)->_pre_order; 1730 uint block_num = block->non_connector_successor(0)->_pre_order;
1725 _inc_table.append(inct_starts[inct_cnt++], blk_labels[block_num].loc_pos()); 1731 _inc_table.append(inct_starts[inct_cnt++], blk_labels[block_num].loc_pos());
1726 continue; 1732 continue;
1727 } 1733 }
1734 // Handle implicit exception table updates: trap instructions.
1735 if (n->is_Mach() && n->as_Mach()->is_TrapBasedCheckNode()) {
1736 uint block_num = block->non_connector_successor(0)->_pre_order;
1737 _inc_table.append(inct_starts[inct_cnt++], blk_labels[block_num].loc_pos());
1738 continue;
1739 }
1728 } // End of for all blocks fill in exception table entries 1740 } // End of for all blocks fill in exception table entries
1729 } 1741 }
1730 1742
1731 // Static Variables 1743 // Static Variables
1732 #ifndef PRODUCT 1744 #ifndef PRODUCT