diff 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
line wrap: on
line diff
--- a/src/share/vm/opto/output.cpp	Tue Nov 26 18:38:19 2013 -0800
+++ b/src/share/vm/opto/output.cpp	Wed Nov 27 16:16:21 2013 -0800
@@ -1459,6 +1459,12 @@
           // Intel all the time, with add-to-memory kind of opcodes.
           previous_offset = current_offset;
         }
+
+        // Not an else-if!
+        // If this is a trap based cmp then add its offset to the list.
+        if (mach->is_TrapBasedCheckNode()) {
+          inct_starts[inct_cnt++] = current_offset;
+        }
       }
 
       // Verify that there is sufficient space remaining
@@ -1725,6 +1731,12 @@
       _inc_table.append(inct_starts[inct_cnt++], blk_labels[block_num].loc_pos());
       continue;
     }
+    // Handle implicit exception table updates: trap instructions.
+    if (n->is_Mach() && n->as_Mach()->is_TrapBasedCheckNode()) {
+      uint block_num = block->non_connector_successor(0)->_pre_order;
+      _inc_table.append(inct_starts[inct_cnt++], blk_labels[block_num].loc_pos());
+      continue;
+    }
   } // End of for all blocks fill in exception table entries
 }