broadcom/compiler: add small_imm a/c/d on v3d_qpu_sig
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 4 Aug 2021 22:50:12 +0000 (00:50 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 13 Oct 2023 22:37:41 +0000 (22:37 +0000)
small_imm_a, small_imm_c and small_imm_d added on top of the already
existing small_imm_b, as V3D 7.1 defines 4 small immediates, tied to
the 4 raddr. Note that this is only the definition, and just a inst
validation rule to check that are not used before v71. Any real use is
still pending.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>

src/broadcom/compiler/qpu_validate.c
src/broadcom/qpu/qpu_instr.h

index 2cc7a0e..1278869 100644 (file)
@@ -115,6 +115,11 @@ qpu_validate_inst(struct v3d_qpu_validate_state *state, struct qinst *qinst)
         if (inst->type != V3D_QPU_INSTR_TYPE_ALU)
                 return;
 
+        if (devinfo->ver < 71) {
+           if (inst->sig.small_imm_a || inst->sig.small_imm_c || inst->sig.small_imm_d)
+              fail_instr(state, "small imm a/c/d added after V3D 7.1");
+        }
+
         /* LDVARY writes r5 two instructions later and LDUNIF writes
          * r5 one instruction later, which is illegal to have
          * together.
index 9cd8318..13b3f37 100644 (file)
@@ -50,10 +50,13 @@ struct v3d_qpu_sig {
         bool ldvpm:1;
         bool ldtlb:1;
         bool ldtlbu:1;
-        bool small_imm_b:1;
         bool ucb:1;
         bool rotate:1;
         bool wrtmuc:1;
+        bool small_imm_a:1; /* raddr_a (add a), since V3D 7.x */
+        bool small_imm_b:1; /* raddr_b (add b) */
+        bool small_imm_c:1; /* raddr_c (mul a), since V3D 7.x */
+        bool small_imm_d:1; /* raddr_d (mul b), since V3D 7.x */
 };
 
 enum v3d_qpu_cond {