public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Yaro Pollak <yarop@altair-semi.com>
To: David Edelsohn <dje@watson.ibm.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Unaligned access to packed structs on ppc405
Date: Mon, 30 Jan 2006 12:03:00 -0000	[thread overview]
Message-ID: <43DE006E.2040803@altair-semi.com> (raw)
In-Reply-To: <200601291716.k0THGPD31684@makai.watson.ibm.com>



David Edelsohn wrote:

>>>>>>Yaro Pollak writes:
>>>>>>            
>>>>>>
>
>  
>
>>I am cross-compiling on GCC 3.4.1 for the PowerPC 405, which can handle 
>>unaligned accesses in hardware.
>>Whenever I am accessing members of a packed bit-struct by pointer, the 
>>compiler produces byte accesses, instead of 4-byte acceses.
>>I've tried to use |-mstrict-align but to no avail.
>>    
>>
>
>	What does "|-mstrict-align" mean?  -mstrict-align means "do not
>assume that unaligned accesses are handled by the system."  You are
>requesting that the compiler assume the target requires strict alignment
>and then questioning why it is accessing a packed bit-struct assuming the
>least alignment.
>
>David
>
>  
>
Yes, I actually couldn't tell whether I should use -mno-strict-align or 
-mstrict-align from the explanation in GCC documentation (thank you for 
your explanation) so I tried both, but it didn't matter at all. I guess 
I should have mentioned that before. Perhaps any other ideas? I feel it 
is something fundamental that I keep missing.

Yaro

  reply	other threads:[~2006-01-30 12:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-29 17:16 David Edelsohn
2006-01-30 12:03 ` Yaro Pollak [this message]
2006-02-02 16:13   ` David Edelsohn
  -- strict thread matches above, loose matches on Subject: below --
2006-02-05 18:35 John Yates
2006-02-05 21:02 ` David Edelsohn
2006-02-06 10:18   ` Yaro Pollak
2006-02-01 12:03 [Re: Unaligned access to packed structs on ppc405] Yaro Pollak
2006-02-04  4:25 ` Unaligned access to packed structs on ppc405 David Edelsohn
2006-01-30 16:18 Matthew Jones
2006-01-30 16:26 ` Yaro Pollak
2006-01-29 10:00 Yaro Pollak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43DE006E.2040803@altair-semi.com \
    --to=yarop@altair-semi.com \
    --cc=dje@watson.ibm.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).