From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 606 invoked by alias); 29 Jan 2006 17:16:54 -0000 Received: (qmail 597 invoked by uid 22791); 29 Jan 2006 17:16:52 -0000 X-Spam-Check-By: sourceware.org Received: from igw2.watson.ibm.com (HELO igw2.watson.ibm.com) (129.34.20.6) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 29 Jan 2006 17:16:37 +0000 Received: from sp1n293en1.watson.ibm.com (sp1n293en1.watson.ibm.com [129.34.20.41]) by igw2.watson.ibm.com (8.12.11/8.13.1/8.13.1-2005-04-25 igw) with ESMTP id k0THGV9q004416; Sun, 29 Jan 2006 12:16:35 -0500 Received: from sp1n293en1.watson.ibm.com (localhost [127.0.0.1]) by sp1n293en1.watson.ibm.com (8.11.7-20030924/8.11.7/01-14-2004_2) with ESMTP id k0THGS5405646; Sun, 29 Jan 2006 12:16:28 -0500 Received: from mgsmtp00.watson.ibm.com (mgsmtp00.watson.ibm.com [9.2.40.58]) by sp1n293en1.watson.ibm.com (8.11.7-20030924/8.11.7/01-14-2004_1) with ESMTP id k0THGQo297308; Sun, 29 Jan 2006 12:16:27 -0500 Received: from makai.watson.ibm.com (makai.watson.ibm.com [9.2.216.144]) by mgsmtp00.watson.ibm.com (8.12.11/8.12.11/2005/09/01) with ESMTP id k0TIFfud024432; Sun, 29 Jan 2006 13:15:41 -0500 Received: from watson.ibm.com (localhost [127.0.0.1]) by makai.watson.ibm.com (AIX5.1/8.11.6p2/8.11.0/03-06-2002) with ESMTP id k0THGPD31684; Sun, 29 Jan 2006 12:16:25 -0500 Message-Id: <200601291716.k0THGPD31684@makai.watson.ibm.com> To: Yaro Pollak cc: gcc-help@gcc.gnu.org Subject: Re: Unaligned access to packed structs on ppc405 Date: Sun, 29 Jan 2006 17:16:00 -0000 From: David Edelsohn Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-01/txt/msg00234.txt.bz2 >>>>> 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