"Rohit Arul Raj" <[EMAIL PROTECTED]> writes:

> I am trying to combine the compare and branch instruction. But my
> instructions are not getting generated as my operands are not matched
> properly.
> 
> Previously for individual compare instructions, i had
> operand 0 - Register operand
> operand 1 - Non memory operand.
> 
> For branch instruction,
> operator 0 - compare operator
> operand 1 - label.
> 
> So when i combined compare and branch, i just superimposed both
> statements with same conditions with
> operand 0 - Register operand
> operand 1 - Non memory operand
> operator 2 - comparison operator
> operand 3 - label.
> 
> 1. Is it the right way to match operands and operators while combining
> instruction?
> 2. How to check where my instruction matching goes wrong?

When writing an MD file you have to think about what you generate
(insns/expanders with standard names) and what you recognize (insns).
You have to always generate something which you can recognize.

Anyhow, the easier way to generate a combined compare and branch
instruction is to use an insn or expander with the cbranchMM4 standard
name.  See the documentation.

Ian

Reply via email to