This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix unaligned load on the IA-64
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: "Richard Guenther" <richard dot guenther at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Nov 2008 13:32:17 +0100
- Subject: Re: [PATCH] Fix unaligned load on the IA-64
- References: <200810311225.59610.ebotcazou@adacore.com> <84fc9c000810310446y5e4e40fav9baf52ce441a4371@mail.gmail.com>
> 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 ?<ebotcazou@adacore.com>
? ? ? ? * 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));