[Mesa-dev] [PATCH 2/2] gm107/ir: make use of IADD32I for all immediates
Samuel Pitoiset
samuel.pitoiset at gmail.com
Sun Jun 26 22:00:51 UTC 2016
On 06/26/2016 11:55 PM, Ilia Mirkin wrote:
> On Sun, Jun 26, 2016 at 5:49 PM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>>
>>
>> On 06/26/2016 11:46 PM, Ilia Mirkin wrote:
>>>
>>> We don't appear to handle src(0) having a neg modifier in the
>>> immediate case. Does the insnCanLoad logic account for that? (Perhaps
>>> the bit is there and we just forgot about it?)
>>
>>
>> I don't see any neg modifier in envydis for IADD32I.
>
> Well, isModSupported() will happily generate such instructions:
>
> case OP_ADD:
> if (mod.abs())
> return false;
> if (insn->src(s ? 0 : 1).mod.neg())
> return false;
> break;
>
> and insnCanLoad:
>
> case TYPE_S32:
> case TYPE_U32:
> // with u32, 0xfffff counts as 0xffffffff as well
> if (reg.data.s32 > 0x7ffff || reg.data.s32 < -0x80000)
> return false;
> break;
>
Cool, but I will double check with nvidiasm.
More information about the mesa-dev
mailing list