Question about Machine Description

Ian Lance Taylor iant@google.com
Mon May 10 04:43:00 GMT 2010


yazdanbakhsh <amir.yazdanbakhsh@gmail.com> writes:

> (define_insn "*bltdf"
>   [(set (pc)
> 	(if_then_else (lt:SI (match_operand:DF 1 "" "")
> 			     (match_operand:DF 2 "" ""))
> 	(match_operand 3 "pc_or_label_operand" "")
> 	(match_operand 4 "pc_or_label_operand" "")))]
>   ""
>
>   "*
> {
>   ss_branch_likely = (final_sequence && INSN_ANNULLED_BRANCH_P (insn));
>   return (operands[3] != pc_rtx)
> 	? \"blt\\t%z1,%z2,%3\"
> 	: \"blt\\t%z1,%z2,%4\";
> }"
> )

This define_insn looks wrong.  There are no operand predicates.  There
are no operand constraints.  A define_expand does not need those; a
define_insn does.


> _fixunsdfdi
> /tmp/ccrWquNC.s: Assembler messages:
> /tmp/ccrWquNC.s:169: Error: illegal operands `blt'
> /tmp/ccrWquNC.s:231: Error: illegal operands `blt'
> make: *** [libgcc2.a] Error 1

If you look carefully at the make log, you will see the compilation
command that is being run.  Run that command with the --save-temps
option.  Look at the resulting libgcc2.s file.  Make sure the blt
instructions looks right.

I assume that you have tested your assembler to confirm that it
handles blt as you want it to.

Ian



More information about the Gcc mailing list