Re: Forcing memory mode to some addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aurelien Buhrig <aurelien.buhrig.gcc@xxxxxxxxx> writes:

> 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 ?

You should always use a volatile qualified pointer when accessing a
hardware register.  When you do that, gcc should always use the
appropriate mode.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux