gm107/ir: make sure that flagsDef is set when emitting setcond

Rely on the existence of a second destination when emitting a setcond
flag is dangerous, because this doesn't mean that the flag has been
correctly set. Instead rely on flagsDef like what emitX() does
for flagsSrc.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
This commit is contained in:
Samuel Pitoiset 2016-06-28 00:59:46 +02:00
parent 234323558d
commit cc97b6a34a
1 changed files with 1 additions and 1 deletions

View File

@ -420,7 +420,7 @@ CodeEmitterGM107::emitSAT(int pos)
void
CodeEmitterGM107::emitCC(int pos)
{
emitField(pos, 1, insn->defExists(1));
emitField(pos, 1, insn->flagsDef >= 0);
}
void