This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Forcing memory mode to some addresses
- From: Aurelien Buhrig <aurelien dot buhrig dot gcc at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 16 Nov 2011 12:10:30 +0100
- Subject: Forcing memory mode to some addresses
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élien