This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Supporting an instruction in the back-end - II
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'Mohamed Shafi'" <shafitvm at gmail dot com>, "'GCC'" <gcc at gcc dot gnu dot org>
- Date: Wed, 14 May 2008 10:38:42 +0100
- Subject: RE: Supporting an instruction in the back-end - II
- References: <ba0bd44d0805132148y61c2685eh1d4f9ffb7cc2571@mail.gmail.com>
Mohamed Shafi wrote on 14 May 2008 05:49:
> Hello all,
>
> Will it be possible to write a pattern in the md file to support
> setting/clearing a bit of a particular register?
> The instructions are as follows:
>
> clrb Rx, bitNo
> setb Rx, bitNo
>
> Could you point me to the back-ends that has support for this kind of
> instructions?
m68k has that kind of insn, you could take a look there. It's probably
represented by some canonical rtl form for the full expression such as
(set (dest)
(andMM3 (dest)
(not (lshift (const_int 1)
(bitNo)))))
and likewise for setb.
cheers,
DaveK
--
Can't think of a witty .sigline today....