Porting GCC to new target
Ian Lance Taylor
Fri Dec 5 14:04:00 GMT 2003
Savithri Venkatachalapathy <email@example.com> writes:
> While porting gcc to new target, I am not able to
> figure how to handle branch instructions.
> The .md descriptions of the bne, beq instructions take
> 3 rtx parameters while the expr.c, stmt.c, rtl.h,
> loop.c, unroll.c and optabe.c files have gen-beq(),
> gen-bne() prototypes which take only 1 rtx parameter.
> Hence when I try to 'make' it gives error saying that
> the prototypes of gen-beq() in the files mentioned
> above does not match with the prototype from the .md
> Could anybody tell me how to overcome this. DO I need
> to download different versions of the 6 files
> mentioned above which have branch prototypes taking 3
Some machines have compare-and-branch instructions and no
condition code. A similar technique works for them. When it is
time to "output" a compare instruction, record its operands in two
static variables. When outputting the branch-on-condition-code
instruction that follows, actually output a compare-and-branch
instruction that uses the remembered operands.
See, e.g., the MIPS target "cmpsi" and "beq" patterns.
More information about the Gcc-help