cvw/tests/wally-riscv-arch-test/riscv-test-suite/rv32e_unratified/C/src/cnop-01.S

141 lines
2.7 KiB
ArmAsm
Raw Normal View History

// -----------
// This file was generated by riscv_ctg (https://gitlab.com/incoresemi/riscv-compliance/riscv_ctg)
// version : 0.5.1
// timestamp : Wed Aug 4 06:39:00 2021 GMT
// usage : riscv_ctg \
// --cgf /home/bilalsakhawat/dev2/riscv-ctg/sample_cgfs/dataset.cgf \
// --cgf /home/bilalsakhawat/dev2/riscv-ctg/sample_cgfs/rv32ec.cgf \
// --base-isa rv32e \
// --randomize
// -----------
//
// -----------
// Copyright (c) 2020. RISC-V International. All rights reserved.
// SPDX-License-Identifier: BSD-3-Clause
// -----------
//
// This assembly file tests the c.nop instruction of the RISC-V C extension for the cnop covergroup.
//
#include "model_test.h"
#include "arch_test.h"
RVTEST_ISA("RV32EC")
.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(.*32.*);check ISA:=regex(.*E.*C.*) ;def RVTEST_E = True;def TEST_CASE_1=True;",cnop)
RVTEST_SIGBASE( x1,signature_x1_1)
inst_0:
// imm_val == 21,
// opcode:c.nop; immval:0x15
TEST_CNOP_OP(c.nop, x2, 0x15, x1, 0)
inst_1:
// imm_val == 31,
// opcode:c.nop; immval:0x1f
TEST_CNOP_OP(c.nop, x2, 0x1f, x1, 4)
inst_2:
// imm_val == -17,
// opcode:c.nop; immval:-0x11
TEST_CNOP_OP(c.nop, x2, -0x11, x1, 8)
inst_3:
// imm_val == -9,
// opcode:c.nop; immval:-0x9
TEST_CNOP_OP(c.nop, x2, -0x9, x1, 12)
inst_4:
// imm_val == -5,
// opcode:c.nop; immval:-0x5
TEST_CNOP_OP(c.nop, x2, -0x5, x1, 16)
inst_5:
// imm_val == -3,
// opcode:c.nop; immval:-0x3
TEST_CNOP_OP(c.nop, x2, -0x3, x1, 20)
inst_6:
// imm_val == -2,
// opcode:c.nop; immval:-0x2
TEST_CNOP_OP(c.nop, x2, -0x2, x1, 24)
inst_7:
// imm_val == -32,
// opcode:c.nop; immval:-0x20
TEST_CNOP_OP(c.nop, x2, -0x20, x1, 28)
inst_8:
// imm_val == 16,
// opcode:c.nop; immval:0x10
TEST_CNOP_OP(c.nop, x2, 0x10, x1, 32)
inst_9:
// imm_val == 8,
// opcode:c.nop; immval:0x8
TEST_CNOP_OP(c.nop, x2, 0x8, x1, 36)
inst_10:
// imm_val == 4,
// opcode:c.nop; immval:0x4
TEST_CNOP_OP(c.nop, x2, 0x4, x1, 40)
inst_11:
// imm_val == 2,
// opcode:c.nop; immval:0x2
TEST_CNOP_OP(c.nop, x2, 0x2, x1, 44)
inst_12:
// imm_val == 1,
// opcode:c.nop; immval:0x1
TEST_CNOP_OP(c.nop, x2, 0x1, x1, 48)
inst_13:
// imm_val == -22,
// opcode:c.nop; immval:-0x16
TEST_CNOP_OP(c.nop, x2, -0x16, x1, 52)
#endif
RVTEST_CODE_END
RVMODEL_HALT
RVTEST_DATA_BEGIN
.align 4
rvtest_data:
.word 0xbabecafe
RVTEST_DATA_END
RVMODEL_DATA_BEGIN
signature_x1_0:
.fill 0*(XLEN/32),4,0xdeadbeef
signature_x1_1:
.fill 14*(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