"Mohamed Shafi" <[EMAIL PROTECTED]> writes: > For the 16-bit target that i porting now to gcc 4.1.2 doesn't have any > branch instructions. It only has jump instructions. For comparison > operation it has this instruction: > > if cond Rx Ry > execute this insn > > So compare and branch is implemented as > > if cond Rx Ry > jmp Label
For gcc's purposes this is no different from having a usual conditional branch instruction. It's just a jump with a condition. > This instructions has also another form. To check whether a particular > bit in a register is set or not. > > if bs Rx, bitNo > execute this insn > > My questions is how will i be able to implement this instruction in > the back-end? Sure, this is just a conditional instruction where the condition is a ZERO_EXTRACT. Look at the ARM backend for examples of how to work with conditional instructions. Ian