
// -----------
// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg)
// version   : 0.10.3
// timestamp : Mon May 22 12:18:48 2023 GMT
// usage     : riscv_ctg \
//                  -- cgf //                  --cgf /home/cm/src/riscv-ctg/zfa/sample_cgfs/dataset.cgf \
//                  --cgf /home/cm/src/riscv-ctg/zfa/sample_cgfs/zfa/fmvh.x.d.cgf \
 \
//                  -- xlen 32  \
// -----------
//
// -----------
// Copyright (c) 2020. RISC-V International. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
// -----------
//
// This assembly file tests the fmvh.x.d instruction of the RISC-V RV32FD_Zicsr_Zfa extension for the fmvh.x.d_b24 covergroup.
// 
#include "model_test.h"
#include "arch_test.h"
RVTEST_ISA("RV32IFD_Zicsr_Zfa")

.section .text.init
.globl rvtest_entry_point
rvtest_entry_point:
RVMODEL_BOOT
RVTEST_CODE_BEGIN

#ifdef TEST_CASE_1

RVTEST_CASE(0,"//check ISA:=regex(.*RV32.*I.*D.*Zfa.*);def TEST_CASE_1=True;",fmvh.x.d_b24)

RVTEST_FP_ENABLE()
RVTEST_VALBASEUPD(x3,test_dataset_0)
RVTEST_SIGBASE(x1,signature_x1_1)

inst_0:// rs1==f31, rd==x31,fs1 == 1 and fe1 == 0x3fe and fm1 == 0xc7ae147ae147b and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f31; dest:x31; op1val:0xbfec7ae147ae147b; valaddr_reg:x3;
val_offset:0*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x31, f31, 0, 0, x3, 0*FLEN/8, x4, x1, x2)

inst_1:// rs1==f30, rd==x30,fs1 == 0 and fe1 == 0x3f8 and fm1 == 0x47ae147ae147b and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f30; dest:x30; op1val:0x3f847ae147ae147b; valaddr_reg:x3;
val_offset:1*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x30, f30, 0, 0, x3, 1*FLEN/8, x4, x1, x2)

inst_2:// rs1==f29, rd==x29,fs1 == 1 and fe1 == 0x3ff and fm1 == 0x028f5c28f5c29 and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f29; dest:x29; op1val:0xbff028f5c28f5c29; valaddr_reg:x3;
val_offset:2*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x29, f29, 0, 0, x3, 2*FLEN/8, x4, x1, x2)

inst_3:// rs1==f28, rd==x28,fs1 == 1 and fe1 == 0x3ff and fm1 == 0x199999999999a and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f28; dest:x28; op1val:0xbff199999999999a; valaddr_reg:x3;
val_offset:3*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x28, f28, 0, 0, x3, 3*FLEN/8, x4, x1, x2)

inst_4:// rs1==f27, rd==x27,fs1 == 0 and fe1 == 0x3fb and fm1 == 0x999999999999a and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f27; dest:x27; op1val:0x3fb999999999999a; valaddr_reg:x3;
val_offset:4*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x27, f27, 0, 0, x3, 4*FLEN/8, x4, x1, x2)

inst_5:// rs1==f26, rd==x26,fs1 == 0 and fe1 == 0x3fe and fm1 == 0xfae147ae147ae and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f26; dest:x26; op1val:0x3fefae147ae147ae; valaddr_reg:x3;
val_offset:5*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x26, f26, 0, 0, x3, 5*FLEN/8, x4, x1, x2)

inst_6:// rs1==f25, rd==x25,fs1 == 1 and fe1 == 0x3fb and fm1 == 0x999999999999a and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f25; dest:x25; op1val:0xbfb999999999999a; valaddr_reg:x3;
val_offset:6*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x25, f25, 0, 0, x3, 6*FLEN/8, x4, x1, x2)

