projects
/
riscv-tests.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
cleanup Makefiles in isa
[riscv-tests.git]
/
isa
/
rv64uv
/
vvadd_fw.S
1
#*****************************************************************************
2
# vvadd_fw.S
3
#-----------------------------------------------------------------------------
4
#
5
# Test vvadd fw.
6
#
7
8
#include "riscv_test.h"
9
#include "test_macros.h"
10
11
RVTEST_RV64U
12
RVTEST_CODE_BEGIN
13
14
li a3,4
15
vvcfgivl a3,a3,32,32
16
17
la a3,src1
18
la a4,src2
19
vflw vf2,a3
20
vflw vf3,a4
21
lui a0,%hi(vtcode)
22
vf %lo(vtcode)(a0)
23
la a5,dest
24
vfsw vf2,a5
25
fence.v.l
26
la a6,result
27
lw a1,0(a5)
28
lw a2,0(a6)
29
li x28,2
30
bne a1,a2,fail
31
lw a1,8(a5)
32
li x28,3
33
bne a1,a2,fail
34
lw a1,16(a5)
35
li x28,4
36
bne a1,a2,fail
37
lw a1,24(a5)
38
li x28,5
39
bne a1,a2,fail
40
j pass
41
42
vtcode:
43
fadd.s f2,f2,f3
44
stop
45
46
TEST_PASSFAIL
47
48
RVTEST_CODE_END
49
50
.data
51
RVTEST_DATA_BEGIN
52
53
TEST_DATA
54
55
src1:
56
.single 0.1
57
.single 0.2
58
.single 0.3
59
.single 0.4
60
src2:
61
.single 0.4
62
.single 0.3
63
.single 0.2
64
.single 0.1
65
dest:
66
.word 0xdeadbeef
67
.word 0xdeadbeef
68
.word 0xdeadbeef
69
.word 0xdeadbeef
70
result:
71
.single 0.5
72
.single 0.5
73
.single 0.5
74
.single 0.5
75
76
RVTEST_DATA_END