@@ -100,10 +100,33 @@ static bool require_scale_rvfmin(DisasContext *s)
100
100
}
101
101
}
102
102
103
- /* Destination vector register group cannot overlap source mask register. */
104
- static bool require_vm (int vm, int vd)
103
+ /*
104
+ * Source and destination vector register groups cannot overlap source mask
105
+ * register:
106
+ *
107
+ * A vector register cannot be used to provide source operands with more than
108
+ * one EEW for a single instruction. A mask register source is considered to
109
+ * have EEW=1 for this constraint. An encoding that would result in the same
110
+ * vector register being read with two or more different EEWs, including when
111
+ * the vector register appears at different positions within two or more vector
112
+ * register groups, is reserved.
113
+ * (Section 5.2)
114
+ *
115
+ * A destination vector register group can overlap a source vector
116
+ * register group only if one of the following holds:
117
+ * 1. The destination EEW equals the source EEW.
118
+ * 2. The destination EEW is smaller than the source EEW and the overlap
119
+ * is in the lowest-numbered part of the source register group.
120
+ * 3. The destination EEW is greater than the source EEW, the source EMUL
121
+ * is at least 1, and the overlap is in the highest-numbered part of
122
+ * the destination register group.
123
+ * For the purpose of determining register group overlap constraints, mask
124
+ * elements have EEW=1.
125
+ * (Section 5.2)
126
+ */
127
+ static bool require_vm (int vm, int v)
105
128
{
106
- return (vm != 0 || vd != 0 );
129
+ return (vm != 0 || v != 0 );
107
130
}
108
131
109
132
static bool require_nf (int vd, int nf, int lmul)
0 commit comments