inst_7:// rs1==f24, rd==x24,fs1 == 1 and fe1 == 0x3ff and fm1 == 0x0000000000000 and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f24; dest:x24; op1val:0xbff0000000000000; valaddr_reg:x3;
val_offset:7*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x24, f24, 0, 0, x3, 7*FLEN/8, x4, x1, x2)

inst_8:// rs1==f23, rd==x23,fs1 == 0 and fe1 == 0x3fe and fm1 == 0xc7ae147ae147b and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f23; dest:x23; op1val:0x3fec7ae147ae147b; valaddr_reg:x3;
val_offset:8*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x23, f23, 0, 0, x3, 8*FLEN/8, x4, x1, x2)

inst_9:// rs1==f22, rd==x22,fs1 == 0 and fe1 == 0x3ff and fm1 == 0x199999999999a and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f22; dest:x22; op1val:0x3ff199999999999a; valaddr_reg:x3;
val_offset:9*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x22, f22, 0, 0, x3, 9*FLEN/8, x4, x1, x2)

inst_10:// rs1==f21, rd==x21,fs1 == 0 and fe1 == 0x3ff and fm1 == 0x0000000000000 and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f21; dest:x21; op1val:0x3ff0000000000000; valaddr_reg:x3;
val_offset:10*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x21, f21, 0, 0, x3, 10*FLEN/8, x4, x1, x2)

inst_11:// rs1==f20, rd==x20,fs1 == 1 and fe1 == 0x3f8 and fm1 == 0x47ae147ae147b and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f20; dest:x20; op1val:0xbf847ae147ae147b; valaddr_reg:x3;
val_offset:11*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x20, f20, 0, 0, x3, 11*FLEN/8, x4, x1, x2)

inst_12:// rs1==f19, rd==x19,fs1 == 1 and fe1 == 0x3fe and fm1 == 0xccccccccccccd and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f19; dest:x19; op1val:0xbfeccccccccccccd; valaddr_reg:x3;
val_offset:12*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x19, f19, 0, 0, x3, 12*FLEN/8, x4, x1, x2)

inst_13:// rs1==f18, rd==x18,fs1 == 1 and fe1 == 0x3ff and fm1 == 0x1c28f5c28f5c3 and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f18; dest:x18; op1val:0xbff1c28f5c28f5c3; valaddr_reg:x3;
val_offset:13*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x18, f18, 0, 0, x3, 13*FLEN/8, x4, x1, x2)

inst_14:// rs1==f17, rd==x17,fs1 == 0 and fe1 == 0x3ff and fm1 == 0x1c28f5c28f5c3 and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f17; dest:x17; op1val:0x3ff1c28f5c28f5c3; valaddr_reg:x3;
val_offset:14*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x17, f17, 0, 0, x3, 14*FLEN/8, x4, x1, x2)

inst_15:// rs1==f16, rd==x16,fs1 == 0 and fe1 == 0x3fb and fm1 == 0xc28f5c28f5c29 and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f16; dest:x16; op1val:0x3fbc28f5c28f5c29; valaddr_reg:x3;
val_offset:15*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x16, f16, 0, 0, x3, 15*FLEN/8, x4, x1, x2)

inst_16:// rs1==f15, rd==x15,fs1 == 0 and fe1 == 0x3fe and fm1 == 0xccccccccccccd and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f15; dest:x15; op1val:0x3feccccccccccccd; valaddr_reg:x3;
val_offset:16*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x15, f15, 0, 0, x3, 16*FLEN/8, x4, x1, x2)

inst_17:// rs1==f14, rd==x14,fs1 == 0 and fe1 == 0x000 and fm1 == 0x0000000000000 and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f14; dest:x14; op1val:0x0; valaddr_reg:x3;
val_offset:17*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x14, f14, 0, 0, x3, 17*FLEN/8, x4, x1, x2)

inst_18:// rs1==f13, rd==x13,fs1 == 1 and fe1 == 0x3fb and fm1 == 0xc28f5c28f5c29 and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f13; dest:x13; op1val:0xbfbc28f5c28f5c29; valaddr_reg:x3;
val_offset:18*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x13, f13, 0, 0, x3, 18*FLEN/8, x4, x1, x2)

inst_19:// rs1==f12, rd==x12,fs1 == 1 and fe1 == 0x3fe and fm1 == 0xfae147ae147ae and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f12; dest:x12; op1val:0xbfefae147ae147ae; valaddr_reg:x3;
val_offset:19*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x12, f12, 0, 0, x3, 19*FLEN/8, x4, x1, x2)

inst_20:// rs1==f11, rd==x11,fs1 == 0 and fe1 == 0x3ff and fm1 == 0x028f5c28f5c29 and  fcsr == 0  
/* opcode: fmvh.x.d ; op1:f11; dest:x11; op1val:0x3ff028f5c28f5c29; valaddr_reg:x3;
val_offset:20*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x11, f11, 0, 0, x3, 20*FLEN/8, x4, x1, x2)

inst_21:// rs1==f10, rd==x10,
/* opcode: fmvh.x.d ; op1:f10; dest:x10; op1val:0x0; valaddr_reg:x3;
val_offset:21*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x10, f10, 0, 0, x3, 21*FLEN/8, x4, x1, x2)

inst_22:// rs1==f9, rd==x9,
/* opcode: fmvh.x.d ; op1:f9; dest:x9; op1val:0x0; valaddr_reg:x3;
val_offset:22*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x9, f9, 0, 0, x3, 22*FLEN/8, x4, x1, x2)

inst_23:// rs1==f8, rd==x8,
/* opcode: fmvh.x.d ; op1:f8; dest:x8; op1val:0x0; valaddr_reg:x3;
val_offset:23*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x8, f8, 0, 0, x3, 23*FLEN/8, x4, x1, x2)
RVTEST_VALBASEUPD(x8,test_dataset_1)

inst_24:// rs1==f7, rd==x7,
/* opcode: fmvh.x.d ; op1:f7; dest:x7; op1val:0x0; valaddr_reg:x8;
val_offset:0*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x7, f7, 0, 0, x8, 0*FLEN/8, x9, x1, x2)

inst_25:// rs1==f6, rd==x6,
/* opcode: fmvh.x.d ; op1:f6; dest:x6; op1val:0x0; valaddr_reg:x8;
val_offset:1*FLEN/8; correctval:??; testreg:x2;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x6, f6, 0, 0, x8, 1*FLEN/8, x9, x1, x2)

inst_26:// rs1==f5, rd==x5,
/* opcode: fmvh.x.d ; op1:f5; dest:x5; op1val:0x0; valaddr_reg:x8;
val_offset:2*FLEN/8; correctval:??; testreg:x6;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x5, f5, 0, 0, x8, 2*FLEN/8, x9, x1, x6)
RVTEST_SIGBASE(x5,signature_x5_0)

inst_27:// rs1==f4, rd==x4,
/* opcode: fmvh.x.d ; op1:f4; dest:x4; op1val:0x0; valaddr_reg:x8;
val_offset:3*FLEN/8; correctval:??; testreg:x6;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x4, f4, 0, 0, x8, 3*FLEN/8, x9, x5, x6)

inst_28:// rs1==f3, rd==x3,
/* opcode: fmvh.x.d ; op1:f3; dest:x3; op1val:0x0; valaddr_reg:x8;
val_offset:4*FLEN/8; correctval:??; testreg:x6;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x3, f3, 0, 0, x8, 4*FLEN/8, x9, x5, x6)

inst_29:// rs1==f2, rd==x2,
/* opcode: fmvh.x.d ; op1:f2; dest:x2; op1val:0x0; valaddr_reg:x8;
val_offset:5*FLEN/8; correctval:??; testreg:x6;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x2, f2, 0, 0, x8, 5*FLEN/8, x9, x5, x6)

inst_30:// rs1==f1, rd==x1,
/* opcode: fmvh.x.d ; op1:f1; dest:x1; op1val:0x0; valaddr_reg:x8;
val_offset:6*FLEN/8; correctval:??; testreg:x6;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x1, f1, 0, 0, x8, 6*FLEN/8, x9, x5, x6)

inst_31:// rs1==f0, rd==x0,
/* opcode: fmvh.x.d ; op1:f0; dest:x0; op1val:0x0; valaddr_reg:x8;
val_offset:7*FLEN/8; correctval:??; testreg:x6;
fcsr_val:0*/
TEST_FPID_OP_NRM(fmvh.x.d, x0, f0, 0, 0, x8, 7*FLEN/8, x9, x5, x6)
#endif


