On 2024/8/19 10:35, Richard Henderson wrote:
On 8/19/24 11:34, LIU Zhiwei wrote:
@@ -1914,6 +2029,11 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
                             const TCGArg args[TCG_MAX_OP_ARGS],
                             const int const_args[TCG_MAX_OP_ARGS])
  {
+    TCGType type = vecl + TCG_TYPE_V64;
+
+    if (vec_vtpye_init) {
+        tcg_target_set_vec_config(s, type, vece);
+    }

Here is perhaps too early... see patch 8 re logicals.

I guess you mean we don't have implemented any vector op, so there is no need to set vsetvl in this patch. We will postpone it do really ops need it.

What I meant is "too early in the function", i.e. before the switch.

Per my comment in patch 8, there are some vector ops that are agnostic to type and only care about length.  Thus perhaps

  switch (op) {
  case xxx:
    set_vec_config_len(s, type);
    something;

  case yyy:
    set_vec_config_len_elt(s, type, vece);
    something_else;

  ...
  }

Or some other structure that makes sense.

Thanks for clarify once again. It's much better to explicitly have two API types.

Thanks,
Zhiwei



r~

Reply via email to