+#define TRANS_VDIV_VMOD(FLAGS, NAME, VECE, FNI4_FUNC, FNI8_FUNC) \
+static bool trans_##NAME(DisasContext *ctx, arg_VX *a) \
+{ \
+ static const GVecGen3 op[2] = { \
+ { \
+ .fni4 = FNI4_FUNC, \
+ .fni8 = FNI8_FUNC, \
+ .vece = MO_32 \
+ }, \
+ { \
+ .fni4 = FNI4_FUNC, \
+ .fni8 = FNI8_FUNC, \
+ .vece = MO_64 \
+ }, \
+ }; \
+#define DIV_VEC(NAME, SZ, DIV) \
+static void do_vx_##NAME(TCGv_##SZ t, TCGv_##SZ a, TCGv_##SZ b) \
+{ \
+ TCGv_##SZ zero = tcg_constant_##SZ(0), one = tcg_constant_##SZ(1); \
+ /* \
+ * If N/0 the instruction used by the backend might deliver \
+ * a signal to the process and the hardware returns 0 when \
+ * N/0, so if b = 0 return 0/1 \
+ */ \
+ tcg_gen_movcond_##SZ(TCG_COND_EQ, a, b, zero, zero, a); \
+ tcg_gen_movcond_##SZ(TCG_COND_EQ, b, b, zero, one, b); \
+ DIV(t, a, b); \
+}