A bug in GCC 2.95.2 for SPARC
James Cheng
James.Cheng@Eng.Sun.COM
Thu May 11 16:59:00 GMT 2000
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
More information about the Gcc-bugs
mailing list