mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-26 04:40:39 +02:00
nv50/ir: don't emit src2 in immediate form
In the immediate form, src2 == dst, so it does not need to be emitted. Otherwise it overlaps with the immediate value's low bits. Fixes:09ee907266(nv50/ir: Fold IMM into MAD) Cc: "10.6" <mesa-stable@lists.freedesktop.org> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> (cherry picked from commitc3215ef204)
This commit is contained in:
parent
6902a36d22
commit
1e8c43f4d0
1 changed files with 2 additions and 2 deletions
|
|
@ -550,7 +550,7 @@ CodeEmitterNV50::emitForm_MUL(const Instruction *i)
|
|||
}
|
||||
|
||||
// usual immediate form
|
||||
// - 1 to 3 sources where last is immediate (rir, gir)
|
||||
// - 1 to 3 sources where second is immediate (rir, gir)
|
||||
// - no address or predicate possible
|
||||
void
|
||||
CodeEmitterNV50::emitForm_IMM(const Instruction *i)
|
||||
|
|
@ -566,7 +566,7 @@ CodeEmitterNV50::emitForm_IMM(const Instruction *i)
|
|||
if (Target::operationSrcNr[i->op] > 1) {
|
||||
setSrc(i, 0, 0);
|
||||
setImmediate(i, 1);
|
||||
setSrc(i, 2, 1);
|
||||
// If there is another source, it has to be the same as the dest reg.
|
||||
} else {
|
||||
setImmediate(i, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue