This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to write a define_peephole2 that uses custom registers innios2


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 register. If you want a custom register, then you need to use a contraint letter that maps to a custom register.


If the port does not already support custom registers, then you need to modify many of the register allocation related macros to add support for the custom registers. See the "Registers" and "Register Classes" sections of the documentation.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]