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]

Re: cmp and bcond patterns in md


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


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