
// -----------
// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg)
// version   : 0.6.3
// timestamp : Sat Apr 23 14:53:29 2022 GMT
// usage     : riscv_ctg \
//                  --cgf /scratch/git-repo/github/riscv_ctg/sample_cgfs/dataset.cgf \
//                  --cgf /scratch/git-repo/github/riscv_ctg/sample_cgfs/rv32ip.cgf \
//                  --xlen 32  \
//                  --randomize \
// -----------
//
// -----------
// Copyright (c) 2020. RISC-V International. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
// -----------
//
// This assembly file tests the kslli8 instruction of the RISC-V RV32PZicsr extension for the kslli8 covergroup.
// 
#include "model_test.h"
#include "arch_test.h"
RVTEST_ISA("RV32IPZicsr")

.section .text.init
.org 0x80
.globl rvtest_entry_point
rvtest_entry_point:
RVMODEL_BOOT
RVTEST_CODE_BEGIN

#ifdef TEST_CASE_1

RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*P.*Zicsr.*);def TEST_CASE_1=True;",kslli8)

RVTEST_VXSAT_ENABLE()
RVTEST_SIGBASE(x17,signature_x17_1)

inst_0:
// rs1 != rd, rs1==x20, rd==x3, rs1_b0_val == -128, rs1_b3_val == 1, imm_val == 5
// opcode: kslli8 ; op1:x20; dest:x3; op1val:0x107f880;  immval:0x5
TEST_PKIMM_OP( kslli8, x3, x20, 0x00000000, 0x107f880, 0x5, x20, x17, 0, x6)

inst_1:
// rs1 == rd, rs1==x22, rd==x22, imm_val == 7, rs1_b1_val == -5
// opcode: kslli8 ; op1:x22; dest:x22; op1val:0x3fafb06;  immval:0x7
TEST_PKIMM_OP( kslli8, x22, x22, 0x00000000, 0x3fafb06, 0x7, x22, x17, 8, x6)

inst_2:
// rs1==x26, rd==x7, imm_val == 6, 
// opcode: kslli8 ; op1:x26; dest:x7; op1val:0x3f06fc07;  immval:0x6
TEST_PKIMM_OP( kslli8, x7, x26, 0x00000000, 0x3f06fc07, 0x6, x26, x17, 16, x6)

inst_3:
// rs1==x11, rd==x19, imm_val == 4, rs1_b3_val == -3
// opcode: kslli8 ; op1:x11; dest:x19; op1val:0xfdf90309;  immval:0x4
TEST_PKIMM_OP( kslli8, x19, x11, 0x00000000, 0xfdf90309, 0x4, x11, x17, 24, x6)

inst_4:
// rs1==x25, rd==x24, imm_val == 3, rs1_b2_val == -33
// opcode: kslli8 ; op1:x25; dest:x24; op1val:0x3fdffbf8;  immval:0x3
TEST_PKIMM_OP( kslli8, x24, x25, 0x00000000, 0x3fdffbf8, 0x3, x25, x17, 32, x6)

inst_5:
// rs1==x14, rd==x9, imm_val == 2, rs1_b1_val == -128, rs1_b0_val == -3, rs1_b2_val == -3
// opcode: kslli8 ; op1:x14; dest:x9; op1val:0xfafd80fd;  immval:0x2
TEST_PKIMM_OP( kslli8, x9, x14, 0x00000000, 0xfafd80fd, 0x2, x14, x17, 40, x6)

inst_6:
// rs1==x18, rd==x2, imm_val == 1, rs1_b2_val == -1, rs1_b1_val == -33, rs1_b0_val == 85
// opcode: kslli8 ; op1:x18; dest:x2; op1val:0x1ffdf55;  immval:0x1
TEST_PKIMM_OP( kslli8, x2, x18, 0x00000000, 0x1ffdf55, 0x1, x18, x17, 48, x6)

inst_7:
// rs1==x29, rd==x16, imm_val == 0, rs1_b2_val == 32, rs1_b3_val == 32, rs1_b0_val == 0
// opcode: kslli8 ; op1:x29; dest:x16; op1val:0x2020c000;  immval:0x0
TEST_PKIMM_OP( kslli8, x16, x29, 0x00000000, 0x2020c000, 0x0, x29, x17, 56, x6)

