This is the mail archive of the 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]

Re: [PATCH] Fix unaligned load on the IA-64

> I wonder if after the args[i].mode == BLKmode check we always have a MEM_P?
> Or, if not, if we only ever need the unaligned handling for MEM_Ps?

The following appears to work, tested on SPARC and IA-64.  OK for mainline?

2008-11-10 ?Eric Botcazou ?<>

? ? ? ? * calls.c (store_unaligned_arguments_into_pseudos): Deal only with
	values living in memory and use more precise alignment information.

Eric Botcazou
Index: calls.c
--- calls.c	(revision 141707)
+++ calls.c	(working copy)
@@ -837,7 +837,8 @@ store_unaligned_arguments_into_pseudos (
   for (i = 0; i < num_actuals; i++)
     if (args[i].reg != 0 && ! args[i].pass_on_stack
 	&& args[i].mode == BLKmode
-	&& (TYPE_ALIGN (TREE_TYPE (args[i].tree_value))
+	&& MEM_P (args[i].value)
+	&& (MEM_ALIGN (args[i].value)
 	    < (unsigned int) MIN (BIGGEST_ALIGNMENT, BITS_PER_WORD)))
 	int bytes = int_size_in_bytes (TREE_TYPE (args[i].tree_value));

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