freedreno/ir3/parser: Add stgb support

Note that this conflicts with `stc` on a6xx+, so a good test that the
(new) disasm can handle both cases properly.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8175>
This commit is contained in:
Rob Clark 2021-01-03 10:08:21 -08:00 committed by Marge Bot
parent eddfafae6a
commit d6fa130dda
2 changed files with 6 additions and 1 deletions

View File

@ -956,9 +956,11 @@ cat6_atomic: cat6_atomic_g
cat6_ibo_opc_1src: T_OP_RESINFO { new_instr(OPC_RESINFO)->cat6.type = TYPE_U32; }
cat6_ibo_opc_ldgb: T_OP_LDGB { new_instr(OPC_LDGB); }
cat6_ibo_opc_stgb: T_OP_STGB { new_instr(OPC_STGB); }
cat6_ibo: cat6_ibo_opc_1src cat6_dim dst_reg ',' 'g' '[' cat6_reg_or_immed ']'
| cat6_ibo_opc_ldgb cat6_typed cat6_dim cat6_type '.' cat6_immed dst_reg ',' 'g' '[' cat6_reg_or_immed ']' ',' reg ',' reg
| cat6_ibo_opc_stgb cat6_typed cat6_dim cat6_type '.' cat6_immed { dummy_dst(); } 'g' '[' cat6_reg_or_immed ']' ',' reg ',' cat6_reg_or_immed ',' reg
cat6_id_opc:
T_OP_GETSPID { new_instr(OPC_GETSPID); }
@ -1008,7 +1010,6 @@ cat6_bindless_ldc: cat6_bindless_ldc_opc '.' T_OFFSET '.' cat6_immed '.' cat6_bi
cat6_todo: T_OP_G2L { new_instr(OPC_G2L); }
| T_OP_L2G { new_instr(OPC_L2G); }
| T_OP_RESFMT { new_instr(OPC_RESFMT); }
| T_OP_STGB { new_instr(OPC_STGB); }
cat6_instr: cat6_load
| cat6_store

View File

@ -199,6 +199,10 @@ static const struct test {
INSTR_5XX(c6ea0008_14002600, "ldgb.untyped.4d.s32.3 r2.x, g[0], r0.x, r5.x"), /* ldgb.a.untyped.1dtype.s32.3 r2.x, g[r0.x], r5.x, 0 */
INSTR_5XX(c6ea0204_1401a600, "ldgb.untyped.4d.s32.3 r1.x, g[1], r1.z, r5.x"), /* ldgb.a.untyped.1dtype.s32.3 r1.x, g[r1.z], r5.x, 1 */
/* stgb */
INSTR_5XX(c7220028_0480000d, "stgb.untyped.1d.f32.1 g[0], r1.z, 4, r10.x"), /* stgb.untyped.1d.1 g[r10.x], r1.z, 4, r0.x */
INSTR_5XX(c7260023_02800009, "stgb.untyped.1d.u32.1 g[0], r1.x, 2, r8.w"), /* stgb.untyped.1d.1 g[r8.w], r1.x, 2, r0.x */
/* discard stuff */
INSTR_6XX(42b400f8_20010004, "cmps.s.eq p0.x, r1.x, 1"),
INSTR_6XX(02800000_00000000, "kill p0.x"),