[Mesa-dev] [PATCH 4/8] R600/SI: simplify VOPC_* patterns

Michel Dänzer michel at daenzer.net
Tue Feb 19 06:46:14 PST 2013


On Die, 2013-02-19 at 14:54 +0100, Christian König wrote: 
> From: Christian König <christian.koenig at amd.com>
> 
> Fixing asm operation names.

[...]

> diff --git a/lib/Target/R600/SIInstrInfo.td b/lib/Target/R600/SIInstrInfo.td
> index be791e2..69357ce 100644
> --- a/lib/Target/R600/SIInstrInfo.td
> +++ b/lib/Target/R600/SIInstrInfo.td
> @@ -153,26 +153,31 @@ class SOPK_64 <bits<5> op, string opName, list<dag> pattern>
>    : SOPK <op, (outs SReg_64:$dst), (ins i16imm:$src0), opName, pattern>;
>  
>  multiclass VOPC_Helper <bits<8> op, RegisterClass vrc, RegisterClass arc,
> -                        string opName, list<dag> pattern> {
> +                        string opName, ValueType vt, PatLeaf cond> {
>  
> -  def _e32 : VOPC <op, (ins arc:$src0, vrc:$src1), opName, pattern>;
> +  def _e32 : VOPC <op, (ins arc:$src0, vrc:$src1), opName#"_e32", []>;
>    def _e64 : VOP3 <
>      {0, op{7}, op{6}, op{5}, op{4}, op{3}, op{2}, op{1}, op{0}},
>      (outs SReg_64:$dst),
>      (ins arc:$src0, vrc:$src1,
>           InstFlag:$abs, InstFlag:$clamp,
>           InstFlag:$omod, InstFlag:$neg),
> -    opName, pattern
> +    opName#"_e32",

I think this should be _e64, shouldn't it?

Also, while you're changing the asm strings, could you add the operands
to them?


>      let SRC2 = 0x80;

Hmm, we're scattering quite a few of these magic 0x80 around, would be
nice to make those more self-documenting somehow...


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the mesa-dev mailing list