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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# See LICENSE for license details.
#*****************************************************************************
# utidx.S
#-----------------------------------------------------------------------------
#
# Test utidx instruction in a vf block.
#
#include "riscv_test.h"
#include "test_macros.h"
RVTEST_RV64UV
RVTEST_CODE_BEGIN
vsetcfg 2,0
li s0,2048
vsetvl s0,s0
lui a0,%hi(vtcode1)
vf %lo(vtcode1)(a0)
la a4,dest1
vsd vx1,a4
vsetcfg 3,0
li s1,2048
vsetvl s1,s1
lui a0,%hi(vtcode2)
vf %lo(vtcode2)(a0)
la a4,dest2
vsd vx1,a4
fence
la a4,dest1
li a1,1
loop1:
ld a0,0(a4)
addi TESTNUM,a1,2
bne a0,a1,fail
addi a4,a4,8
addi a1,a1,1
bne a1,s0,loop1
la a4,dest2
li a1,1024
li a2,1
loop2:
ld a0,0(a4)
addi TESTNUM,a1,2
bne a0,a1,fail
addi a4,a4,8
addi a1,a1,1
addi a2,a2,1
bne a2,s1,loop2
j pass
vtcode1:
utidx x1
addi x1,x1,1
stop
vtcode2:
utidx x1
addi x1,x1,1024
stop
TEST_PASSFAIL
RVTEST_CODE_END
.data
RVTEST_DATA_BEGIN
TEST_DATA
dest1:
.skip 16384
dest2:
.skip 16384
RVTEST_DATA_END
|