public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* operating on individual register bits
@ 2001-05-17 23:55 Ben Elliston
  2001-05-18  5:00 ` Johan Rydberg
  2001-05-18  7:54 ` Doug Evans
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Elliston @ 2001-05-17 23:55 UTC (permalink / raw)
  To: cgen

Frequently, I find myself wanting to set and clear individual bits of
hardware registers in rtl.  Perhaps such a mechanism already exists.
If it does, I'm not aware of it.  Here is the canonical example:

	 (set cc.z 1)

versus:

	(set cc (or cc (sll SI 1 10))),

which makes much less sense to the reader.

Is it sensible to extend cgen to give names to individual bits of a
register such that operands on registers can adopt this C/Pascal-style
syntax for accessing individual bits?

Ben

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

end of thread, other threads:[~2001-05-18  7:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-17 23:55 operating on individual register bits Ben Elliston
2001-05-18  5:00 ` Johan Rydberg
2001-05-18  7:54 ` Doug Evans

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