Re: How to implement compare and branch instruction

2009-09-24 Thread Richard Henderson
On 09/24/2009 05:41 AM, Mohamed Shafi wrote: (define_expand "cmp" ... (define_expand "b" For the record, you should be combining these into a cbranch expander, so that you don't have to do the "save the cmp operands" trick anymore. (define_insn_and_split "compare_and_branch_insn" [(set

Re: How to implement compare and branch instruction

2009-09-24 Thread Paolo Bonzini
On 09/24/2009 02:41 PM, Mohamed Shafi wrote: How can i overcome this error? Remove the guilty alternatives, for example the d/L alternative, and make operand 2 a register_operand. Paolo

How to implement compare and branch instruction

2009-09-24 Thread Mohamed Shafi
Hello all, I am porting a 32bit target in GCC 4.4.0 The target has have distinct signed and unsigned compare instructions, and only one set of conditional branch instructions. Moreover the operands cannot be immediate values if the comparison is unsigned. I have implemented this using compare-and-