summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2015-11-25 23:36:23 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2015-12-02 20:41:38 -0500
commit6c6f28c35e793e098757cfa8fbc860961d52f9e7 (patch)
treec2d12e04b60f9f0c183fbb0640d428c6c784e741 /src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
parent101e315cc167b0b00319aa70f64c49470e2525f8 (diff)
nv50/ir: fix moves to/from flags
Noticed this when looking at a trace that caused flags to spill to/from registers. The flags source/destination wasn't encoded correctly according to both envydis and nvdisasm. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
index 16d87e3e762..143fd5107f2 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -1599,6 +1599,8 @@ SpillCodeInserter::spill(Instruction *defi, Value *slot, LValue *lval)
st = new_Instruction(func, OP_CVT, ty);
st->setDef(0, slot);
st->setSrc(0, lval);
+ if (lval->reg.file == FILE_FLAGS)
+ st->flagsSrc = 0;
}
defi->bb->insertAfter(defi, st);
}
@@ -1640,6 +1642,8 @@ SpillCodeInserter::unspill(Instruction *usei, LValue *lval, Value *slot)
}
ld->setDef(0, lval);
ld->setSrc(0, slot);
+ if (lval->reg.file == FILE_FLAGS)
+ ld->flagsDef = 0;
usei->bb->insertBefore(usei, ld);
return lval;