From 42c81e190111f77c8231bb18c87ce90492d12a93 Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Tue, 16 Mar 2021 17:23:45 +0200 Subject: [PATCH] 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 Part-of: --- src/freedreno/ir3/ir3_context.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/freedreno/ir3/ir3_context.c b/src/freedreno/ir3/ir3_context.c index ff4cd0e9313..fd49d608370 100644 --- a/src/freedreno/ir3/ir3_context.c +++ b/src/freedreno/ir3/ir3_context.c @@ -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;