nv50/ir/ra: improve condition for short regs, unify with cond for 16-bit
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 11 Nov 2018 15:55:55 +0000 (10:55 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sat, 17 Nov 2018 01:53:33 +0000 (20:53 -0500)
commit799e021894a0e23e3017bf0cbb8780190f3e5646
treedaa46b45260faf9d4d53c36f88586c82b01fb21a
parent955d943c33d55ebb469efaeb5710d42e267b121a
nv50/ir/ra: improve condition for short regs, unify with cond for 16-bit

Instead of the size restriction existing in two places, and potentially
being applied twice, we move this together. Ops with 16-bit register
addresses can only take a short reg, and ops with immediates can only
take a short reg.

Of course we leave the immediate 0 in place since we know that it will
be replaced by r63/r127 down the line, so don't treat zeroes as an
immediate.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp