aboutsummaryrefslogtreecommitdiff
path: root/isa/rv64uv/fmovz.S
blob: 4f55cdcec4cf2501d79768f397b6bb34b033d57e (plain)
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
#*****************************************************************************
# fmovz.S
#-----------------------------------------------------------------------------
#
# Test fmovz instruction in a vf block.
#

#include "riscv_test.h"
#include "test_macros.h"

RVTEST_RV64UV
RVTEST_CODE_BEGIN

  vsetcfg 4,2
  li a6,2048
  vsetvl a6,a6

  lui a0,%hi(vtcode)
  vf %lo(vtcode)(a0)
  la a7,dest
  vfsd vf0,a7
  fence

  li a1,0
  li a2,-1
loop:
  ld a0,0(a7)
  slti a4,a1,10
  slli a4,a4,63
  srai a4,a4,63
  xori a4,a4,-1
  and a5,a2,a4
  addi TESTNUM,a1,2
  bne a0,a5,fail
  addi a7,a7,8
  addi a1,a1,1
  bne a1,a6,loop
  j pass

vtcode:
  utidx x1
  slti x2,x1,10
  li x1,-1
  li x3,0
  fmv.d.x f0,x3
  fmv.d.x f1,x1
  fmovz f0,x2,f1
  stop

  TEST_PASSFAIL

RVTEST_CODE_END

  .data
RVTEST_DATA_BEGIN

  TEST_DATA

dest:
  .skip 16384

RVTEST_DATA_END