diff src/share/vm/adlc/output_c.cpp @ 17791:ad3b94907eed

8030863: PPC64: (part 220): ConstantTableBase for calls between args and jvms Summary: Add ConstantTableBase node edge after parameters and before jvms. Adapt jvms offsets. Reviewed-by: kvn
author goetz
date Fri, 20 Dec 2013 13:51:14 +0100
parents 492e67693373
children abec000618bf a9becfeecd1b
line wrap: on
line diff
--- 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");