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]

[PATCH] builtins.c fix apply_args_size, apply_result_size


This patch removes an abort from apply_args_size and apply_result_size
that I don't think is valid. As previously discussed with
FUNCTION_ARG_REGNO_P and the mips port with o64, an argument can be
passed across multiple registers (and from reading the documentation a
value received across the same), and while HARD_REGNO_MODE_OK may be
false for all values, it is still acceptable as a FUNCTION_ARG_REGNO_P
return.

As another note, i've seen this code that checks for modes a few other
places, I've thought about pulling it out and keeping it in a function.
Any thought as to a preferred place?

So, along comes this patch. This fixes the build error reported by
Graham Stott for objective-c on mips64vr-elf in the vr5400 multilib.

Tested by bootstrap and mips64vr-elf.

OK? Other thoughts?

-eric

-- 
Eric Christopher <echristo@bitmines.org>

2004-03-15  Eric Christopher  <echristo@redhat.com>

	* builtins.c (apply_args_size): If no value can be held
	in a register mark it as such, don't abort.
	(apply_result_size): Ditto.

Index: builtins.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/builtins.c,v
retrieving revision 1.292
diff -u -p -w -r1.292 builtins.c
--- builtins.c	12 Mar 2004 13:33:34 -0000	1.292
+++ builtins.c	15 Mar 2004 07:37:00 -0000
@@ -940,8 +940,14 @@ apply_args_size (void)
 		  best_mode = mode;
 
 	    mode = best_mode;
+
 	    if (mode == VOIDmode)
-	      abort ();
+	      {
+		apply_args_mode[regno] = VOIDmode;
+		apply_args_reg_offset[regno] = 0;
+		continue;
+	      }
+
 
 	    align = GET_MODE_ALIGNMENT (mode) / BITS_PER_UNIT;
 	    if (size % align != 0)
@@ -1013,7 +1019,10 @@ apply_result_size (void)
 
 	    mode = best_mode;
 	    if (mode == VOIDmode)
-	      abort ();
+	      {
+		apply_result_mode[regno] = VOIDmode;
+		continue;
+	      }
 
 	    align = GET_MODE_ALIGNMENT (mode) / BITS_PER_UNIT;
 	    if (size % align != 0)



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