This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
SPARC: Fix oversight in mem_min_alignment
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 May 2005 18:03:33 +0200
- Subject: SPARC: Fix oversight in mem_min_alignment
When I added the test against MEM_ALIGN (mem) to mem_min_alignment for 4.x,
I forgot -munaligned-doubles.
Tested on sparc-sun-solaris2.10, applied to mainline and 4.0 branch.
2005-05-10 Eric Botcazou <ebotcazou@libertysurf.fr>
* config/sparc/sparc.c (mem_min_alignment): Do not rely
on MEM_ALIGN if TARGET_UNALIGNED_DOUBLES.
--
Eric Botcazou
Index: config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.354.8.4
diff -u -p -r1.354.8.4 sparc.c
--- config/sparc/sparc.c 12 Apr 2005 21:09:55 -0000 1.354.8.4
+++ config/sparc/sparc.c 9 May 2005 04:30:03 -0000
@@ -4008,7 +4008,8 @@ mem_min_alignment (rtx mem, int desired)
return 0;
/* Obviously... */
- if (MEM_ALIGN (mem) / BITS_PER_UNIT >= (unsigned)desired)
+ if (!TARGET_UNALIGNED_DOUBLES
+ && MEM_ALIGN (mem) / BITS_PER_UNIT >= (unsigned)desired)
return 1;
/* ??? The rest of the function predates MEM_ALIGN so