diff -r 5da8bb64b370 -r ad3b94907eed src/share/vm/adlc/output_c.cpp --- a/src/share/vm/adlc/output_c.cpp Mon Dec 23 10:26:08 2013 -0800 +++ b/src/share/vm/adlc/output_c.cpp Fri Dec 20 13:51:14 2013 +0100 @@ -1842,17 +1842,23 @@ // There are nodes that don't use $constantablebase, but still require that it // is an input to the node. Example: divF_reg_immN, Repl32B_imm on x86_64. if (node->is_mach_constant() || node->needs_constant_base()) { - fprintf(fp," add_req(C->mach_constant_base_node());\n"); + if (node->is_ideal_call() != Form::invalid_type && + node->is_ideal_call() != Form::JAVA_LEAF) { + fprintf(fp, " // MachConstantBaseNode added in matcher.\n"); + _needs_clone_jvms = true; + } else { + fprintf(fp, " add_req(C->mach_constant_base_node());\n"); + } } - fprintf(fp,"\n"); - if( node->expands() ) { - fprintf(fp," return result;\n"); + fprintf(fp, "\n"); + if (node->expands()) { + fprintf(fp, " return result;\n"); } else { - fprintf(fp," return this;\n"); + fprintf(fp, " return this;\n"); } - fprintf(fp,"}\n"); - fprintf(fp,"\n"); + fprintf(fp, "}\n"); + fprintf(fp, "\n"); } @@ -3642,6 +3648,11 @@ return callconv; } +void ArchDesc::generate_needs_clone_jvms(FILE *fp_cpp) { + fprintf(fp_cpp, "bool Compile::needs_clone_jvms() { return %s; }\n\n", + _needs_clone_jvms ? "true" : "false"); +} + //---------------------------generate_assertion_checks------------------- void ArchDesc::generate_adlc_verification(FILE *fp_cpp) { fprintf(fp_cpp, "\n");