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: Supporting an instruction in the back-end - II


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


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