From: Christoph Bumiller Date: Sat, 8 Dec 2012 14:06:43 +0000 (+0100) Subject: nvc0/ir/emit: fix check for flags register use in logic ops X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c6584b9968ff1af0798d0a783142052b43c1dc0;p=mesa.git nvc0/ir/emit: fix check for flags register use in logic ops --- diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp index 92496a3b6d8..ab4fb9498d9 100644 --- a/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp +++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_emit_nvc0.cpp @@ -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;