nouveau/mme: Drop the implicit_imm parameter from mme_alu_to()
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:12:05 +0000 (20:12 -0600)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:03 +0000 (21:32 +0000)
It's only used for control-flow and MERGE, all of which are special.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/mme/mme_builder.h
src/nouveau/mme/mme_tu104_builder.c
src/nouveau/mme/mme_tu104_builder.h
src/nouveau/mme/tests/mme_tu104_sim_hw_test.cpp

index d80c4ca..0ec2e05 100644 (file)
@@ -84,21 +84,19 @@ mme_alu_to(struct mme_builder *b,
            struct mme_value dst,
            enum mme_alu_op op,
            struct mme_value x,
-           struct mme_value y,
-           uint16_t implicit_imm)
+           struct mme_value y)
 {
-   mme_tu104_alu_to(b, dst, op, x, y, implicit_imm);
+   mme_tu104_alu_to(b, dst, op, x, y);
 }
 
 static inline struct mme_value
 mme_alu(struct mme_builder *b,
         enum mme_alu_op op,
         struct mme_value x,
-        struct mme_value y,
-        uint16_t implicit_imm)
+        struct mme_value y)
 {
    struct mme_value dst = mme_alloc_reg(b);
-   mme_alu_to(b, dst, op, x, y, implicit_imm);
+   mme_alu_to(b, dst, op, x, y);
    return dst;
 }
 
@@ -106,10 +104,9 @@ static inline void
 mme_alu_no_dst(struct mme_builder *b,
                enum mme_alu_op op,
                struct mme_value x,
-               struct mme_value y,
-               uint16_t implicit_imm)
+               struct mme_value y)
 {
-   mme_alu_to(b, mme_zero(), op, x, y, implicit_imm);
+   mme_alu_to(b, mme_zero(), op, x, y);
 }
 
 static inline void
@@ -141,14 +138,14 @@ static inline void                                          \
 mme_##op##_to(struct mme_builder *b, struct mme_value dst,  \
               struct mme_value x)                           \
 {                                                           \
-   mme_alu_to(b, dst, MME_ALU_OP_##OP, x, mme_zero(), 0);   \
+   mme_alu_to(b, dst, MME_ALU_OP_##OP, x, mme_zero());      \
 }                                                           \
                                                             \
 static inline struct mme_value                              \
 mme_##op(struct mme_builder *b,                             \
          struct mme_value x)                                \
 {                                                           \
-   return mme_alu(b, MME_ALU_OP_##OP, x, mme_zero(), 0);    \
+   return mme_alu(b, MME_ALU_OP_##OP, x, mme_zero());       \
 }
 
 #define MME_DEF_ALU2(op, OP)                                \
@@ -156,14 +153,14 @@ static inline void                                          \
 mme_##op##_to(struct mme_builder *b, struct mme_value dst,  \
               struct mme_value x, struct mme_value y)       \
 {                                                           \
-   mme_alu_to(b, dst, MME_ALU_OP_##OP, x, y, 0);            \
+   mme_alu_to(b, dst, MME_ALU_OP_##OP, x, y);               \
 }                                                           \
                                                             \
 static inline struct mme_value                              \
 mme_##op(struct mme_builder *b,                             \
          struct mme_value x, struct mme_value y)            \
 {                                                           \
-   return mme_alu(b, MME_ALU_OP_##OP, x, y, 0);             \
+   return mme_alu(b, MME_ALU_OP_##OP, x, y);                \
 }
 
 MME_DEF_ALU1(mov,    ADD);
@@ -346,7 +343,7 @@ static inline void
 mme_dwrite(struct mme_builder *b,
            struct mme_value idx, struct mme_value val)
 {
-   mme_alu_no_dst(b, MME_ALU_OP_DWRITE, idx, val, 0);
+   mme_alu_no_dst(b, MME_ALU_OP_DWRITE, idx, val);
 }
 
 static inline void
index f56a80b..a6ce378 100644 (file)
@@ -321,10 +321,9 @@ mme_tu104_alu_to(struct mme_builder *b,
                  struct mme_value dst,
                  enum mme_alu_op op,
                  struct mme_value x,
-                 struct mme_value y,
-                 uint16_t implicit_imm)
+                 struct mme_value y)
 {
-   build_alu_to(b, dst, mme_to_tu104_alu_op(op), x, y, implicit_imm, false);
+   build_alu_to(b, dst, mme_to_tu104_alu_op(op), x, y, 0, false);
 }
 
 void
index b5db712..a05ea09 100644 (file)
@@ -51,8 +51,7 @@ void mme_tu104_alu_to(struct mme_builder *b,
                       struct mme_value dst,
                       enum mme_alu_op op,
                       struct mme_value x,
-                      struct mme_value y,
-                      uint16_t implicit_imm);
+                      struct mme_value y);
 
 void mme_tu104_alu64_to(struct mme_builder *b,
                         struct mme_value64 dst,
index 51001ab..95efcdf 100644 (file)
@@ -966,7 +966,7 @@ TEST_F(mme_tu104_sim_test, mul_mulh)
 static inline struct mme_value
 mme_mulu(struct mme_builder *b, struct mme_value x, struct mme_value y)
 {
-   return mme_alu(b, MME_ALU_OP_MULU, x, y, 0);
+   return mme_alu(b, MME_ALU_OP_MULU, x, y);
 }
 
 TEST_F(mme_tu104_sim_test, mulu_imm)