Liu Haibin wrote:
to "c". However, it seems very difficult here. The old insn patterns
are all general registers, but the new insn patterns are defined as
custom registers.
The peephole pass does not do register allocation. So you can't use it
to magically change "r" registers to "c" register
Thanks. I modified the related macros, like reg_class,
REG_CLASS_FROM_LETTER(CHAR) and so on. But I have a problem on
define_peephole2.
After I modified the related macros, I replaced the "r" in
"custom_inii" with "c".
(define_insn "custom_inii"
[(set (match_operand:SI 0 "register_operand" "=
Liu Haibin wrote:
(match_operand:SI 2 "register_operand" "r")
But the problem is it uses normal register, like r8, r9. How can I
write the define_peephole2 so that it uses custom registers?
See the "Constraints" section of the documentation. "r" means a general
reg
Hi,
nios2 has a set of custom registers for custom instructions. They all
start with "c", like
custom 1 c4, c2, c0
I want to define a peephole to replace a sequence of codes with this
above custom instruction.
custom instruction is defined as following in nios2.md
(define_insn "custom_inii"