gm107/ir: make use of ADD32I for all immediates
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 19 Jul 2016 12:47:57 +0000 (14:47 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 19 Jul 2016 16:07:15 +0000 (18:07 +0200)
ADD only allows to emit 19-bits immediates.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp

index 5ae189873ad365ede9ee935e341d1578374a93fd..6904eba0ca76248ef56e86051d88099b686b48c7 100644 (file)
@@ -1682,7 +1682,7 @@ CodeEmitterGM107::emitNOT()
 void
 CodeEmitterGM107::emitIADD()
 {
-   if (!longIMMD(insn->src(1))) {
+   if (insn->src(1).getFile() != FILE_IMMEDIATE) {
       switch (insn->src(1).getFile()) {
       case FILE_GPR:
          emitInsn(0x5c100000);