This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[nvptx] HImode complex args


My patch to walk_args_for_param to fix QImode complex args, didn't deal with HImode ones. Those also had the same problem, but I'd not triaged the testsuite enough to see at that point.

This patch reverts the change to nvptx_ptx_type_from_mode, instead moving the call to arg_promotion into the path for both split and unsplit args.

This fixes the following testcases (in addition to the ones the earlier patch fixed):

gcc.dg/compat/scalar-by-value-4
gcc.dg/compat/scalar-return-4
gcc.dg/compat/struct-by-value-12


nathan
Index: config/nvptx/nvptx.c
===================================================================
--- config/nvptx/nvptx.c	(revision 227107)
+++ config/nvptx/nvptx.c	(working copy)
@@ -405,17 +405,17 @@ walk_args_for_param (FILE *file, tree ar
 		mode = DFmode;
 
 	    }
-	  mode = arg_promotion (mode);
 	}
+      mode = arg_promotion (mode);
       while (count-- > 0)
 	{
 	  i++;
 	  if (write_copy)
 	    fprintf (file, "\tld.param%s %%ar%d, [%%in_ar%d];\n",
-		     nvptx_ptx_type_from_mode (mode, true), i, i);
+		     nvptx_ptx_type_from_mode (mode, false), i, i);
 	  else
 	    fprintf (file, "\t.reg%s %%ar%d;\n",
-		     nvptx_ptx_type_from_mode (mode, true), i);
+		     nvptx_ptx_type_from_mode (mode, false), i);
 	}
     }
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]