From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22294 invoked by alias); 16 Nov 2011 11:10:47 -0000 Received: (qmail 22285 invoked by uid 22791); 16 Nov 2011 11:10:46 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ey0-f175.google.com (HELO mail-ey0-f175.google.com) (209.85.215.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Nov 2011 11:10:32 +0000 Received: by eyd9 with SMTP id 9so277355eyd.20 for ; Wed, 16 Nov 2011 03:10:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.0.199 with SMTP id 47mr2378915eeb.110.1321441830865; Wed, 16 Nov 2011 03:10:30 -0800 (PST) Received: by 10.14.28.7 with HTTP; Wed, 16 Nov 2011 03:10:30 -0800 (PST) Date: Wed, 16 Nov 2011 15:06:00 -0000 Message-ID: Subject: Forcing memory mode to some addresses From: Aurelien Buhrig To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-11/txt/msg00166.txt.bz2 Hi, I would like to force accesses to some memory variables in a specific mode. For example, I would like GCC to access a 16-bit wide hardware register always in HImode when using a 16bit wide bitfield struct... Currently, GCC can accesses part of this memory structure using QImode, which is not always permitted. Is there a way to do it using an attribute ? Or perhaps another way ? If a target specific attribute must be defined, what should it control, and how to recognized it in my backend ? Thanks, Aur=E9lien