1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
risc-v: 0.978
files: 0.969
TCG: 0.960
debug: 0.938
graphic: 0.934
device: 0.911
architecture: 0.910
virtual: 0.900
performance: 0.880
VMM: 0.854
peripherals: 0.850
user-level: 0.847
hypervisor: 0.828
permissions: 0.782
register: 0.770
PID: 0.744
semantic: 0.728
ppc: 0.714
socket: 0.694
mistranslation: 0.683
assembly: 0.654
vnc: 0.621
kernel: 0.585
network: 0.560
x86: 0.482
arm: 0.471
KVM: 0.420
boot: 0.385
i386: 0.205
Assert fail for RISC-V RVV vmv.v.x for e64, vl == vl_max on RV32 guest
Description of problem:
assert message:
qemu/tcg/tcg-op-gvec.c:1714: tcg_gen_gvec_dup_i32: Assertion `vece <= MO_32' failed.
For a e64 vmv.v.x, in the file trans_rvv.c.inc, function "trans_vmv_v_x", when s->vl_eq_vlmax is true, then "tcg_gen_gvec_dup_tl" (it's defined to tcg_gen_gvec_dup_i32 for RV32) is called. In "tcg_gen_gvec_dup_i32" the assert "tcg_debug_assert(vece <= MO_32) will be triggered, since vece == MO_64 for e64.
Steps to reproduce:
1.enable cfg.Zve64f
2.Prepare a problem as set e64, vl == vl_max and use vmv.v.x, maybe as below
```
li t0, -1,
vsetvli x0, t0, e64,m1,tu,mu
li t1, -1
vmv.v.x v0, t1
```
Additional information:
Below is a possible solution if it's appropriate.
```
#if TARGET_LONG_BITS == 32
if (s->sew == 3) {
TCGv_i64 s1_i64 = tcg_temp_new_i64();
tcg_gen_ext_tl_i64(s1_i64, s1);
tcg_gen_gvec_dup_i64(s->sew, vreg_ofs(s, a->rd),
MAXSZ(s), MAXSZ(s), s1_i64);
tcg_temp_free_i64(s1_i64);
} else {
#endif
tcg_gen_gvec_dup_tl(s->sew, vreg_ofs(s, a->rd),
MAXSZ(s), MAXSZ(s), s1);
#if TARGET_LONG_BITS == 32
}
#endif
```
|