nv50/ir: fix emission of shifts on half-regs

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Acked-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
This commit is contained in:
Ilia Mirkin 2021-02-24 22:15:32 -05:00
parent af8665c3a5
commit afcd296b1b
1 changed files with 3 additions and 1 deletions

View File

@ -1653,7 +1653,9 @@ CodeEmitterNV50::emitShift(const Instruction *i)
emitARL(i, i->getSrc(1)->reg.data.u32 & 0x3f);
} else {
code[0] = 0x30000001;
code[1] = (i->op == OP_SHR) ? 0xe4000000 : 0xc4000000;
code[1] = (i->op == OP_SHR) ? 0xe0000000 : 0xc0000000;
if (typeSizeof(i->dType) == 4)
code[1] |= 0x04000000;
if (i->op == OP_SHR && isSignedType(i->sType))
code[1] |= 1 << 27;