diff options
author | Yunsup Lee <yunsup@cs.berkeley.edu> | 2014-03-02 02:43:04 -0800 |
---|---|---|
committer | Yunsup Lee <yunsup@cs.berkeley.edu> | 2014-03-02 02:43:04 -0800 |
commit | bcebb088e573ed9fc90babaf5f0eae588d605cdc (patch) | |
tree | 6f8e517d7ad8d57cf352ee861e69e3e10c68aa8b /isa/rv64uv/vfmsv_d.S | |
parent | 681745071f7427b9b65919214547e20a12834360 (diff) | |
download | riscv-tests-bcebb088e573ed9fc90babaf5f0eae588d605cdc.zip riscv-tests-bcebb088e573ed9fc90babaf5f0eae588d605cdc.tar.gz riscv-tests-bcebb088e573ed9fc90babaf5f0eae588d605cdc.tar.bz2 |
add vfmsv.{s,d} tests
Diffstat (limited to 'isa/rv64uv/vfmsv_d.S')
-rw-r--r-- | isa/rv64uv/vfmsv_d.S | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/isa/rv64uv/vfmsv_d.S b/isa/rv64uv/vfmsv_d.S new file mode 100644 index 0000000..e355eb8 --- /dev/null +++ b/isa/rv64uv/vfmsv_d.S @@ -0,0 +1,55 @@ +#***************************************************************************** +# vfmsv_d.S +#----------------------------------------------------------------------------- +# +# Test vfmsv.d instruction. +# + +#include "riscv_test.h" +#include "test_macros.h" + +RVTEST_RV64UV +RVTEST_CODE_BEGIN + + vsetcfg 3,1 + li a2,680 + vsetvl a2,a2 + + li a3,-1 + vfmsv.d vf0,a3 + lui a0,%hi(vtcode) + vf %lo(vtcode)(a0) + la a4,dest + vsd vx2,a4 + fence + + li a1,0 +loop: + ld a0,0(a4) + addi TESTNUM,a1,2 + bne a0,a1,fail + addi a4,a4,8 + addi a1,a1,1 + bne a1,a2,loop + j pass + +vtcode: + utidx x1 + addi x1,x1,1 + fmv.x.d x2, f0 + add x2,x1,x2 + stop + + TEST_PASSFAIL + +RVTEST_CODE_END + + .data +RVTEST_DATA_BEGIN + + TEST_DATA + +dest: + .skip 16384 + +RVTEST_DATA_END |