nvc0/ir/emit: fix check for flags register use in logic ops
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 8 Dec 2012 14:06:43 +0000 (15:06 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sat, 8 Dec 2012 21:46:37 +0000 (22:46 +0100)
src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp

index 92496a3b6d808a84e191545c9a9d8de631c3c86a..ab4fb9498d9c69e7b81d82aca3b169f49f86de23 100644 (file)
@@ -647,17 +647,17 @@ CodeEmitterNVC0::emitLogicOp(const Instruction *i, uint8_t subOp)
       if (isLIMM(i->src(1), TYPE_U32)) {
          emitForm_A(i, HEX64(38000000, 00000002));
 
-         if (i->srcExists(2))
+         if (i->flagsDef >= 0)
             code[1] |= 1 << 26;
       } else {
          emitForm_A(i, HEX64(68000000, 00000003));
 
-         if (i->srcExists(2))
+         if (i->flagsDef >= 0)
             code[1] |= 1 << 16;
       }
       code[0] |= subOp << 6;
 
-      if (i->srcExists(2)) // carry
+      if (i->flagsSrc >= 0) // carry
          code[0] |= 1 << 5;
 
       if (i->src(0).mod & Modifier(NV50_IR_MOD_NOT)) code[0] |= 1 << 9;