This is the mail archive of the gcc-patches@gcc.gnu.org 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: [csl-sol210] Patch to disable ldd and std for 32-bit SPARC


On Thu, May 19, 2005 at 10:09:24PM +0000, Joseph S. Myers wrote:
> This patch, for csl-sol210-3_4-branch (which is now being used more
> generally for the Solaris 10 compiler on SPARC as well as AMD64), adds
> a command-line option to disable use of the SPARC ldd and std
> instructions with integer operands.  This is for use with large bodies
> of legacy code which has inadequately aligned 64-bit values.

I think the option is mis-named and specifies the wrong thing.  
It should instead specify that long long implies only 32-bit
alignment.

If the compiler can prove (or generate for itself) larger alignment,
then it should still be allowed to use ldd/std.

Further, by not properly telling the optimizers about the real
alignment, you risk emitting wrong-code for some corner cases.


r~


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