gm107/ir: make use of IMUL32I for all immediates
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sun, 26 Jun 2016 16:42:22 +0000 (18:42 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sun, 26 Jun 2016 15:33:06 +0000 (17:33 +0200)
IMUL only allows to emit 19-bits immediates. This is similar to
d30768025a2283d4cc57930b784798bf278969da which fixed the same thing
for the GK110 emitter.

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 ef02dbb4c63fb28b93b456fe28e9beb75be0e685..1010ecfe927d0826f0ec6c4f295933b31978e94a 100644 (file)
@@ -1719,7 +1719,7 @@ CodeEmitterGM107::emitIADD()
 void
 CodeEmitterGM107::emitIMUL()
 {
-   if (!longIMMD(insn->src(1))) {
+   if (insn->src(1).getFile() != FILE_IMMEDIATE) {
       switch (insn->src(1).getFile()) {
       case FILE_GPR:
          emitInsn(0x5c380000);