Full comparison in 'cbranchsi4' leads to error in gcc 4.0
Sami Khawam
S.Khawam@ee.ed.ac.uk
Mon May 9 15:59:00 GMT 2005
Hi,
I am porting gcc (version 4.0) to a CPU supporting conditional jumps, which does
not have a CC register. I have combined the comparision and jump operation in
the definition of "cbranchsi4" as show at the end of this message.
This works fine on gcc 3.4, however on gcc 4.0 it creates an error during
optimization. According to my investigation, the error occurs when there is a
division by a constant power of 2 which needs to be transformed into shifting.
The error generated is:
internal compiler error: in emit_cmp_and_jump_insn_1, at optabs.c:3599
The definition of cbranchsi4 in the machine-description:
(define_insn "cbranchsi4"
[(set (pc) (if_then_else
(match_operator 0 "comparison_operator"
[(match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "nonmemory_operand" "r")])
(label_ref (match_operand 3 "" ""))
(pc)))]
""
"c%C0jump %1 %2 %3"
[(set_attr "type" "branch")
(set_attr "length" "1")]
)
Regards,
Sami Khawam
The University of Edinburgh
http://www.see.ed.ac.uk/~sxk
More information about the Gcc
mailing list