On 08/23/2011 11:37 AM, Konstantin Vladimirov wrote:
> Hi, all
> 
> Consider architecture, where *any* data register have associated flag
> field. I.e. any register may be used as a data store to further use,
> and as a flag keeper to further branch.

I don't understand what you mean by "data store".

If any register can hold flags for a branch, that is *easy* to use.
The easiest possible.  You simply allow CCmode as a valid mode for
your general purpose registers and allow any register to be used for
the branch.  The register allocator will take care of the rest.

Both PowerPC and MIPS have multiple flags registers.  They're not
general purpose registers, but the mere fact that they are arranged
to let the register allocator work should be enough to show you how.

> Do you have any ideas how to
> utilize this property in GCC machine description? May be any examples
> of existing similar machines? I tried to introduce new CC mode, like
> CC_DATA, but I can not explain to compiler, that given register may
> have CCmode and SImode (or any other data mode -- HI, QI, DI) at the
> same time

Huh?  Either your description is incomplete, or there's confusion.


r~

Reply via email to