RVTEST_CODE_END
RVMODEL_HALT

RVTEST_DATA_BEGIN
.align 4
rvtest_data:
.word 0xbabecafe
.word 0xabecafeb
.word 0xbecafeba
.word 0xecafebab
test_dataset_0:
NAN_BOXED(13829563663736771707,64,FLEN)
NAN_BOXED(4576918229304087675,64,FLEN)
NAN_BOXED(13830599491651066921,64,FLEN)
NAN_BOXED(13831004815617530266,64,FLEN)
NAN_BOXED(4591870180066957722,64,FLEN)
NAN_BOXED(4607092346807469998,64,FLEN)
NAN_BOXED(13815242216921733530,64,FLEN)
NAN_BOXED(13830554455654793216,64,FLEN)
NAN_BOXED(4606191626881995899,64,FLEN)
NAN_BOXED(4607632778762754458,64,FLEN)
NAN_BOXED(4607182418800017408,64,FLEN)
NAN_BOXED(13800290266158863483,64,FLEN)
NAN_BOXED(13829653735729319117,64,FLEN)
NAN_BOXED(13831049851613803971,64,FLEN)
NAN_BOXED(4607677814759028163,64,FLEN)
NAN_BOXED(4592590756007337001,64,FLEN)
NAN_BOXED(4606281698874543309,64,FLEN)
NAN_BOXED(0,64,FLEN)
NAN_BOXED(13815962792862112809,64,FLEN)
NAN_BOXED(13830464383662245806,64,FLEN)
NAN_BOXED(4607227454796291113,64,FLEN)
NAN_BOXED(0,64,FLEN)
NAN_BOXED(0,64,FLEN)
NAN_BOXED(0,64,FLEN)
test_dataset_1:
NAN_BOXED(0,64,FLEN)
NAN_BOXED(0,64,FLEN)
NAN_BOXED(0,64,FLEN)
NAN_BOXED(0,64,FLEN)
NAN_BOXED(0,64,FLEN)
NAN_BOXED(0,64,FLEN)
NAN_BOXED(0,64,FLEN)
NAN_BOXED(0,64,FLEN)
RVTEST_DATA_END

RVMODEL_DATA_BEGIN
rvtest_sig_begin:
sig_begin_canary:
CANARY;



signature_x1_0:
    .fill 0*((SIGALIGN)/4),4,0xdeadbeef


signature_x1_1:
    .fill 54*((SIGALIGN)/4),4,0xdeadbeef


signature_x5_0:
    .fill 10*((SIGALIGN)/4),4,0xdeadbeef

#ifdef rvtest_mtrap_routine
tsig_begin_canary:
CANARY;

mtrap_sigptr:
    .fill 64*XLEN/32,4,0xdeadbeef

tsig_end_canary:
CANARY;
#endif

#ifdef rvtest_gpr_save

gpr_save:
    .fill 32*XLEN/32,4,0xdeadbeef

#endif


sig_end_canary:
CANARY;
rvtest_sig_end:
RVMODEL_DATA_END
