This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: A bug in GCC 2.95.2 for SPARC
- To: davem at redhat dot com
- Subject: Re: A bug in GCC 2.95.2 for SPARC
- From: James Cheng <James dot Cheng at Eng dot Sun dot COM>
- Date: Thu, 11 May 2000 16:59:27 -0700 (PDT)
- Cc: gcc-bugs at gcc dot gnu dot org
- Reply-To: James Cheng <James dot Cheng at Eng dot Sun dot COM>
David,
> It turned out to be an implementation dependency of the UltraSPARC.
> On page 249 of "UltraSPARC User's Manual, Revision 2.0 - June 1996"
> there is:
>
> LDDF{A}/STDF{A} cause an LDDF/STDF_mem_address_not_aligned
> trap if the effective address is 32-bit aligned but not
> 64-bit (doubleword) aligned.
>
> I have tried the gcc 2.96 version 2.96 20000501 (experimental) with
> -mcpu=ultrasparc, and the problem I reported earlier is gone.
>
> Solaris should have been resolving and handling those unaligned
> accesses for the application though, at least Linux on UltraSparc
> does.
Based on my experience, none of Solaris 2.5.1, 2.6, 7, or 8 is
resolving those unaligned accesses other than throwing bus error
and dumping core. I don't know why, maybe for forcing compilers
to generate faster code :-)
Thanks,
-James