This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cmp and bcond patterns in md
- To: Soubhik Bhattacharya <soubhik at cse dot iitk dot ac dot in>
- Subject: Re: cmp and bcond patterns in md
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 11 May 2001 21:30:27 -0300
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Organization: GCC Team, Red Hat
- References: <Pine.LNX.4.21.0105111514250.1100-100000@cseproj22.cse.iitk.ac.in>
On May 11, 2001, Soubhik Bhattacharya <soubhik@cse.iitk.ac.in> wrote:
> this single machine instr does the work of both cmp and bcond
> patterns. so can i simply specify the assembly template of cmp as a
> null string (or nop) and then generate the branch instr with the
> bcond pattern?
Yep. Make cmp be a define_expand that saves the operands in some
global variable and expands to nothing, and get bCOND to use the saved
operands. Have a look at "cmpsi" and the various bCOND insns in the
SH port for an example.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me