This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Packing booleans?


On Wed, 4 May 2005, Nathan Sidwell wrote:

Sam Lauber wrote:
Would it be possible to have a -fpack-bools option that packs booleans into
the smallest form possible (8 booleans -> 1 8-bit reg, etc.) into a register
(or memory, as the case may be)?

why would you want to do this? Seems to me you might save up to 7 bytes of data memory at a vastly greater expansion of code size and reduction in performance.

Unless you are using an architecture with btst, bset, bclr instructions.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]