1.1 --- a/src/share/vm/adlc/output_h.cpp Mon Apr 14 20:56:48 2014 -0400 1.2 +++ b/src/share/vm/adlc/output_h.cpp Thu Apr 10 23:15:13 2014 -0700 1.3 @@ -1613,21 +1613,20 @@ 1.4 // Each instruction attribute results in a virtual call of same name. 1.5 // The ins_cost is not handled here. 1.6 Attribute *attr = instr->_attribs; 1.7 - bool avoid_back_to_back = false; 1.8 + Attribute *avoid_back_to_back_attr = NULL; 1.9 while (attr != NULL) { 1.10 - if (strcmp (attr->_ident, "ins_cost") != 0 && 1.11 + if (strcmp (attr->_ident, "ins_is_TrapBasedCheckNode") == 0) { 1.12 + fprintf(fp, " virtual bool is_TrapBasedCheckNode() const { return %s; }\n", attr->_val); 1.13 + } else if (strcmp (attr->_ident, "ins_cost") != 0 && 1.14 strncmp(attr->_ident, "ins_field_", 10) != 0 && 1.15 // Must match function in node.hpp: return type bool, no prefix "ins_". 1.16 strcmp (attr->_ident, "ins_is_TrapBasedCheckNode") != 0 && 1.17 strcmp (attr->_ident, "ins_short_branch") != 0) { 1.18 fprintf(fp, " virtual int %s() const { return %s; }\n", attr->_ident, attr->_val); 1.19 } 1.20 - // Check value for ins_avoid_back_to_back, and if it is true (1), set the flag 1.21 - if (!strcmp(attr->_ident, "ins_avoid_back_to_back") != 0 && attr->int_val(*this) != 0) 1.22 - avoid_back_to_back = true; 1.23 - if (strcmp (attr->_ident, "ins_is_TrapBasedCheckNode") == 0) 1.24 - fprintf(fp, " virtual bool is_TrapBasedCheckNode() const { return %s; }\n", attr->_val); 1.25 - 1.26 + if (strcmp(attr->_ident, "ins_avoid_back_to_back") == 0) { 1.27 + avoid_back_to_back_attr = attr; 1.28 + } 1.29 attr = (Attribute *)attr->_next; 1.30 } 1.31 1.32 @@ -1799,11 +1798,11 @@ 1.33 } 1.34 1.35 // flag: if this instruction should not be generated back to back. 1.36 - if ( avoid_back_to_back ) { 1.37 - if ( node_flags_set ) { 1.38 - fprintf(fp," | Flag_avoid_back_to_back"); 1.39 + if (avoid_back_to_back_attr != NULL) { 1.40 + if (node_flags_set) { 1.41 + fprintf(fp," | (%s)", avoid_back_to_back_attr->_val); 1.42 } else { 1.43 - fprintf(fp,"init_flags(Flag_avoid_back_to_back"); 1.44 + fprintf(fp,"init_flags((%s)", avoid_back_to_back_attr->_val); 1.45 node_flags_set = true; 1.46 } 1.47 }