hotspot/src/share/vm/adlc/archDesc.cpp
changeset 10255 bab46e6f7661
parent 7397 5b173b4ca846
child 10266 2ea344c79e33
--- a/hotspot/src/share/vm/adlc/archDesc.cpp	Wed Jul 27 15:06:35 2011 -0700
+++ b/hotspot/src/share/vm/adlc/archDesc.cpp	Wed Jul 27 17:28:36 2011 -0700
@@ -335,6 +335,9 @@
     while (attr != NULL) {
       if (strcmp(attr->_ident,"ins_short_branch") == 0 &&
           attr->int_val(*this) != 0) {
+        if (!instr->is_ideal_branch() || instr->label_position() == -1) {
+          syntax_err(instr->_linenum, "%s: Only short branch to a label is supported\n", rootOp);
+        }
         instr->set_short_branch(true);
       } else if (strcmp(attr->_ident,"ins_alignment") == 0 &&
           attr->int_val(*this) != 0) {