This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: operating on individual register bits
- To: Ben Elliston <bje at redhat dot com>
- Subject: Re: operating on individual register bits
- From: Johan Rydberg <johan dot rydberg at netinsight dot se>
- Date: Fri, 18 May 2001 14:00:43 +0200
- CC: cgen at sources dot redhat dot com
- Organization: Net Insight AB
- References: <15108.51009.551848.162882@scooby.apac.redhat.com>
Ben Elliston wrote:
>
> 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.
To my knowledge there is no such rtx fns. Looking at your reply to
the same question asked by me some time ago:
http://sources.redhat.com/ml/cgen/2001-q1/msg00062.html
> 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?
That would be great!
regards,
johan