public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Packing booleans?
@ 2005-05-04  7:51 Sam Lauber
  2005-05-04 10:55 ` Nathan Sidwell
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sam Lauber @ 2005-05-04  7:51 UTC (permalink / raw)
  To: gcc

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

Samuel Lauber
-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

Powered by Outblaze

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Packing booleans?
@ 2005-05-05  1:58 Sam Lauber
  0 siblings, 0 replies; 8+ messages in thread
From: Sam Lauber @ 2005-05-05  1:58 UTC (permalink / raw)
  To: gcc

> Unless you are using an architecture with btst, bset, bclr instructions.
Pretty much any architechure that could be called a binary computer has 
something like that ;-)

Samuel Lauber
-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

Powered by Outblaze

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Packing booleans?
@ 2005-05-05  2:35 Sam Lauber
  0 siblings, 0 replies; 8+ messages in thread
From: Sam Lauber @ 2005-05-05  2:35 UTC (permalink / raw)
  To: gcc

> If this were being done at the level of register allocation, why would
> one need a user visible option?  'Just' rearrange the register file to look
> like a set of single bit registers overlaid on a more conventional register
> file.
As someone pointed out, this might change semantics (read: screw up ;-)
of the * and & operators: &somebool, though it would be placed into memory,
wouldn't deserve an address, since most[1] architechures aren't bit-
adressable.  

Samuel Lauber

[1] I said ``some'', not ``all'', because the TMS340x0 port is.  
-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 8 at http://www.opera.com

Powered by Outblaze

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-05-05  1:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-04  7:51 Packing booleans? Sam Lauber
2005-05-04 10:55 ` Nathan Sidwell
2005-05-04 12:25   ` Mattias Karlsson
2005-05-04 12:57     ` Nathan Sidwell
2005-05-04 12:22 ` Nix
2005-05-04 12:31 ` Richard Guenther
2005-05-05  1:58 Sam Lauber
2005-05-05  2:35 Sam Lauber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).