From 7983a0d0dce409d4a9f20ff25365ef236adfa2c2 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 22 Mar 2022 21:47:27 -0400 Subject: [PATCH] pan/bi: Rename PATOM_C to ATOM This is basically what's native on Valhall. Use the Valhall naming for the pseudo-instruction on Bifrost for consistency. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/ISA.xml | 8 ++++---- src/panfrost/bifrost/bi_schedule.c | 4 ++-- src/panfrost/bifrost/bifrost_compile.c | 10 +++++----- src/panfrost/bifrost/bir.c | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/panfrost/bifrost/ISA.xml b/src/panfrost/bifrost/ISA.xml index 4d820fd719e..0fad891ad26 100644 --- a/src/panfrost/bifrost/ISA.xml +++ b/src/panfrost/bifrost/ISA.xml @@ -8233,11 +8233,11 @@ - - + + - + aadd @@ -8258,7 +8258,7 @@ - + diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index efcd9616141..01bf6299be0 100644 --- a/src/panfrost/bifrost/bi_schedule.c +++ b/src/panfrost/bifrost/bi_schedule.c @@ -1234,9 +1234,9 @@ bi_take_instr(bi_context *ctx, struct bi_worklist st, { if (tuple->add && tuple->add->op == BI_OPCODE_CUBEFACE) return bi_lower_cubeface(ctx, clause, tuple); - else if (tuple->add && tuple->add->op == BI_OPCODE_PATOM_C_I32) + else if (tuple->add && tuple->add->op == BI_OPCODE_ATOM_RETURN_I32) return bi_lower_atom_c(ctx, clause, tuple); - else if (tuple->add && tuple->add->op == BI_OPCODE_PATOM_C1_I32) + else if (tuple->add && tuple->add->op == BI_OPCODE_ATOM1_RETURN_I32) return bi_lower_atom_c1(ctx, clause, tuple); else if (tuple->add && tuple->add->op == BI_OPCODE_SEG_ADD_I64) return bi_lower_seg_add(ctx, clause, tuple); diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index b7f1f8ad8e7..ca921e9c42a 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -1094,14 +1094,14 @@ bi_emit_atomic_i32_to(bi_builder *b, bi_index dst, enum bi_atom_opc opc = bi_atom_opc_for_nir(intrinsic); enum bi_atom_opc post_opc = opc; - /* Generate either ATOM_C or ATOM_C1 as required */ + /* Generate either ATOM or ATOM1 as required */ if (bi_promote_atom_c1(opc, arg, &opc)) { - bi_patom_c1_i32_to(b, sr, bi_word(addr, 0), - bi_word(addr, 1), opc, 2); + bi_atom1_return_i32_to(b, sr, bi_word(addr, 0), + bi_word(addr, 1), opc, 2); } else { bi_mov_i32_to(b, sr, arg); - bi_patom_c_i32_to(b, sr, sr, bi_word(addr, 0), - bi_word(addr, 1), opc, 2); + bi_atom_return_i32_to(b, sr, sr, bi_word(addr, 0), + bi_word(addr, 1), opc, 2); } /* Post-process it */ diff --git a/src/panfrost/bifrost/bir.c b/src/panfrost/bifrost/bir.c index 178950d27f3..45b34badf91 100644 --- a/src/panfrost/bifrost/bir.c +++ b/src/panfrost/bifrost/bir.c @@ -86,8 +86,8 @@ bi_count_staging_registers(const bi_instr *ins) unsigned bi_count_read_registers(const bi_instr *ins, unsigned s) { - /* PATOM_C reads 1 but writes 2 */ - if (s == 0 && ins->op == BI_OPCODE_PATOM_C_I32) + /* ATOM reads 1 but writes 2 */ + if (s == 0 && ins->op == BI_OPCODE_ATOM_RETURN_I32) return 1; else if (s == 0 && bi_opcode_props[ins->op].sr_read) return bi_count_staging_registers(ins);