This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to define predicates for the particular set of registers?
- From: "Alexander Aganichev" <aaganichev at yandex dot ru>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 27 May 2003 17:02:21 +0400 (MSD)
- Subject: How to define predicates for the particular set of registers?
- Reply-to: aaganichev at yandex dot ru
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