This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Modeling predicate registers with more than one bit
- From: "Paulo Matos" <pmatos at broadcom dot com>
- To: "Oleg Endo" <oleg dot endo at t-online dot de>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 26 Mar 2013 15:20:14 +0000
- Subject: RE: Modeling predicate registers with more than one bit
- References: <19EB96622A777C4AB91610E763265F461AE5A2 at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <1362227397 dot 2323 dot 13 dot camel at yam-132-YW-E178-FTW>
Hi, sorry for the delay of this reply but just returned from paternity leave.
>
> Have you had a look at the SH backend? SH cores have a "T Bit"
> register, which functions as carry bit, over/underflow, comparison
> result and branch condition register. In the SH backend it's treated as
> a fixed SImode hard-reg (although BImode would suffice in this case, I
> guess).
> <sh patterns>
I have looked at sh but didn't fully understand how it worked. Your explanation made it clear.
>
> The predicate is for matching various forms of T bit negation patterns.
>
> Maybe you could try the same approach for your case.
> If your predicate register has multiple independent bit(fields), you
> could try defining separate hard-regs for every bit(field).
>
It sounds that could be what I want. I probably need not different hard-regs but different pseudos (since I have different pseudo regs) at different modes (since the register might be set differently depending of the mode of the comparison).
That seems to be the way to go.
Cheers,
Paulo Matos