nv50/ir: fix emitting movs from imm to short registers

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 14:17:55 -05:00
parent 2ff2d65799
commit c6b02c097f
1 changed files with 5 additions and 2 deletions

View File

@ -779,12 +779,15 @@ CodeEmitterNV50::emitMOV(const Instruction *i)
emitFlagsWr(i);
} else
if (sf == FILE_IMMEDIATE) {
code[0] = 0x10008001;
code[0] = 0x10000001;
code[1] = 0x00000003;
emitForm_IMM(i);
code[0] |= (typeSizeof(i->dType) == 2) ? 0 : 0x00008000;
} else {
if (i->encSize == 4) {
code[0] = 0x10008000;
code[0] = 0x10000000;
code[0] |= (typeSizeof(i->dType) == 2) ? 0 : 0x00008000;
defId(i->def(0), 2);
} else {
code[0] = 0x10000001;