* Supporting an instruction in the back-end - II
@ 2008-05-14 4:49 Mohamed Shafi
2008-05-14 9:39 ` Dave Korn
2008-05-19 19:10 ` Michael Meissner
0 siblings, 2 replies; 3+ messages in thread
From: Mohamed Shafi @ 2008-05-14 4:49 UTC (permalink / raw)
To: GCC
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?
Thanks for your time.
Regards,
Shafi.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Supporting an instruction in the back-end - II
2008-05-14 4:49 Supporting an instruction in the back-end - II Mohamed Shafi
@ 2008-05-14 9:39 ` Dave Korn
2008-05-19 19:10 ` Michael Meissner
1 sibling, 0 replies; 3+ messages in thread
From: Dave Korn @ 2008-05-14 9:39 UTC (permalink / raw)
To: 'Mohamed Shafi', 'GCC'
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....
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Supporting an instruction in the back-end - II
2008-05-14 4:49 Supporting an instruction in the back-end - II Mohamed Shafi
2008-05-14 9:39 ` Dave Korn
@ 2008-05-19 19:10 ` Michael Meissner
1 sibling, 0 replies; 3+ messages in thread
From: Michael Meissner @ 2008-05-19 19:10 UTC (permalink / raw)
To: Mohamed Shafi; +Cc: GCC
On Wed, May 14, 2008 at 10:18:56AM +0530, Mohamed Shafi wrote:
> 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?
The standard name to extract a bit field is 'extv' (for sign extended
extraction), and 'extzv' (for zero extended extraction). The standard to set a
bit field is 'insv'. There are 18 different ports that support 'extv' or
'extzv' in some fashion, and 20 different ports that support 'insv'.
--
Michael Meissner, AMD
90 Central Street, MS 83-29, Boxborough, MA, 01719, USA
michael.meissner@amd.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-19 19:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-14 4:49 Supporting an instruction in the back-end - II Mohamed Shafi
2008-05-14 9:39 ` Dave Korn
2008-05-19 19:10 ` Michael Meissner
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).