inst_8:
// rs1==x1, rd==x10, rs1_b3_val == -86, rs1_b2_val == -2
// opcode: kslli8 ; op1:x1; dest:x10; op1val:0xaafe0780;  immval:0x6
TEST_PKIMM_OP( kslli8, x10, x1, 0x00000000, 0xaafe0780, 0x6, x1, x17, 64, x6)

inst_9:
// rs1==x12, rd==x5, rs1_b3_val == 85, rs1_b1_val == -86
// opcode: kslli8 ; op1:x12; dest:x5; op1val:0x5503aafd;  immval:0x0
TEST_PKIMM_OP( kslli8, x5, x12, 0x00000000, 0x5503aafd, 0x0, x12, x17, 72, x6)

inst_10:
// rs1==x23, rd==x26, rs1_b3_val == 127, rs1_b2_val == 8, rs1_b1_val == 64, rs1_b0_val == -5
// opcode: kslli8 ; op1:x23; dest:x26; op1val:0x7f0840fb;  immval:0x2
TEST_PKIMM_OP( kslli8, x26, x23, 0x00000000, 0x7f0840fb, 0x2, x23, x17, 80, x6)

inst_11:
// rs1==x4, rd==x21, rs1_b3_val == -65, 
// opcode: kslli8 ; op1:x4; dest:x21; op1val:0xbff9fa05;  immval:0x0
TEST_PKIMM_OP( kslli8, x21, x4, 0x00000000, 0xbff9fa05, 0x0, x4, x17, 88, x6)

inst_12:
// rs1==x15, rd==x8, rs1_b3_val == -33, rs1_b1_val == 127, rs1_b0_val == 127
// opcode: kslli8 ; op1:x15; dest:x8; op1val:0xdff67f7f;  immval:0x3
TEST_PKIMM_OP( kslli8, x8, x15, 0x00000000, 0xdff67f7f, 0x3, x15, x17, 96, x6)

inst_13:
// rs1==x0, rd==x25, rs1_b3_val == -17, rs1_b1_val == 4
// opcode: kslli8 ; op1:x0; dest:x25; op1val:0xeffe04f9;  immval:0x0
TEST_PKIMM_OP( kslli8, x25, x0, 0x00000000, 0xeffe04f9, 0x0, x0, x17, 104, x6)

inst_14:
// rs1==x9, rd==x4, rs1_b3_val == -9, rs1_b2_val == -65, rs1_b1_val == 0, rs1_b0_val == -2
// opcode: kslli8 ; op1:x9; dest:x4; op1val:0xf7bf00fe;  immval:0x2
TEST_PKIMM_OP( kslli8, x4, x9, 0x00000000, 0xf7bf00fe, 0x2, x9, x17, 112, x6)

inst_15:
// rs1==x30, rd==x18, rs1_b3_val == -5, rs1_b0_val == -33, rs1_b1_val == 2, rs1_b2_val == 2
// opcode: kslli8 ; op1:x30; dest:x18; op1val:0xfb0202df;  immval:0x0
TEST_PKIMM_OP( kslli8, x18, x30, 0x00000000, 0xfb0202df, 0x0, x30, x17, 120, x6)

inst_16:
// rs1==x31, rd==x13, rs1_b3_val == -2, rs1_b1_val == 85
// opcode: kslli8 ; op1:x31; dest:x13; op1val:0xfef855fc;  immval:0x7
TEST_PKIMM_OP( kslli8, x13, x31, 0x00000000, 0xfef855fc, 0x7, x31, x17, 128, x6)

inst_17:
// rs1==x10, rd==x6, rs1_b3_val == -128, rs1_b0_val == 16, rs1_b2_val == -128
// opcode: kslli8 ; op1:x10; dest:x6; op1val:0x80800310;  immval:0x5
TEST_PKIMM_OP( kslli8, x6, x10, 0x00000000, 0x80800310, 0x5, x10, x17, 136, x9)
RVTEST_SIGBASE(x4,signature_x4_0)

