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]

How to define predicates for the particular set of registers?


Hi!

I wonder how to define predicates for the particular set of registers?
For example, if insn should accept only stack pointer register should
I check the operand like this:

REG_P (operand) && (REGNO (operand) == SP_REGISTER)

or this:

(operand == stack_pointer_rtx)

or should I do something like that:

register_operand (operand, mode)
&& (!REG_P (operand) || (REGNO (operand) == SP_REGISTER))

because of register_operand contains some logic on handling
SUBREGs and RTLs which will be reloaded?

I'm still looking for a good step-by-step guide on retargetting
GCC. May be there's some minimalistic requirements for the
.md file and hints how to grow it and test what you adding?

--
Alexander Aganichev

url: http://aaganichev.narod.ru
e-mail: aaganichev@yandex.ru
gsm: +7-095-786-1339


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