mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
freedreno/ir3: Disambiguate a6xx+ "bindless" instructions
Add a `.b`.. for the atomic instructions it should be `atomic.b.op` but for now put the `.b` at the end to simplify life for the existing disasm Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8175>
This commit is contained in:
parent
c55737902c
commit
101bf686ee
4 changed files with 56 additions and 6 deletions
|
|
@ -1280,6 +1280,28 @@ static void print_instr_cat6_a6xx(struct disasm_ctx *ctx, instr_t *instr)
|
|||
memset(&src2, 0, sizeof(src2));
|
||||
memset(&ssbo, 0, sizeof(ssbo));
|
||||
|
||||
/* disambiguate from pre-bindless variants: */
|
||||
switch (opc) {
|
||||
case OPC_RESINFO:
|
||||
case OPC_LDIB:
|
||||
case OPC_STIB:
|
||||
case OPC_ATOMIC_ADD:
|
||||
case OPC_ATOMIC_SUB:
|
||||
case OPC_ATOMIC_XCHG:
|
||||
case OPC_ATOMIC_INC:
|
||||
case OPC_ATOMIC_DEC:
|
||||
case OPC_ATOMIC_CMPXCHG:
|
||||
case OPC_ATOMIC_MIN:
|
||||
case OPC_ATOMIC_MAX:
|
||||
case OPC_ATOMIC_AND:
|
||||
case OPC_ATOMIC_OR:
|
||||
case OPC_ATOMIC_XOR:
|
||||
fprintf(ctx->out, ".b");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (uses_type) {
|
||||
if (!is_id) {
|
||||
fprintf(ctx->out, ".%s", cat6->typed ? "typed" : "untyped");
|
||||
|
|
|
|||
|
|
@ -313,6 +313,20 @@ static int parse_w(const char *str)
|
|||
"atomic.and" return TOKEN(T_OP_ATOMIC_AND);
|
||||
"atomic.or" return TOKEN(T_OP_ATOMIC_OR);
|
||||
"atomic.xor" return TOKEN(T_OP_ATOMIC_XOR);
|
||||
"resinfo.b" return TOKEN(T_OP_RESINFO_B);
|
||||
"ldib.b" return TOKEN(T_OP_LDIB_B);
|
||||
"stib.b" return TOKEN(T_OP_STIB_B);
|
||||
"atomic.add.b" return TOKEN(T_OP_ATOMIC_B_ADD);
|
||||
"atomic.sub.b" return TOKEN(T_OP_ATOMIC_B_SUB);
|
||||
"atomic.xchg.b" return TOKEN(T_OP_ATOMIC_B_XCHG);
|
||||
"atomic.inc.b" return TOKEN(T_OP_ATOMIC_B_INC);
|
||||
"atomic.dec.b" return TOKEN(T_OP_ATOMIC_B_DEC);
|
||||
"atomic.cmpxchg.b" return TOKEN(T_OP_ATOMIC_B_CMPXCHG);
|
||||
"atomic.min.b" return TOKEN(T_OP_ATOMIC_B_MIN);
|
||||
"atomic.max.b" return TOKEN(T_OP_ATOMIC_B_MAX);
|
||||
"atomic.and.b" return TOKEN(T_OP_ATOMIC_B_AND);
|
||||
"atomic.or.b" return TOKEN(T_OP_ATOMIC_B_OR);
|
||||
"atomic.xor.b" return TOKEN(T_OP_ATOMIC_B_XOR);
|
||||
"ldgb" return TOKEN(T_OP_LDGB);
|
||||
"stgb" return TOKEN(T_OP_STGB);
|
||||
"stib" return TOKEN(T_OP_STIB);
|
||||
|
|
|
|||
|
|
@ -490,6 +490,20 @@ static void print_token(FILE *file, int type, YYSTYPE value)
|
|||
%token <tok> T_OP_ATOMIC_AND
|
||||
%token <tok> T_OP_ATOMIC_OR
|
||||
%token <tok> T_OP_ATOMIC_XOR
|
||||
%token <tok> T_OP_RESINFO_B
|
||||
%token <tok> T_OP_LDIB_B
|
||||
%token <tok> T_OP_STIB_B
|
||||
%token <tok> T_OP_ATOMIC_B_ADD
|
||||
%token <tok> T_OP_ATOMIC_B_SUB
|
||||
%token <tok> T_OP_ATOMIC_B_XCHG
|
||||
%token <tok> T_OP_ATOMIC_B_INC
|
||||
%token <tok> T_OP_ATOMIC_B_DEC
|
||||
%token <tok> T_OP_ATOMIC_B_CMPXCHG
|
||||
%token <tok> T_OP_ATOMIC_B_MIN
|
||||
%token <tok> T_OP_ATOMIC_B_MAX
|
||||
%token <tok> T_OP_ATOMIC_B_AND
|
||||
%token <tok> T_OP_ATOMIC_B_OR
|
||||
%token <tok> T_OP_ATOMIC_B_XOR
|
||||
%token <tok> T_OP_LDGB
|
||||
%token <tok> T_OP_STGB
|
||||
%token <tok> T_OP_STIB
|
||||
|
|
@ -940,7 +954,7 @@ cat6_id: cat6_id_opc cat6_type dst_reg
|
|||
* is going to be tricky. Maybe we end up needing to cpp preprocess the
|
||||
* parser and generate multiple versions? For now, punt.
|
||||
*/
|
||||
cat6_bindless_ibo_opc: T_OP_RESINFO { new_instr(OPC_RESINFO); }
|
||||
cat6_bindless_ibo_opc: T_OP_RESINFO_B { new_instr(OPC_RESINFO); }
|
||||
|
||||
cat6_bindless_base:
|
||||
| '.' T_BASE { instr->flags |= IR3_INSTR_B; instr->cat6.base = $2; }
|
||||
|
|
|
|||
|
|
@ -148,9 +148,9 @@ static const struct test {
|
|||
/* INSTR_6XX(c7060020_03800000, "stc c[32], r0.x, 3"), */
|
||||
|
||||
/* dEQP-VK.image.image_size.cube_array.readonly_writeonly_1x1x12 */
|
||||
INSTR_6XX(c0260200_03676100, "stib.untyped.1d.u32.3.imm.base0 r0.x, r0.w, 1"), /* stib.untyped.u32.1d.3.mode4.base0 r0.x, r0.w, 1 */
|
||||
INSTR_6XX(c0260200_03676100, "stib.b.untyped.1d.u32.3.imm.base0 r0.x, r0.w, 1"), /* stib.untyped.u32.1d.3.mode4.base0 r0.x, r0.w, 1 */
|
||||
/* dEQP-VK.texture.filtering.cube.formats.a8b8g8r8_srgb_nearest_mipmap_nearest.txt */
|
||||
INSTR_6XX(c0220200_0361b801, "ldib.typed.1d.f32.4.imm r0.x, r0.w, 1"), /* ldib.f32.1d.4.mode0.base0 r0.x, r0.w, 1 */
|
||||
INSTR_6XX(c0220200_0361b801, "ldib.b.typed.1d.f32.4.imm r0.x, r0.w, 1"), /* ldib.f32.1d.4.mode0.base0 r0.x, r0.w, 1 */
|
||||
|
||||
/* dEQP-GLES31.functional.tessellation.invariance.outer_edge_symmetry.isolines_equal_spacing_ccw */
|
||||
INSTR_6XX(c2c21100_04800006, "stlw.f32 l[r2.x], r0.w, 4"),
|
||||
|
|
@ -167,11 +167,11 @@ static const struct test {
|
|||
INSTR_6XX(d7c60011_03c00000, "(sy)ldlv.u32 r4.y, l[0], 3"),
|
||||
|
||||
/* resinfo */
|
||||
INSTR_6XX(c0260000_0063c200, "resinfo.untyped.2d.u32.1.imm r0.x, 0"), /* resinfo.u32.2d.mode0.base0 r0.x, 0 */
|
||||
INSTR_6XX(c0260000_0063c200, "resinfo.b.untyped.2d.u32.1.imm r0.x, 0"), /* resinfo.u32.2d.mode0.base0 r0.x, 0 */
|
||||
/* dEQP-GLES31.functional.image_load_store.buffer.image_size.writeonly_7.txt */
|
||||
INSTR_6XX(c0260000_0063c000, "resinfo.untyped.1d.u32.1.imm r0.x, 0"), /* resinfo.u32.1d.mode0.base0 r0.x, 0 */
|
||||
INSTR_6XX(c0260000_0063c000, "resinfo.b.untyped.1d.u32.1.imm r0.x, 0"), /* resinfo.u32.1d.mode0.base0 r0.x, 0 */
|
||||
/* dEQP-VK.image.image_size.2d.readonly_12x34.txt */
|
||||
INSTR_6XX(c0260000_0063c300, "resinfo.untyped.2d.u32.1.imm.base0 r0.x, 0"), /* resinfo.u32.2d.mode4.base0 r0.x, 0 */
|
||||
INSTR_6XX(c0260000_0063c300, "resinfo.b.untyped.2d.u32.1.imm.base0 r0.x, 0"), /* resinfo.u32.2d.mode4.base0 r0.x, 0 */
|
||||
/* dEQP-GLES31.functional.image_load_store.buffer.image_size.readonly_writeonly_7 */
|
||||
INSTR_5XX(c3e60000_00000e00, "resinfo.4d r0.x, g[0]"), /* resinfo.u32.1dtype r0.x, 0 */
|
||||
/* dEQP-GLES31.functional.image_load_store.2d.image_size.readonly_writeonly_32x32.txt */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue