ir3: match mova1 mnemonic when writing to A1

For MOV to A1 blob uses "mova1" mnemonic, which is mov.u16u16;
change s16 to u16 when creating MOV to A1 in order to match the blob.

Before, couldn't be parsed back:
 mov.s16s16 ha0.y, 0

After, could be parsed back and matches blob behaviour:
 mova1 a1.x, 0

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9628>
This commit is contained in:
Danylo Piliaiev 2021-03-16 17:23:45 +02:00 committed by Marge Bot
parent c0a62b203e
commit 42c81e1901
1 changed files with 2 additions and 3 deletions

View File

@ -465,9 +465,8 @@ create_addr0(struct ir3_block *block, struct ir3_instruction *src, int align)
static struct ir3_instruction *
create_addr1(struct ir3_block *block, unsigned const_val)
{
struct ir3_instruction *immed = create_immed_typed(block, const_val, TYPE_S16);
struct ir3_instruction *instr = ir3_MOV(block, immed, TYPE_S16);
struct ir3_instruction *immed = create_immed_typed(block, const_val, TYPE_U16);
struct ir3_instruction *instr = ir3_MOV(block, immed, TYPE_U16);
instr->regs[0]->num = regid(REG_A0, 1);
instr->regs[0]->flags &= ~IR3_REG_SSA;
return instr;