ivopts-caused "unrecognized insn"
Cynbe ru Taren
cynbe@muq.org
Wed Sep 26 00:32:00 GMT 2012
If I augment the problematic
(define_insn "addsi3"
[(set (match_operand:SI 0 "register_operand" "=r,r")
(plus:SI (match_operand:SI 1 "register_operand" "%r,r")
(match_operand:SI 2 "arith_operand" "r,I")))]
""
"add%i2\\t%0, %1, %z2"
[(set_attr "type" "alu")])
in my nios2.md file with
(define_insn "*addsi3"
[(set (match_operand:SI 0 "register_operand" "=r")
(plus:SI (match_operand:SI 1 "register_operand" "%r")
(match_operand:SI 2 "const_int_operand" "i")))]
""
"movhi\\tat, %H2\;addi\\tat, at, %L2\;add\\t%0, %1, at"
[(set_attr "type" "alu")])
the "unrecognized insn" problem is in fact resolved -- compilation
runs to completion. So that provides some support for my tentative
diagnosis and solution approach.
This solution is unclean in that it abuses the reserved Nios2 assembly
temp register "at".
So I need to work out how to use a gcc scratch register instead.
That should be a fairly straightforward exercise. (I do wish the
gccint reference manual was a bit clearer on the subject, or that I
could find a helpful tutorial, but experimentation and poking through
existing .md files should clarify things eventually.)
-- Cynbe
More information about the Gcc-help
mailing list