inst_18:
// rs1==x28, rd==x11, rs1_b3_val == 64, 
// opcode: kslli8 ; op1:x28; dest:x11; op1val:0x40bf02fd;  immval:0x3
TEST_PKIMM_OP( kslli8, x11, x28, 0x00000000, 0x40bf02fd, 0x3, x28, x4, 0, x9)

inst_19:
// rs1==x21, rd==x28, rs1_b3_val == 16, 
// opcode: kslli8 ; op1:x21; dest:x28; op1val:0x1008f9df;  immval:0x5
TEST_PKIMM_OP( kslli8, x28, x21, 0x00000000, 0x1008f9df, 0x5, x21, x4, 8, x9)

inst_20:
// rs1==x13, rd==x27, rs1_b3_val == 8, rs1_b1_val == -9
// opcode: kslli8 ; op1:x13; dest:x27; op1val:0x8fcf705;  immval:0x3
TEST_PKIMM_OP( kslli8, x27, x13, 0x00000000, 0x8fcf705, 0x3, x13, x4, 16, x9)

inst_21:
// rs1==x6, rd==x30, rs1_b3_val == 4, 
// opcode: kslli8 ; op1:x6; dest:x30; op1val:0x4c00903;  immval:0x4
TEST_PKIMM_OP( kslli8, x30, x6, 0x00000000, 0x4c00903, 0x4, x6, x4, 24, x9)

inst_22:
// rs1==x19, rd==x1, rs1_b3_val == 2, rs1_b0_val == -65, rs1_b2_val == 16
// opcode: kslli8 ; op1:x19; dest:x1; op1val:0x2107fbf;  immval:0x3
TEST_PKIMM_OP( kslli8, x1, x19, 0x00000000, 0x2107fbf, 0x3, x19, x4, 32, x9)

inst_23:
// rs1==x3, rd==x14, rs1_b3_val == 0, rs1_b0_val == 4
// opcode: kslli8 ; op1:x3; dest:x14; op1val:0x02f904;  immval:0x4
TEST_PKIMM_OP( kslli8, x14, x3, 0x00000000, 0x02f904, 0x4, x3, x4, 40, x9)

inst_24:
// rs1==x16, rd==x15, rs1_b1_val == 1, rs1_b2_val == -5
// opcode: kslli8 ; op1:x16; dest:x15; op1val:0x8fb0110;  immval:0x2
TEST_PKIMM_OP( kslli8, x15, x16, 0x00000000, 0x8fb0110, 0x2, x16, x4, 48, x9)

inst_25:
// rs1==x8, rd==x31, rs1_b1_val == -1, 
// opcode: kslli8 ; op1:x8; dest:x31; op1val:0x3ffbfffc;  immval:0x6
TEST_PKIMM_OP( kslli8, x31, x8, 0x00000000, 0x3ffbfffc, 0x6, x8, x4, 56, x9)

inst_26:
// rs1==x17, rd==x12, rs1_b0_val == -86, rs1_b1_val == -17
// opcode: kslli8 ; op1:x17; dest:x12; op1val:0xdf10efaa;  immval:0x4
TEST_PKIMM_OP( kslli8, x12, x17, 0x00000000, 0xdf10efaa, 0x4, x17, x4, 64, x9)

inst_27:
// rs1==x7, rd==x0, rs1_b0_val == -17, 
// opcode: kslli8 ; op1:x7; dest:x0; op1val:0xfa02fbef;  immval:0x4
TEST_PKIMM_OP( kslli8, x0, x7, 0x00000000, 0xfa02fbef, 0x4, x7, x4, 72, x9)

inst_28:
// rs1==x5, rd==x23, rs1_b0_val == -9, rs1_b1_val == -2
// opcode: kslli8 ; op1:x5; dest:x23; op1val:0x4fefef7;  immval:0x7
TEST_PKIMM_OP( kslli8, x23, x5, 0x00000000, 0x4fefef7, 0x7, x5, x4, 80, x9)

inst_29:
// rs1==x24, rd==x20, rs1_b0_val == 64, rs1_b2_val == -86, rs1_b1_val == 8
// opcode: kslli8 ; op1:x24; dest:x20; op1val:0xf6aa0840;  immval:0x1
TEST_PKIMM_OP( kslli8, x20, x24, 0x00000000, 0xf6aa0840, 0x1, x24, x4, 88, x9)

