Re: powerpc gcc strange assembler for bitfields

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

 



* Nathan Sidwell:

> Pete James wrote:
>
>> So my questions are:
>> How can I force GCC to create code that works on the whole 16bit word?
>> Or is there another way of doing it?
>
> If it is important that you have exact control over the memory
> accesses, don't do the union of bitfields overlay trick.  Use
> explicit and/or masking.

Ahem, you (or Pete) should use explicit assembler instructions if you
want to make sure that you end up with certain instructions.

Future compiler versions might optimize the explicit masking as well.
(Even the volatile keyword would not prevent this.)

[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