[Mesa-dev] [PATCH 10/12] R600/SI: cleanup literal handling

Christian König deathsimple at vodafone.de
Wed Feb 13 01:34:12 PST 2013


Am 13.02.2013 01:39, schrieb Tom Stellard:
> [SNIP]
>
> Way back when I first started working on the backend I was using
> immediate operands in instructions defined to only uses registers, and
> it worked most of the time, but I ran into a few cases where some of the
> passes weren't able to handle it.  So, I'm actually kind of surprised that this
> works, but it's a nice simplification in any case.

I stumbled over a couple of problems while coding it, but they were not 
related to the fact that I tried to put immediate values into operands 
that should only have registers. It was more that it surfaced a couple 
of other problems, for example we shouldn't use f64 as supported type in 
a RegisterClass and then forget to set a default class for f64 with 
"addRegisterClass", that can lead to a whole bunch of problems, 
including segfaults.

Actually when you look into the MCOperandInfo class the only difference 
between an immediate operand and an register operand is that registers 
have a RegClass. Apart from that this information is only available at 
pattern matching time, and there it doesn't seems to matter.

Christian.


More information about the mesa-dev mailing list