inst_30:
// rs1==x2, rd==x17, rs1_b0_val == 32, 
// opcode: kslli8 ; op1:x2; dest:x17; op1val:0xfdf90520;  immval:0x7
TEST_PKIMM_OP( kslli8, x17, x2, 0x00000000, 0xfdf90520, 0x7, x2, x4, 96, x9)

inst_31:
// rs1==x27, rd==x29, rs1_b0_val == 8, 
// opcode: kslli8 ; op1:x27; dest:x29; op1val:0xfcfa0308;  immval:0x0
TEST_PKIMM_OP( kslli8, x29, x27, 0x00000000, 0xfcfa0308, 0x0, x27, x4, 104, x9)

inst_32:
// rs1_b0_val == 2, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x10800502;  immval:0x4
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x10800502, 0x4, x30, x4, 112, x9)

inst_33:
// rs1_b2_val == -17, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x6ef06df;  immval:0x3
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x6ef06df, 0x3, x30, x4, 120, x9)

inst_34:
// rs1_b2_val == -9, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x80f7aa03;  immval:0x1
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x80f7aa03, 0x1, x30, x4, 128, x9)

inst_35:
// rs1_b2_val == 64, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0xfa40fb80;  immval:0x4
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0xfa40fb80, 0x4, x30, x4, 136, x9)

inst_36:
// rs1_b2_val == 4, rs1_b3_val == -1
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0xff04fa80;  immval:0x4
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0xff04fa80, 0x4, x30, x4, 144, x9)

inst_37:
// rs1_b2_val == 1, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x1001063f;  immval:0x5
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x1001063f, 0x5, x30, x4, 152, x9)

inst_38:
// rs1_b2_val == 0, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x00f6f6;  immval:0x1
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x00f6f6, 0x1, x30, x4, 160, x9)

inst_39:
// rs1_b1_val == -65, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x906bff9;  immval:0x5
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x906bff9, 0x5, x30, x4, 168, x9)

inst_40:
// rs1_b2_val == 85, rs1_b1_val == -3
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x5555fdfd;  immval:0x2
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x5555fdfd, 0x2, x30, x4, 176, x9)

inst_41:
// rs1_b0_val == 1, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x1fbdf01;  immval:0x1
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x1fbdf01, 0x1, x30, x4, 184, x9)

inst_42:
// rs1_b2_val == 127, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x47ffb7f;  immval:0x1
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x47ffb7f, 0x1, x30, x4, 192, x9)

inst_43:
// rs1_b1_val == 32, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x8f820f9;  immval:0x1
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x8f820f9, 0x1, x30, x4, 200, x9)

inst_44:
// rs1_b1_val == 16, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0x7fc01008;  immval:0x5
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0x7fc01008, 0x5, x30, x4, 208, x9)

inst_45:
// rs1_b0_val == -1, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0xfcfa02ff;  immval:0x0
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0xfcfa02ff, 0x0, x30, x4, 216, x9)

inst_46:
// rs1_b3_val == -17, rs1_b1_val == 4
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0xeffe04f9;  immval:0x0
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0xeffe04f9, 0x0, x30, x4, 224, x9)

inst_47:
// rs1_b0_val == -17, 
// opcode: kslli8 ; op1:x30; dest:x31; op1val:0xfa02fbef;  immval:0x4
TEST_PKIMM_OP( kslli8, x31, x30, 0x00000000, 0xfa02fbef, 0x4, x30, x4, 232, x9)
#endif


RVTEST_CODE_END
RVMODEL_HALT

RVTEST_DATA_BEGIN
.align 4
rvtest_data:
.word 0xbabecafe
.word 0xabecafeb
.word 0xbecafeba
.word 0xecafebab
RVTEST_DATA_END

RVMODEL_DATA_BEGIN


signature_x17_0:
    .fill 0*(XLEN/32),4,0xdeadbeef


signature_x17_1:
    .fill 36*(XLEN/32),4,0xdeadbeef


signature_x4_0:
    .fill 60*(XLEN/32),4,0xdeadbeef

#ifdef rvtest_mtrap_routine

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

#endif

#ifdef rvtest_gpr_save

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

#endif

RVMODEL_DATA_END
