How to define predicates for the particular set of registers?

Alexander Aganichev aaganichev@yandex.ru
Tue May 27 14:02:00 GMT 2003


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



More information about the Gcc mailing list