This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc Sparc alignment problems
- From: Mike Stump <mrs at apple dot com>
- To: Phil Prentice <philp dot cheer at btinternet dot com>
- Cc: gcc-help at gnu dot org, gcc at gnu dot org
- Date: Mon, 19 Apr 2004 14:41:56 -0700
- Subject: Re: gcc Sparc alignment problems
On Monday, April 19, 2004, at 12:38 PM, Phil Prentice wrote:
Does anyone know of a gcc compiler flag or option that would enable
us to
compile and successfully run 'C' code that will access mis-aligned
integers
or dioubles which runs on a SPARC workstation running Solaris.
A trap handler that does the unaligned load might be best, gcc
generally doesn't support doing this without typing information, and
even when that is used, you cannot violate the type system and expect
it to work.
This could be done be changing your port to generate the unaligned
loads and store all the time instead of the aligned versions, but, this
would cause generated code to suffer significant performance
degradation, which is why in general, people don't do this.