From b832469973fe5f90674757e594d1d7e92ade559d Mon Sep 17 00:00:00 2001 From: MingZhu Yan Date: Thu, 17 Oct 2024 10:29:27 +0800 Subject: [PATCH] demo --- .vscode/settings.json | 5 + .../rv64i_m/CMO/src/cbo.clean-01.S | 752 +++++++++++++++++ .../rv64i_m/CMO/src/cbo.flush-01.S | 752 +++++++++++++++++ .../rv64i_m/CMO/src/cbo.inval-01.S | 752 +++++++++++++++++ .../rv64i_m/CMO/src/cbo.zero-01 copy.S | 312 +++++++ .../rv64i_m/CMO/src/cbo.zero-01.S | 262 ------ .../rv64i_m/CMO/src/prefetch.i-01.S | 767 +++++++++++++++++ .../rv64i_m/CMO/src/prefetch.r-01.S | 777 ++++++++++++++++++ .../rv64i_m/CMO/src/prefetch.w-01.S | 772 +++++++++++++++++ riscv-test-suite/tmp/cbo.clean-01.S | 752 +++++++++++++++++ riscv-test-suite/tmp/cbo.flush-01.S | 752 +++++++++++++++++ riscv-test-suite/tmp/cbo.inval-01.S | 752 +++++++++++++++++ riscv-test-suite/tmp/cbo.zero-01.S | 312 +++++++ riscv-test-suite/tmp/prefetch.i-01.S | 767 +++++++++++++++++ riscv-test-suite/tmp/prefetch.r-01.S | 777 ++++++++++++++++++ riscv-test-suite/tmp/prefetch.w-01.S | 772 +++++++++++++++++ 16 files changed, 9773 insertions(+), 262 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 riscv-test-suite/rv64i_m/CMO/src/cbo.clean-01.S create mode 100644 riscv-test-suite/rv64i_m/CMO/src/cbo.flush-01.S create mode 100644 riscv-test-suite/rv64i_m/CMO/src/cbo.inval-01.S create mode 100644 riscv-test-suite/rv64i_m/CMO/src/cbo.zero-01 copy.S delete mode 100644 riscv-test-suite/rv64i_m/CMO/src/cbo.zero-01.S create mode 100644 riscv-test-suite/rv64i_m/CMO/src/prefetch.i-01.S create mode 100644 riscv-test-suite/rv64i_m/CMO/src/prefetch.r-01.S create mode 100644 riscv-test-suite/rv64i_m/CMO/src/prefetch.w-01.S create mode 100644 riscv-test-suite/tmp/cbo.clean-01.S create mode 100644 riscv-test-suite/tmp/cbo.flush-01.S create mode 100644 riscv-test-suite/tmp/cbo.inval-01.S create mode 100644 riscv-test-suite/tmp/cbo.zero-01.S create mode 100644 riscv-test-suite/tmp/prefetch.i-01.S create mode 100644 riscv-test-suite/tmp/prefetch.r-01.S create mode 100644 riscv-test-suite/tmp/prefetch.w-01.S diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..4c23f0fbb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "python.analysis.extraPaths": [ + "./riscv-isac" + ] +} \ No newline at end of file diff --git a/riscv-test-suite/rv64i_m/CMO/src/cbo.clean-01.S b/riscv-test-suite/rv64i_m/CMO/src/cbo.clean-01.S new file mode 100644 index 000000000..0be026537 --- /dev/null +++ b/riscv-test-suite/rv64i_m/CMO/src/cbo.clean-01.S @@ -0,0 +1,752 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:03:10 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbom.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the cbo.clean instruction of the RISC-V RV64Zicbom_Zicsr extension for the cbo.clean covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbom_Zicsr") + +.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(.*I.*Zicbom.*Zicsr.*);def TEST_CASE_1=True;",cbo.clean) + +RVTEST_SIGBASE(x12,signature_x12_1) + +inst_0: +// rs1==x2, rs1_val == (2**(xlen)-1), +// opcode: cbo.clean ; op1:x2; op1val:0xffffffffffffffff +TEST_CBO(x12,x2,cbo.clean,0xffffffffffffffff) + +inst_1: +// rs1==x24, rs1_val == 0, +// opcode: cbo.clean ; op1:x24; op1val:0x0 +TEST_CBO(x12,x24,cbo.clean,0x0) + +inst_2: +// rs1==x11, rs1_val == 6148914691236517205, +// opcode: cbo.clean ; op1:x11; op1val:0x5555555555555555 +TEST_CBO(x12,x11,cbo.clean,0x5555555555555555) + +inst_3: +// rs1==x28, rs1_val == 12297829382473034410, +// opcode: cbo.clean ; op1:x28; op1val:0xaaaaaaaaaaaaaaaa +TEST_CBO(x12,x28,cbo.clean,0xaaaaaaaaaaaaaaaa) + +inst_4: +// rs1==x1, rs1_val == 18446744073709551614, +// opcode: cbo.clean ; op1:x1; op1val:0xfffffffffffffffe +TEST_CBO(x12,x1,cbo.clean,0xfffffffffffffffe) + +inst_5: +// rs1==x4, rs1_val == 18446744073709551613, +// opcode: cbo.clean ; op1:x4; op1val:0xfffffffffffffffd +TEST_CBO(x12,x4,cbo.clean,0xfffffffffffffffd) + +inst_6: +// rs1==x23, rs1_val == 18446744073709551611, +// opcode: cbo.clean ; op1:x23; op1val:0xfffffffffffffffb +TEST_CBO(x12,x23,cbo.clean,0xfffffffffffffffb) + +inst_7: +// rs1==x27, rs1_val == 18446744073709551607, +// opcode: cbo.clean ; op1:x27; op1val:0xfffffffffffffff7 +TEST_CBO(x12,x27,cbo.clean,0xfffffffffffffff7) + +inst_8: +// rs1==x10, rs1_val == 18446744073709551599, +// opcode: cbo.clean ; op1:x10; op1val:0xffffffffffffffef +TEST_CBO(x12,x10,cbo.clean,0xffffffffffffffef) + +inst_9: +// rs1==x7, rs1_val == 18446744073709551583, +// opcode: cbo.clean ; op1:x7; op1val:0xffffffffffffffdf +TEST_CBO(x12,x7,cbo.clean,0xffffffffffffffdf) + +inst_10: +// rs1==x18, rs1_val == 18446744073709551551, +// opcode: cbo.clean ; op1:x18; op1val:0xffffffffffffffbf +TEST_CBO(x12,x18,cbo.clean,0xffffffffffffffbf) + +inst_11: +// rs1==x14, rs1_val == 18446744073709551487, +// opcode: cbo.clean ; op1:x14; op1val:0xffffffffffffff7f +TEST_CBO(x12,x14,cbo.clean,0xffffffffffffff7f) + +inst_12: +// rs1==x21, rs1_val == 18446744073709551359, +// opcode: cbo.clean ; op1:x21; op1val:0xfffffffffffffeff +TEST_CBO(x12,x21,cbo.clean,0xfffffffffffffeff) + +inst_13: +// rs1==x6, rs1_val == 18446744073709551103, +// opcode: cbo.clean ; op1:x6; op1val:0xfffffffffffffdff +TEST_CBO(x12,x6,cbo.clean,0xfffffffffffffdff) + +inst_14: +// rs1==x9, rs1_val == 18446744073709550591, +// opcode: cbo.clean ; op1:x9; op1val:0xfffffffffffffbff +TEST_CBO(x12,x9,cbo.clean,0xfffffffffffffbff) + +inst_15: +// rs1==x19, rs1_val == 18446744073709549567, +// opcode: cbo.clean ; op1:x19; op1val:0xfffffffffffff7ff +TEST_CBO(x12,x19,cbo.clean,0xfffffffffffff7ff) + +inst_16: +// rs1==x30, rs1_val == 18446744073709547519, +// opcode: cbo.clean ; op1:x30; op1val:0xffffffffffffefff +TEST_CBO(x12,x30,cbo.clean,0xffffffffffffefff) + +inst_17: +// rs1==x20, rs1_val == 18446744073709543423, +// opcode: cbo.clean ; op1:x20; op1val:0xffffffffffffdfff +TEST_CBO(x12,x20,cbo.clean,0xffffffffffffdfff) + +inst_18: +// rs1==x8, rs1_val == 18446744073709535231, +// opcode: cbo.clean ; op1:x8; op1val:0xffffffffffffbfff +TEST_CBO(x12,x8,cbo.clean,0xffffffffffffbfff) + +inst_19: +// rs1==x31, rs1_val == 18446744073709518847, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffffffff7fff +TEST_CBO(x12,x31,cbo.clean,0xffffffffffff7fff) + +inst_20: +// rs1==x26, rs1_val == 18446744073709486079, +// opcode: cbo.clean ; op1:x26; op1val:0xfffffffffffeffff +TEST_CBO(x12,x26,cbo.clean,0xfffffffffffeffff) + +inst_21: +// rs1==x17, rs1_val == 18446744073709420543, +// opcode: cbo.clean ; op1:x17; op1val:0xfffffffffffdffff +TEST_CBO(x12,x17,cbo.clean,0xfffffffffffdffff) + +inst_22: +// rs1==x25, rs1_val == 18446744073709289471, +// opcode: cbo.clean ; op1:x25; op1val:0xfffffffffffbffff +TEST_CBO(x12,x25,cbo.clean,0xfffffffffffbffff) + +inst_23: +// rs1==x3, rs1_val == 18446744073709027327, +// opcode: cbo.clean ; op1:x3; op1val:0xfffffffffff7ffff +TEST_CBO(x12,x3,cbo.clean,0xfffffffffff7ffff) + +inst_24: +// rs1==x22, rs1_val == 18446744073708503039, +// opcode: cbo.clean ; op1:x22; op1val:0xffffffffffefffff +TEST_CBO(x12,x22,cbo.clean,0xffffffffffefffff) + +inst_25: +// rs1==x29, rs1_val == 18446744073707454463, +// opcode: cbo.clean ; op1:x29; op1val:0xffffffffffdfffff +TEST_CBO(x12,x29,cbo.clean,0xffffffffffdfffff) + +inst_26: +// rs1==x5, rs1_val == 18446744073705357311, +// opcode: cbo.clean ; op1:x5; op1val:0xffffffffffbfffff +TEST_CBO(x12,x5,cbo.clean,0xffffffffffbfffff) + +inst_27: +// rs1==x15, rs1_val == 18446744073701163007, +// opcode: cbo.clean ; op1:x15; op1val:0xffffffffff7fffff +TEST_CBO(x12,x15,cbo.clean,0xffffffffff7fffff) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_28: +// rs1==x12, rs1_val == 18446744073692774399, +// opcode: cbo.clean ; op1:x12; op1val:0xfffffffffeffffff +TEST_CBO(x1,x12,cbo.clean,0xfffffffffeffffff) + +inst_29: +// rs1==x13, rs1_val == 18446744073675997183, +// opcode: cbo.clean ; op1:x13; op1val:0xfffffffffdffffff +TEST_CBO(x1,x13,cbo.clean,0xfffffffffdffffff) + +inst_30: +// rs1==x16, rs1_val == 18446744073642442751, +// opcode: cbo.clean ; op1:x16; op1val:0xfffffffffbffffff +TEST_CBO(x1,x16,cbo.clean,0xfffffffffbffffff) + +inst_31: +// rs1_val == 18446744073575333887, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffffff7ffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffffff7ffffff) + +inst_32: +// rs1_val == 18446744073441116159, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffffefffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffffefffffff) + +inst_33: +// rs1_val == 18446744073172680703, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffffdfffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffffdfffffff) + +inst_34: +// rs1_val == 18446744072635809791, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffffbfffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffffbfffffff) + +inst_35: +// rs1_val == 18446744071562067967, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffff7fffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffff7fffffff) + +inst_36: +// rs1_val == 18446744069414584319, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffffeffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffffeffffffff) + +inst_37: +// rs1_val == 18446744065119617023, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffffdffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffffdffffffff) + +inst_38: +// rs1_val == 18446744056529682431, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffffbffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffffbffffffff) + +inst_39: +// rs1_val == 18446744039349813247, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffff7ffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffff7ffffffff) + +inst_40: +// rs1_val == 18446744004990074879, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffefffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffefffffffff) + +inst_41: +// rs1_val == 18446743936270598143, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffdfffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffdfffffffff) + +inst_42: +// rs1_val == 18446743798831644671, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffbfffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffbfffffffff) + +inst_43: +// rs1_val == 18446743523953737727, +// opcode: cbo.clean ; op1:x31; op1val:0xffffff7fffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffff7fffffffff) + +inst_44: +// rs1_val == 18446742974197923839, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffeffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffeffffffffff) + +inst_45: +// rs1_val == 18446741874686296063, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffdffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffdffffffffff) + +inst_46: +// rs1_val == 18446739675663040511, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffbffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffbffffffffff) + +inst_47: +// rs1_val == 18446735277616529407, +// opcode: cbo.clean ; op1:x31; op1val:0xfffff7ffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffff7ffffffffff) + +inst_48: +// rs1_val == 18446726481523507199, +// opcode: cbo.clean ; op1:x31; op1val:0xffffefffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffefffffffffff) + +inst_49: +// rs1_val == 18446708889337462783, +// opcode: cbo.clean ; op1:x31; op1val:0xffffdfffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffdfffffffffff) + +inst_50: +// rs1_val == 18446673704965373951, +// opcode: cbo.clean ; op1:x31; op1val:0xffffbfffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffbfffffffffff) + +inst_51: +// rs1_val == 18446603336221196287, +// opcode: cbo.clean ; op1:x31; op1val:0xffff7fffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffff7fffffffffff) + +inst_52: +// rs1_val == 18446462598732840959, +// opcode: cbo.clean ; op1:x31; op1val:0xfffeffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffeffffffffffff) + +inst_53: +// rs1_val == 18446181123756130303, +// opcode: cbo.clean ; op1:x31; op1val:0xfffdffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffdffffffffffff) + +inst_54: +// rs1_val == 18445618173802708991, +// opcode: cbo.clean ; op1:x31; op1val:0xfffbffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffbffffffffffff) + +inst_55: +// rs1_val == 18444492273895866367, +// opcode: cbo.clean ; op1:x31; op1val:0xfff7ffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfff7ffffffffffff) + +inst_56: +// rs1_val == 18442240474082181119, +// opcode: cbo.clean ; op1:x31; op1val:0xffefffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffefffffffffffff) + +inst_57: +// rs1_val == 18437736874454810623, +// opcode: cbo.clean ; op1:x31; op1val:0xffdfffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffdfffffffffffff) + +inst_58: +// rs1_val == 18428729675200069631, +// opcode: cbo.clean ; op1:x31; op1val:0xffbfffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffbfffffffffffff) + +inst_59: +// rs1_val == 18410715276690587647, +// opcode: cbo.clean ; op1:x31; op1val:0xff7fffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xff7fffffffffffff) + +inst_60: +// rs1_val == 18374686479671623679, +// opcode: cbo.clean ; op1:x31; op1val:0xfeffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfeffffffffffffff) + +inst_61: +// rs1_val == 18302628885633695743, +// opcode: cbo.clean ; op1:x31; op1val:0xfdffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfdffffffffffffff) + +inst_62: +// rs1_val == 18158513697557839871, +// opcode: cbo.clean ; op1:x31; op1val:0xfbffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfbffffffffffffff) + +inst_63: +// rs1_val == 17870283321406128127, +// opcode: cbo.clean ; op1:x31; op1val:0xf7ffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xf7ffffffffffffff) + +inst_64: +// rs1_val == 17293822569102704639, +// opcode: cbo.clean ; op1:x31; op1val:0xefffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xefffffffffffffff) + +inst_65: +// rs1_val == 16140901064495857663, +// opcode: cbo.clean ; op1:x31; op1val:0xdfffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xdfffffffffffffff) + +inst_66: +// rs1_val == 13835058055282163711, +// opcode: cbo.clean ; op1:x31; op1val:0xbfffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xbfffffffffffffff) + +inst_67: +// rs1_val == 9223372036854775807, +// opcode: cbo.clean ; op1:x31; op1val:0x7fffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0x7fffffffffffffff) + +inst_68: +// rs1_val == 1, +// opcode: cbo.clean ; op1:x31; op1val:0x1 +TEST_CBO(x1,x31,cbo.clean,0x1) + +inst_69: +// rs1_val == 1152921504606846976, +// opcode: cbo.clean ; op1:x31; op1val:0x1000000000000000 +TEST_CBO(x1,x31,cbo.clean,0x1000000000000000) + +inst_70: +// rs1_val == 2305843009213693952, +// opcode: cbo.clean ; op1:x31; op1val:0x2000000000000000 +TEST_CBO(x1,x31,cbo.clean,0x2000000000000000) + +inst_71: +// rs1_val == 4611686018427387904, +// opcode: cbo.clean ; op1:x31; op1val:0x4000000000000000 +TEST_CBO(x1,x31,cbo.clean,0x4000000000000000) + +inst_72: +// rs1_val == 9223372036854775808, +// opcode: cbo.clean ; op1:x31; op1val:0x8000000000000000 +TEST_CBO(x1,x31,cbo.clean,0x8000000000000000) + +inst_73: +// rs1_val == 2, +// opcode: cbo.clean ; op1:x31; op1val:0x2 +TEST_CBO(x1,x31,cbo.clean,0x2) + +inst_74: +// rs1_val == 4, +// opcode: cbo.clean ; op1:x31; op1val:0x4 +TEST_CBO(x1,x31,cbo.clean,0x4) + +inst_75: +// rs1_val == 8, +// opcode: cbo.clean ; op1:x31; op1val:0x8 +TEST_CBO(x1,x31,cbo.clean,0x8) + +inst_76: +// rs1_val == 16, +// opcode: cbo.clean ; op1:x31; op1val:0x10 +TEST_CBO(x1,x31,cbo.clean,0x10) + +inst_77: +// rs1_val == 32, +// opcode: cbo.clean ; op1:x31; op1val:0x20 +TEST_CBO(x1,x31,cbo.clean,0x20) + +inst_78: +// rs1_val == 64, +// opcode: cbo.clean ; op1:x31; op1val:0x40 +TEST_CBO(x1,x31,cbo.clean,0x40) + +inst_79: +// rs1_val == 128, +// opcode: cbo.clean ; op1:x31; op1val:0x80 +TEST_CBO(x1,x31,cbo.clean,0x80) + +inst_80: +// rs1_val == 256, +// opcode: cbo.clean ; op1:x31; op1val:0x100 +TEST_CBO(x1,x31,cbo.clean,0x100) + +inst_81: +// rs1_val == 512, +// opcode: cbo.clean ; op1:x31; op1val:0x200 +TEST_CBO(x1,x31,cbo.clean,0x200) + +inst_82: +// rs1_val == 1024, +// opcode: cbo.clean ; op1:x31; op1val:0x400 +TEST_CBO(x1,x31,cbo.clean,0x400) + +inst_83: +// rs1_val == 2048, +// opcode: cbo.clean ; op1:x31; op1val:0x800 +TEST_CBO(x1,x31,cbo.clean,0x800) + +inst_84: +// rs1_val == 4096, +// opcode: cbo.clean ; op1:x31; op1val:0x1000 +TEST_CBO(x1,x31,cbo.clean,0x1000) + +inst_85: +// rs1_val == 8192, +// opcode: cbo.clean ; op1:x31; op1val:0x2000 +TEST_CBO(x1,x31,cbo.clean,0x2000) + +inst_86: +// rs1_val == 16384, +// opcode: cbo.clean ; op1:x31; op1val:0x4000 +TEST_CBO(x1,x31,cbo.clean,0x4000) + +inst_87: +// rs1_val == 32768, +// opcode: cbo.clean ; op1:x31; op1val:0x8000 +TEST_CBO(x1,x31,cbo.clean,0x8000) + +inst_88: +// rs1_val == 65536, +// opcode: cbo.clean ; op1:x31; op1val:0x10000 +TEST_CBO(x1,x31,cbo.clean,0x10000) + +inst_89: +// rs1_val == 131072, +// opcode: cbo.clean ; op1:x31; op1val:0x20000 +TEST_CBO(x1,x31,cbo.clean,0x20000) + +inst_90: +// rs1_val == 262144, +// opcode: cbo.clean ; op1:x31; op1val:0x40000 +TEST_CBO(x1,x31,cbo.clean,0x40000) + +inst_91: +// rs1_val == 524288, +// opcode: cbo.clean ; op1:x31; op1val:0x80000 +TEST_CBO(x1,x31,cbo.clean,0x80000) + +inst_92: +// rs1_val == 1048576, +// opcode: cbo.clean ; op1:x31; op1val:0x100000 +TEST_CBO(x1,x31,cbo.clean,0x100000) + +inst_93: +// rs1_val == 2097152, +// opcode: cbo.clean ; op1:x31; op1val:0x200000 +TEST_CBO(x1,x31,cbo.clean,0x200000) + +inst_94: +// rs1_val == 4194304, +// opcode: cbo.clean ; op1:x31; op1val:0x400000 +TEST_CBO(x1,x31,cbo.clean,0x400000) + +inst_95: +// rs1_val == 8388608, +// opcode: cbo.clean ; op1:x31; op1val:0x800000 +TEST_CBO(x1,x31,cbo.clean,0x800000) + +inst_96: +// rs1_val == 16777216, +// opcode: cbo.clean ; op1:x31; op1val:0x1000000 +TEST_CBO(x1,x31,cbo.clean,0x1000000) + +inst_97: +// rs1_val == 33554432, +// opcode: cbo.clean ; op1:x31; op1val:0x2000000 +TEST_CBO(x1,x31,cbo.clean,0x2000000) + +inst_98: +// rs1_val == 67108864, +// opcode: cbo.clean ; op1:x31; op1val:0x4000000 +TEST_CBO(x1,x31,cbo.clean,0x4000000) + +inst_99: +// rs1_val == 134217728, +// opcode: cbo.clean ; op1:x31; op1val:0x8000000 +TEST_CBO(x1,x31,cbo.clean,0x8000000) + +inst_100: +// rs1_val == 268435456, +// opcode: cbo.clean ; op1:x31; op1val:0x10000000 +TEST_CBO(x1,x31,cbo.clean,0x10000000) + +inst_101: +// rs1_val == 536870912, +// opcode: cbo.clean ; op1:x31; op1val:0x20000000 +TEST_CBO(x1,x31,cbo.clean,0x20000000) + +inst_102: +// rs1_val == 1073741824, +// opcode: cbo.clean ; op1:x31; op1val:0x40000000 +TEST_CBO(x1,x31,cbo.clean,0x40000000) + +inst_103: +// rs1_val == 2147483648, +// opcode: cbo.clean ; op1:x31; op1val:0x80000000 +TEST_CBO(x1,x31,cbo.clean,0x80000000) + +inst_104: +// rs1_val == 4294967296, +// opcode: cbo.clean ; op1:x31; op1val:0x100000000 +TEST_CBO(x1,x31,cbo.clean,0x100000000) + +inst_105: +// rs1_val == 8589934592, +// opcode: cbo.clean ; op1:x31; op1val:0x200000000 +TEST_CBO(x1,x31,cbo.clean,0x200000000) + +inst_106: +// rs1_val == 17179869184, +// opcode: cbo.clean ; op1:x31; op1val:0x400000000 +TEST_CBO(x1,x31,cbo.clean,0x400000000) + +inst_107: +// rs1_val == 34359738368, +// opcode: cbo.clean ; op1:x31; op1val:0x800000000 +TEST_CBO(x1,x31,cbo.clean,0x800000000) + +inst_108: +// rs1_val == 68719476736, +// opcode: cbo.clean ; op1:x31; op1val:0x1000000000 +TEST_CBO(x1,x31,cbo.clean,0x1000000000) + +inst_109: +// rs1_val == 137438953472, +// opcode: cbo.clean ; op1:x31; op1val:0x2000000000 +TEST_CBO(x1,x31,cbo.clean,0x2000000000) + +inst_110: +// rs1_val == 274877906944, +// opcode: cbo.clean ; op1:x31; op1val:0x4000000000 +TEST_CBO(x1,x31,cbo.clean,0x4000000000) + +inst_111: +// rs1_val == 549755813888, +// opcode: cbo.clean ; op1:x31; op1val:0x8000000000 +TEST_CBO(x1,x31,cbo.clean,0x8000000000) + +inst_112: +// rs1_val == 1099511627776, +// opcode: cbo.clean ; op1:x31; op1val:0x10000000000 +TEST_CBO(x1,x31,cbo.clean,0x10000000000) + +inst_113: +// rs1_val == 2199023255552, +// opcode: cbo.clean ; op1:x31; op1val:0x20000000000 +TEST_CBO(x1,x31,cbo.clean,0x20000000000) + +inst_114: +// rs1_val == 4398046511104, +// opcode: cbo.clean ; op1:x31; op1val:0x40000000000 +TEST_CBO(x1,x31,cbo.clean,0x40000000000) + +inst_115: +// rs1_val == 8796093022208, +// opcode: cbo.clean ; op1:x31; op1val:0x80000000000 +TEST_CBO(x1,x31,cbo.clean,0x80000000000) + +inst_116: +// rs1_val == 17592186044416, +// opcode: cbo.clean ; op1:x31; op1val:0x100000000000 +TEST_CBO(x1,x31,cbo.clean,0x100000000000) + +inst_117: +// rs1_val == 35184372088832, +// opcode: cbo.clean ; op1:x31; op1val:0x200000000000 +TEST_CBO(x1,x31,cbo.clean,0x200000000000) + +inst_118: +// rs1_val == 70368744177664, +// opcode: cbo.clean ; op1:x31; op1val:0x400000000000 +TEST_CBO(x1,x31,cbo.clean,0x400000000000) + +inst_119: +// rs1_val == 140737488355328, +// opcode: cbo.clean ; op1:x31; op1val:0x800000000000 +TEST_CBO(x1,x31,cbo.clean,0x800000000000) + +inst_120: +// rs1_val == 281474976710656, +// opcode: cbo.clean ; op1:x31; op1val:0x1000000000000 +TEST_CBO(x1,x31,cbo.clean,0x1000000000000) + +inst_121: +// rs1_val == 562949953421312, +// opcode: cbo.clean ; op1:x31; op1val:0x2000000000000 +TEST_CBO(x1,x31,cbo.clean,0x2000000000000) + +inst_122: +// rs1_val == 1125899906842624, +// opcode: cbo.clean ; op1:x31; op1val:0x4000000000000 +TEST_CBO(x1,x31,cbo.clean,0x4000000000000) + +inst_123: +// rs1_val == 2251799813685248, +// opcode: cbo.clean ; op1:x31; op1val:0x8000000000000 +TEST_CBO(x1,x31,cbo.clean,0x8000000000000) + +inst_124: +// rs1_val == 4503599627370496, +// opcode: cbo.clean ; op1:x31; op1val:0x10000000000000 +TEST_CBO(x1,x31,cbo.clean,0x10000000000000) + +inst_125: +// rs1_val == 9007199254740992, +// opcode: cbo.clean ; op1:x31; op1val:0x20000000000000 +TEST_CBO(x1,x31,cbo.clean,0x20000000000000) + +inst_126: +// rs1_val == 18014398509481984, +// opcode: cbo.clean ; op1:x31; op1val:0x40000000000000 +TEST_CBO(x1,x31,cbo.clean,0x40000000000000) + +inst_127: +// rs1_val == 36028797018963968, +// opcode: cbo.clean ; op1:x31; op1val:0x80000000000000 +TEST_CBO(x1,x31,cbo.clean,0x80000000000000) + +inst_128: +// rs1_val == 72057594037927936, +// opcode: cbo.clean ; op1:x31; op1val:0x100000000000000 +TEST_CBO(x1,x31,cbo.clean,0x100000000000000) + +inst_129: +// rs1_val == 144115188075855872, +// opcode: cbo.clean ; op1:x31; op1val:0x200000000000000 +TEST_CBO(x1,x31,cbo.clean,0x200000000000000) + +inst_130: +// rs1_val == 288230376151711744, +// opcode: cbo.clean ; op1:x31; op1val:0x400000000000000 +TEST_CBO(x1,x31,cbo.clean,0x400000000000000) + +inst_131: +// rs1_val == 576460752303423488, +// opcode: cbo.clean ; op1:x31; op1val:0x800000000000000 +TEST_CBO(x1,x31,cbo.clean,0x800000000000000) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x12_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x12_1: + .fill 28*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 104*((XLEN/8)/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 diff --git a/riscv-test-suite/rv64i_m/CMO/src/cbo.flush-01.S b/riscv-test-suite/rv64i_m/CMO/src/cbo.flush-01.S new file mode 100644 index 000000000..a56babe85 --- /dev/null +++ b/riscv-test-suite/rv64i_m/CMO/src/cbo.flush-01.S @@ -0,0 +1,752 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:03:10 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbom.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the cbo.flush instruction of the RISC-V RV64Zicbom_Zicsr extension for the cbo.flush covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbom_Zicsr") + +.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(.*I.*Zicbom.*Zicsr.*);def TEST_CASE_1=True;",cbo.flush) + +RVTEST_SIGBASE(x15,signature_x15_1) + +inst_0: +// rs1==x5, rs1_val == (2**(xlen)-1), +// opcode: cbo.flush ; op1:x5; op1val:0xffffffffffffffff +TEST_CBO(x15,x5,cbo.flush,0xffffffffffffffff) + +inst_1: +// rs1==x10, rs1_val == 0, +// opcode: cbo.flush ; op1:x10; op1val:0x0 +TEST_CBO(x15,x10,cbo.flush,0x0) + +inst_2: +// rs1==x21, rs1_val == 6148914691236517205, +// opcode: cbo.flush ; op1:x21; op1val:0x5555555555555555 +TEST_CBO(x15,x21,cbo.flush,0x5555555555555555) + +inst_3: +// rs1==x7, rs1_val == 12297829382473034410, +// opcode: cbo.flush ; op1:x7; op1val:0xaaaaaaaaaaaaaaaa +TEST_CBO(x15,x7,cbo.flush,0xaaaaaaaaaaaaaaaa) + +inst_4: +// rs1==x12, rs1_val == 18446744073709551614, +// opcode: cbo.flush ; op1:x12; op1val:0xfffffffffffffffe +TEST_CBO(x15,x12,cbo.flush,0xfffffffffffffffe) + +inst_5: +// rs1==x30, rs1_val == 18446744073709551613, +// opcode: cbo.flush ; op1:x30; op1val:0xfffffffffffffffd +TEST_CBO(x15,x30,cbo.flush,0xfffffffffffffffd) + +inst_6: +// rs1==x23, rs1_val == 18446744073709551611, +// opcode: cbo.flush ; op1:x23; op1val:0xfffffffffffffffb +TEST_CBO(x15,x23,cbo.flush,0xfffffffffffffffb) + +inst_7: +// rs1==x3, rs1_val == 18446744073709551607, +// opcode: cbo.flush ; op1:x3; op1val:0xfffffffffffffff7 +TEST_CBO(x15,x3,cbo.flush,0xfffffffffffffff7) + +inst_8: +// rs1==x9, rs1_val == 18446744073709551599, +// opcode: cbo.flush ; op1:x9; op1val:0xffffffffffffffef +TEST_CBO(x15,x9,cbo.flush,0xffffffffffffffef) + +inst_9: +// rs1==x25, rs1_val == 18446744073709551583, +// opcode: cbo.flush ; op1:x25; op1val:0xffffffffffffffdf +TEST_CBO(x15,x25,cbo.flush,0xffffffffffffffdf) + +inst_10: +// rs1==x6, rs1_val == 18446744073709551551, +// opcode: cbo.flush ; op1:x6; op1val:0xffffffffffffffbf +TEST_CBO(x15,x6,cbo.flush,0xffffffffffffffbf) + +inst_11: +// rs1==x31, rs1_val == 18446744073709551487, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffffffffff7f +TEST_CBO(x15,x31,cbo.flush,0xffffffffffffff7f) + +inst_12: +// rs1==x18, rs1_val == 18446744073709551359, +// opcode: cbo.flush ; op1:x18; op1val:0xfffffffffffffeff +TEST_CBO(x15,x18,cbo.flush,0xfffffffffffffeff) + +inst_13: +// rs1==x24, rs1_val == 18446744073709551103, +// opcode: cbo.flush ; op1:x24; op1val:0xfffffffffffffdff +TEST_CBO(x15,x24,cbo.flush,0xfffffffffffffdff) + +inst_14: +// rs1==x28, rs1_val == 18446744073709550591, +// opcode: cbo.flush ; op1:x28; op1val:0xfffffffffffffbff +TEST_CBO(x15,x28,cbo.flush,0xfffffffffffffbff) + +inst_15: +// rs1==x26, rs1_val == 18446744073709549567, +// opcode: cbo.flush ; op1:x26; op1val:0xfffffffffffff7ff +TEST_CBO(x15,x26,cbo.flush,0xfffffffffffff7ff) + +inst_16: +// rs1==x17, rs1_val == 18446744073709547519, +// opcode: cbo.flush ; op1:x17; op1val:0xffffffffffffefff +TEST_CBO(x15,x17,cbo.flush,0xffffffffffffefff) + +inst_17: +// rs1==x8, rs1_val == 18446744073709543423, +// opcode: cbo.flush ; op1:x8; op1val:0xffffffffffffdfff +TEST_CBO(x15,x8,cbo.flush,0xffffffffffffdfff) + +inst_18: +// rs1==x16, rs1_val == 18446744073709535231, +// opcode: cbo.flush ; op1:x16; op1val:0xffffffffffffbfff +TEST_CBO(x15,x16,cbo.flush,0xffffffffffffbfff) + +inst_19: +// rs1==x13, rs1_val == 18446744073709518847, +// opcode: cbo.flush ; op1:x13; op1val:0xffffffffffff7fff +TEST_CBO(x15,x13,cbo.flush,0xffffffffffff7fff) + +inst_20: +// rs1==x22, rs1_val == 18446744073709486079, +// opcode: cbo.flush ; op1:x22; op1val:0xfffffffffffeffff +TEST_CBO(x15,x22,cbo.flush,0xfffffffffffeffff) + +inst_21: +// rs1==x1, rs1_val == 18446744073709420543, +// opcode: cbo.flush ; op1:x1; op1val:0xfffffffffffdffff +TEST_CBO(x15,x1,cbo.flush,0xfffffffffffdffff) + +inst_22: +// rs1==x4, rs1_val == 18446744073709289471, +// opcode: cbo.flush ; op1:x4; op1val:0xfffffffffffbffff +TEST_CBO(x15,x4,cbo.flush,0xfffffffffffbffff) + +inst_23: +// rs1==x11, rs1_val == 18446744073709027327, +// opcode: cbo.flush ; op1:x11; op1val:0xfffffffffff7ffff +TEST_CBO(x15,x11,cbo.flush,0xfffffffffff7ffff) + +inst_24: +// rs1==x14, rs1_val == 18446744073708503039, +// opcode: cbo.flush ; op1:x14; op1val:0xffffffffffefffff +TEST_CBO(x15,x14,cbo.flush,0xffffffffffefffff) + +inst_25: +// rs1==x19, rs1_val == 18446744073707454463, +// opcode: cbo.flush ; op1:x19; op1val:0xffffffffffdfffff +TEST_CBO(x15,x19,cbo.flush,0xffffffffffdfffff) + +inst_26: +// rs1==x2, rs1_val == 18446744073705357311, +// opcode: cbo.flush ; op1:x2; op1val:0xffffffffffbfffff +TEST_CBO(x15,x2,cbo.flush,0xffffffffffbfffff) + +inst_27: +// rs1==x27, rs1_val == 18446744073701163007, +// opcode: cbo.flush ; op1:x27; op1val:0xffffffffff7fffff +TEST_CBO(x15,x27,cbo.flush,0xffffffffff7fffff) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_28: +// rs1==x15, rs1_val == 18446744073692774399, +// opcode: cbo.flush ; op1:x15; op1val:0xfffffffffeffffff +TEST_CBO(x1,x15,cbo.flush,0xfffffffffeffffff) + +inst_29: +// rs1==x20, rs1_val == 18446744073675997183, +// opcode: cbo.flush ; op1:x20; op1val:0xfffffffffdffffff +TEST_CBO(x1,x20,cbo.flush,0xfffffffffdffffff) + +inst_30: +// rs1==x29, rs1_val == 18446744073642442751, +// opcode: cbo.flush ; op1:x29; op1val:0xfffffffffbffffff +TEST_CBO(x1,x29,cbo.flush,0xfffffffffbffffff) + +inst_31: +// rs1_val == 18446744073575333887, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffffff7ffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffffff7ffffff) + +inst_32: +// rs1_val == 18446744073441116159, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffffefffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffffefffffff) + +inst_33: +// rs1_val == 18446744073172680703, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffffdfffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffffdfffffff) + +inst_34: +// rs1_val == 18446744072635809791, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffffbfffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffffbfffffff) + +inst_35: +// rs1_val == 18446744071562067967, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffff7fffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffff7fffffff) + +inst_36: +// rs1_val == 18446744069414584319, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffffeffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffffeffffffff) + +inst_37: +// rs1_val == 18446744065119617023, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffffdffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffffdffffffff) + +inst_38: +// rs1_val == 18446744056529682431, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffffbffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffffbffffffff) + +inst_39: +// rs1_val == 18446744039349813247, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffff7ffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffff7ffffffff) + +inst_40: +// rs1_val == 18446744004990074879, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffefffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffefffffffff) + +inst_41: +// rs1_val == 18446743936270598143, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffdfffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffdfffffffff) + +inst_42: +// rs1_val == 18446743798831644671, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffbfffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffbfffffffff) + +inst_43: +// rs1_val == 18446743523953737727, +// opcode: cbo.flush ; op1:x31; op1val:0xffffff7fffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffff7fffffffff) + +inst_44: +// rs1_val == 18446742974197923839, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffeffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffeffffffffff) + +inst_45: +// rs1_val == 18446741874686296063, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffdffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffdffffffffff) + +inst_46: +// rs1_val == 18446739675663040511, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffbffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffbffffffffff) + +inst_47: +// rs1_val == 18446735277616529407, +// opcode: cbo.flush ; op1:x31; op1val:0xfffff7ffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffff7ffffffffff) + +inst_48: +// rs1_val == 18446726481523507199, +// opcode: cbo.flush ; op1:x31; op1val:0xffffefffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffefffffffffff) + +inst_49: +// rs1_val == 18446708889337462783, +// opcode: cbo.flush ; op1:x31; op1val:0xffffdfffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffdfffffffffff) + +inst_50: +// rs1_val == 18446673704965373951, +// opcode: cbo.flush ; op1:x31; op1val:0xffffbfffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffbfffffffffff) + +inst_51: +// rs1_val == 18446603336221196287, +// opcode: cbo.flush ; op1:x31; op1val:0xffff7fffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffff7fffffffffff) + +inst_52: +// rs1_val == 18446462598732840959, +// opcode: cbo.flush ; op1:x31; op1val:0xfffeffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffeffffffffffff) + +inst_53: +// rs1_val == 18446181123756130303, +// opcode: cbo.flush ; op1:x31; op1val:0xfffdffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffdffffffffffff) + +inst_54: +// rs1_val == 18445618173802708991, +// opcode: cbo.flush ; op1:x31; op1val:0xfffbffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffbffffffffffff) + +inst_55: +// rs1_val == 18444492273895866367, +// opcode: cbo.flush ; op1:x31; op1val:0xfff7ffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfff7ffffffffffff) + +inst_56: +// rs1_val == 18442240474082181119, +// opcode: cbo.flush ; op1:x31; op1val:0xffefffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffefffffffffffff) + +inst_57: +// rs1_val == 18437736874454810623, +// opcode: cbo.flush ; op1:x31; op1val:0xffdfffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffdfffffffffffff) + +inst_58: +// rs1_val == 18428729675200069631, +// opcode: cbo.flush ; op1:x31; op1val:0xffbfffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffbfffffffffffff) + +inst_59: +// rs1_val == 18410715276690587647, +// opcode: cbo.flush ; op1:x31; op1val:0xff7fffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xff7fffffffffffff) + +inst_60: +// rs1_val == 18374686479671623679, +// opcode: cbo.flush ; op1:x31; op1val:0xfeffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfeffffffffffffff) + +inst_61: +// rs1_val == 18302628885633695743, +// opcode: cbo.flush ; op1:x31; op1val:0xfdffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfdffffffffffffff) + +inst_62: +// rs1_val == 18158513697557839871, +// opcode: cbo.flush ; op1:x31; op1val:0xfbffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfbffffffffffffff) + +inst_63: +// rs1_val == 17870283321406128127, +// opcode: cbo.flush ; op1:x31; op1val:0xf7ffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xf7ffffffffffffff) + +inst_64: +// rs1_val == 17293822569102704639, +// opcode: cbo.flush ; op1:x31; op1val:0xefffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xefffffffffffffff) + +inst_65: +// rs1_val == 16140901064495857663, +// opcode: cbo.flush ; op1:x31; op1val:0xdfffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xdfffffffffffffff) + +inst_66: +// rs1_val == 13835058055282163711, +// opcode: cbo.flush ; op1:x31; op1val:0xbfffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xbfffffffffffffff) + +inst_67: +// rs1_val == 9223372036854775807, +// opcode: cbo.flush ; op1:x31; op1val:0x7fffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0x7fffffffffffffff) + +inst_68: +// rs1_val == 1, +// opcode: cbo.flush ; op1:x31; op1val:0x1 +TEST_CBO(x1,x31,cbo.flush,0x1) + +inst_69: +// rs1_val == 1152921504606846976, +// opcode: cbo.flush ; op1:x31; op1val:0x1000000000000000 +TEST_CBO(x1,x31,cbo.flush,0x1000000000000000) + +inst_70: +// rs1_val == 2305843009213693952, +// opcode: cbo.flush ; op1:x31; op1val:0x2000000000000000 +TEST_CBO(x1,x31,cbo.flush,0x2000000000000000) + +inst_71: +// rs1_val == 4611686018427387904, +// opcode: cbo.flush ; op1:x31; op1val:0x4000000000000000 +TEST_CBO(x1,x31,cbo.flush,0x4000000000000000) + +inst_72: +// rs1_val == 9223372036854775808, +// opcode: cbo.flush ; op1:x31; op1val:0x8000000000000000 +TEST_CBO(x1,x31,cbo.flush,0x8000000000000000) + +inst_73: +// rs1_val == 2, +// opcode: cbo.flush ; op1:x31; op1val:0x2 +TEST_CBO(x1,x31,cbo.flush,0x2) + +inst_74: +// rs1_val == 4, +// opcode: cbo.flush ; op1:x31; op1val:0x4 +TEST_CBO(x1,x31,cbo.flush,0x4) + +inst_75: +// rs1_val == 8, +// opcode: cbo.flush ; op1:x31; op1val:0x8 +TEST_CBO(x1,x31,cbo.flush,0x8) + +inst_76: +// rs1_val == 16, +// opcode: cbo.flush ; op1:x31; op1val:0x10 +TEST_CBO(x1,x31,cbo.flush,0x10) + +inst_77: +// rs1_val == 32, +// opcode: cbo.flush ; op1:x31; op1val:0x20 +TEST_CBO(x1,x31,cbo.flush,0x20) + +inst_78: +// rs1_val == 64, +// opcode: cbo.flush ; op1:x31; op1val:0x40 +TEST_CBO(x1,x31,cbo.flush,0x40) + +inst_79: +// rs1_val == 128, +// opcode: cbo.flush ; op1:x31; op1val:0x80 +TEST_CBO(x1,x31,cbo.flush,0x80) + +inst_80: +// rs1_val == 256, +// opcode: cbo.flush ; op1:x31; op1val:0x100 +TEST_CBO(x1,x31,cbo.flush,0x100) + +inst_81: +// rs1_val == 512, +// opcode: cbo.flush ; op1:x31; op1val:0x200 +TEST_CBO(x1,x31,cbo.flush,0x200) + +inst_82: +// rs1_val == 1024, +// opcode: cbo.flush ; op1:x31; op1val:0x400 +TEST_CBO(x1,x31,cbo.flush,0x400) + +inst_83: +// rs1_val == 2048, +// opcode: cbo.flush ; op1:x31; op1val:0x800 +TEST_CBO(x1,x31,cbo.flush,0x800) + +inst_84: +// rs1_val == 4096, +// opcode: cbo.flush ; op1:x31; op1val:0x1000 +TEST_CBO(x1,x31,cbo.flush,0x1000) + +inst_85: +// rs1_val == 8192, +// opcode: cbo.flush ; op1:x31; op1val:0x2000 +TEST_CBO(x1,x31,cbo.flush,0x2000) + +inst_86: +// rs1_val == 16384, +// opcode: cbo.flush ; op1:x31; op1val:0x4000 +TEST_CBO(x1,x31,cbo.flush,0x4000) + +inst_87: +// rs1_val == 32768, +// opcode: cbo.flush ; op1:x31; op1val:0x8000 +TEST_CBO(x1,x31,cbo.flush,0x8000) + +inst_88: +// rs1_val == 65536, +// opcode: cbo.flush ; op1:x31; op1val:0x10000 +TEST_CBO(x1,x31,cbo.flush,0x10000) + +inst_89: +// rs1_val == 131072, +// opcode: cbo.flush ; op1:x31; op1val:0x20000 +TEST_CBO(x1,x31,cbo.flush,0x20000) + +inst_90: +// rs1_val == 262144, +// opcode: cbo.flush ; op1:x31; op1val:0x40000 +TEST_CBO(x1,x31,cbo.flush,0x40000) + +inst_91: +// rs1_val == 524288, +// opcode: cbo.flush ; op1:x31; op1val:0x80000 +TEST_CBO(x1,x31,cbo.flush,0x80000) + +inst_92: +// rs1_val == 1048576, +// opcode: cbo.flush ; op1:x31; op1val:0x100000 +TEST_CBO(x1,x31,cbo.flush,0x100000) + +inst_93: +// rs1_val == 2097152, +// opcode: cbo.flush ; op1:x31; op1val:0x200000 +TEST_CBO(x1,x31,cbo.flush,0x200000) + +inst_94: +// rs1_val == 4194304, +// opcode: cbo.flush ; op1:x31; op1val:0x400000 +TEST_CBO(x1,x31,cbo.flush,0x400000) + +inst_95: +// rs1_val == 8388608, +// opcode: cbo.flush ; op1:x31; op1val:0x800000 +TEST_CBO(x1,x31,cbo.flush,0x800000) + +inst_96: +// rs1_val == 16777216, +// opcode: cbo.flush ; op1:x31; op1val:0x1000000 +TEST_CBO(x1,x31,cbo.flush,0x1000000) + +inst_97: +// rs1_val == 33554432, +// opcode: cbo.flush ; op1:x31; op1val:0x2000000 +TEST_CBO(x1,x31,cbo.flush,0x2000000) + +inst_98: +// rs1_val == 67108864, +// opcode: cbo.flush ; op1:x31; op1val:0x4000000 +TEST_CBO(x1,x31,cbo.flush,0x4000000) + +inst_99: +// rs1_val == 134217728, +// opcode: cbo.flush ; op1:x31; op1val:0x8000000 +TEST_CBO(x1,x31,cbo.flush,0x8000000) + +inst_100: +// rs1_val == 268435456, +// opcode: cbo.flush ; op1:x31; op1val:0x10000000 +TEST_CBO(x1,x31,cbo.flush,0x10000000) + +inst_101: +// rs1_val == 536870912, +// opcode: cbo.flush ; op1:x31; op1val:0x20000000 +TEST_CBO(x1,x31,cbo.flush,0x20000000) + +inst_102: +// rs1_val == 1073741824, +// opcode: cbo.flush ; op1:x31; op1val:0x40000000 +TEST_CBO(x1,x31,cbo.flush,0x40000000) + +inst_103: +// rs1_val == 2147483648, +// opcode: cbo.flush ; op1:x31; op1val:0x80000000 +TEST_CBO(x1,x31,cbo.flush,0x80000000) + +inst_104: +// rs1_val == 4294967296, +// opcode: cbo.flush ; op1:x31; op1val:0x100000000 +TEST_CBO(x1,x31,cbo.flush,0x100000000) + +inst_105: +// rs1_val == 8589934592, +// opcode: cbo.flush ; op1:x31; op1val:0x200000000 +TEST_CBO(x1,x31,cbo.flush,0x200000000) + +inst_106: +// rs1_val == 17179869184, +// opcode: cbo.flush ; op1:x31; op1val:0x400000000 +TEST_CBO(x1,x31,cbo.flush,0x400000000) + +inst_107: +// rs1_val == 34359738368, +// opcode: cbo.flush ; op1:x31; op1val:0x800000000 +TEST_CBO(x1,x31,cbo.flush,0x800000000) + +inst_108: +// rs1_val == 68719476736, +// opcode: cbo.flush ; op1:x31; op1val:0x1000000000 +TEST_CBO(x1,x31,cbo.flush,0x1000000000) + +inst_109: +// rs1_val == 137438953472, +// opcode: cbo.flush ; op1:x31; op1val:0x2000000000 +TEST_CBO(x1,x31,cbo.flush,0x2000000000) + +inst_110: +// rs1_val == 274877906944, +// opcode: cbo.flush ; op1:x31; op1val:0x4000000000 +TEST_CBO(x1,x31,cbo.flush,0x4000000000) + +inst_111: +// rs1_val == 549755813888, +// opcode: cbo.flush ; op1:x31; op1val:0x8000000000 +TEST_CBO(x1,x31,cbo.flush,0x8000000000) + +inst_112: +// rs1_val == 1099511627776, +// opcode: cbo.flush ; op1:x31; op1val:0x10000000000 +TEST_CBO(x1,x31,cbo.flush,0x10000000000) + +inst_113: +// rs1_val == 2199023255552, +// opcode: cbo.flush ; op1:x31; op1val:0x20000000000 +TEST_CBO(x1,x31,cbo.flush,0x20000000000) + +inst_114: +// rs1_val == 4398046511104, +// opcode: cbo.flush ; op1:x31; op1val:0x40000000000 +TEST_CBO(x1,x31,cbo.flush,0x40000000000) + +inst_115: +// rs1_val == 8796093022208, +// opcode: cbo.flush ; op1:x31; op1val:0x80000000000 +TEST_CBO(x1,x31,cbo.flush,0x80000000000) + +inst_116: +// rs1_val == 17592186044416, +// opcode: cbo.flush ; op1:x31; op1val:0x100000000000 +TEST_CBO(x1,x31,cbo.flush,0x100000000000) + +inst_117: +// rs1_val == 35184372088832, +// opcode: cbo.flush ; op1:x31; op1val:0x200000000000 +TEST_CBO(x1,x31,cbo.flush,0x200000000000) + +inst_118: +// rs1_val == 70368744177664, +// opcode: cbo.flush ; op1:x31; op1val:0x400000000000 +TEST_CBO(x1,x31,cbo.flush,0x400000000000) + +inst_119: +// rs1_val == 140737488355328, +// opcode: cbo.flush ; op1:x31; op1val:0x800000000000 +TEST_CBO(x1,x31,cbo.flush,0x800000000000) + +inst_120: +// rs1_val == 281474976710656, +// opcode: cbo.flush ; op1:x31; op1val:0x1000000000000 +TEST_CBO(x1,x31,cbo.flush,0x1000000000000) + +inst_121: +// rs1_val == 562949953421312, +// opcode: cbo.flush ; op1:x31; op1val:0x2000000000000 +TEST_CBO(x1,x31,cbo.flush,0x2000000000000) + +inst_122: +// rs1_val == 1125899906842624, +// opcode: cbo.flush ; op1:x31; op1val:0x4000000000000 +TEST_CBO(x1,x31,cbo.flush,0x4000000000000) + +inst_123: +// rs1_val == 2251799813685248, +// opcode: cbo.flush ; op1:x31; op1val:0x8000000000000 +TEST_CBO(x1,x31,cbo.flush,0x8000000000000) + +inst_124: +// rs1_val == 4503599627370496, +// opcode: cbo.flush ; op1:x31; op1val:0x10000000000000 +TEST_CBO(x1,x31,cbo.flush,0x10000000000000) + +inst_125: +// rs1_val == 9007199254740992, +// opcode: cbo.flush ; op1:x31; op1val:0x20000000000000 +TEST_CBO(x1,x31,cbo.flush,0x20000000000000) + +inst_126: +// rs1_val == 18014398509481984, +// opcode: cbo.flush ; op1:x31; op1val:0x40000000000000 +TEST_CBO(x1,x31,cbo.flush,0x40000000000000) + +inst_127: +// rs1_val == 36028797018963968, +// opcode: cbo.flush ; op1:x31; op1val:0x80000000000000 +TEST_CBO(x1,x31,cbo.flush,0x80000000000000) + +inst_128: +// rs1_val == 72057594037927936, +// opcode: cbo.flush ; op1:x31; op1val:0x100000000000000 +TEST_CBO(x1,x31,cbo.flush,0x100000000000000) + +inst_129: +// rs1_val == 144115188075855872, +// opcode: cbo.flush ; op1:x31; op1val:0x200000000000000 +TEST_CBO(x1,x31,cbo.flush,0x200000000000000) + +inst_130: +// rs1_val == 288230376151711744, +// opcode: cbo.flush ; op1:x31; op1val:0x400000000000000 +TEST_CBO(x1,x31,cbo.flush,0x400000000000000) + +inst_131: +// rs1_val == 576460752303423488, +// opcode: cbo.flush ; op1:x31; op1val:0x800000000000000 +TEST_CBO(x1,x31,cbo.flush,0x800000000000000) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x15_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x15_1: + .fill 28*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 104*((XLEN/8)/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 diff --git a/riscv-test-suite/rv64i_m/CMO/src/cbo.inval-01.S b/riscv-test-suite/rv64i_m/CMO/src/cbo.inval-01.S new file mode 100644 index 000000000..dde892da4 --- /dev/null +++ b/riscv-test-suite/rv64i_m/CMO/src/cbo.inval-01.S @@ -0,0 +1,752 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:03:10 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbom.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the cbo.inval instruction of the RISC-V RV64Zicbom_Zicsr extension for the cbo.inval covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbom_Zicsr") + +.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(.*I.*Zicbom.*Zicsr.*);def TEST_CASE_1=True;",cbo.inval) + +RVTEST_SIGBASE(x15,signature_x15_1) + +inst_0: +// rs1==x12, rs1_val == (2**(xlen)-1), +// opcode: cbo.inval ; op1:x12; op1val:0xffffffffffffffff +TEST_CBO(x15,x12,cbo.inval,0xffffffffffffffff) + +inst_1: +// rs1==x14, rs1_val == 0, +// opcode: cbo.inval ; op1:x14; op1val:0x0 +TEST_CBO(x15,x14,cbo.inval,0x0) + +inst_2: +// rs1==x7, rs1_val == 6148914691236517205, +// opcode: cbo.inval ; op1:x7; op1val:0x5555555555555555 +TEST_CBO(x15,x7,cbo.inval,0x5555555555555555) + +inst_3: +// rs1==x2, rs1_val == 12297829382473034410, +// opcode: cbo.inval ; op1:x2; op1val:0xaaaaaaaaaaaaaaaa +TEST_CBO(x15,x2,cbo.inval,0xaaaaaaaaaaaaaaaa) + +inst_4: +// rs1==x16, rs1_val == 18446744073709551614, +// opcode: cbo.inval ; op1:x16; op1val:0xfffffffffffffffe +TEST_CBO(x15,x16,cbo.inval,0xfffffffffffffffe) + +inst_5: +// rs1==x9, rs1_val == 18446744073709551613, +// opcode: cbo.inval ; op1:x9; op1val:0xfffffffffffffffd +TEST_CBO(x15,x9,cbo.inval,0xfffffffffffffffd) + +inst_6: +// rs1==x1, rs1_val == 18446744073709551611, +// opcode: cbo.inval ; op1:x1; op1val:0xfffffffffffffffb +TEST_CBO(x15,x1,cbo.inval,0xfffffffffffffffb) + +inst_7: +// rs1==x13, rs1_val == 18446744073709551607, +// opcode: cbo.inval ; op1:x13; op1val:0xfffffffffffffff7 +TEST_CBO(x15,x13,cbo.inval,0xfffffffffffffff7) + +inst_8: +// rs1==x29, rs1_val == 18446744073709551599, +// opcode: cbo.inval ; op1:x29; op1val:0xffffffffffffffef +TEST_CBO(x15,x29,cbo.inval,0xffffffffffffffef) + +inst_9: +// rs1==x11, rs1_val == 18446744073709551583, +// opcode: cbo.inval ; op1:x11; op1val:0xffffffffffffffdf +TEST_CBO(x15,x11,cbo.inval,0xffffffffffffffdf) + +inst_10: +// rs1==x4, rs1_val == 18446744073709551551, +// opcode: cbo.inval ; op1:x4; op1val:0xffffffffffffffbf +TEST_CBO(x15,x4,cbo.inval,0xffffffffffffffbf) + +inst_11: +// rs1==x3, rs1_val == 18446744073709551487, +// opcode: cbo.inval ; op1:x3; op1val:0xffffffffffffff7f +TEST_CBO(x15,x3,cbo.inval,0xffffffffffffff7f) + +inst_12: +// rs1==x5, rs1_val == 18446744073709551359, +// opcode: cbo.inval ; op1:x5; op1val:0xfffffffffffffeff +TEST_CBO(x15,x5,cbo.inval,0xfffffffffffffeff) + +inst_13: +// rs1==x28, rs1_val == 18446744073709551103, +// opcode: cbo.inval ; op1:x28; op1val:0xfffffffffffffdff +TEST_CBO(x15,x28,cbo.inval,0xfffffffffffffdff) + +inst_14: +// rs1==x17, rs1_val == 18446744073709550591, +// opcode: cbo.inval ; op1:x17; op1val:0xfffffffffffffbff +TEST_CBO(x15,x17,cbo.inval,0xfffffffffffffbff) + +inst_15: +// rs1==x19, rs1_val == 18446744073709549567, +// opcode: cbo.inval ; op1:x19; op1val:0xfffffffffffff7ff +TEST_CBO(x15,x19,cbo.inval,0xfffffffffffff7ff) + +inst_16: +// rs1==x6, rs1_val == 18446744073709547519, +// opcode: cbo.inval ; op1:x6; op1val:0xffffffffffffefff +TEST_CBO(x15,x6,cbo.inval,0xffffffffffffefff) + +inst_17: +// rs1==x25, rs1_val == 18446744073709543423, +// opcode: cbo.inval ; op1:x25; op1val:0xffffffffffffdfff +TEST_CBO(x15,x25,cbo.inval,0xffffffffffffdfff) + +inst_18: +// rs1==x22, rs1_val == 18446744073709535231, +// opcode: cbo.inval ; op1:x22; op1val:0xffffffffffffbfff +TEST_CBO(x15,x22,cbo.inval,0xffffffffffffbfff) + +inst_19: +// rs1==x10, rs1_val == 18446744073709518847, +// opcode: cbo.inval ; op1:x10; op1val:0xffffffffffff7fff +TEST_CBO(x15,x10,cbo.inval,0xffffffffffff7fff) + +inst_20: +// rs1==x30, rs1_val == 18446744073709486079, +// opcode: cbo.inval ; op1:x30; op1val:0xfffffffffffeffff +TEST_CBO(x15,x30,cbo.inval,0xfffffffffffeffff) + +inst_21: +// rs1==x18, rs1_val == 18446744073709420543, +// opcode: cbo.inval ; op1:x18; op1val:0xfffffffffffdffff +TEST_CBO(x15,x18,cbo.inval,0xfffffffffffdffff) + +inst_22: +// rs1==x23, rs1_val == 18446744073709289471, +// opcode: cbo.inval ; op1:x23; op1val:0xfffffffffffbffff +TEST_CBO(x15,x23,cbo.inval,0xfffffffffffbffff) + +inst_23: +// rs1==x24, rs1_val == 18446744073709027327, +// opcode: cbo.inval ; op1:x24; op1val:0xfffffffffff7ffff +TEST_CBO(x15,x24,cbo.inval,0xfffffffffff7ffff) + +inst_24: +// rs1==x8, rs1_val == 18446744073708503039, +// opcode: cbo.inval ; op1:x8; op1val:0xffffffffffefffff +TEST_CBO(x15,x8,cbo.inval,0xffffffffffefffff) + +inst_25: +// rs1==x27, rs1_val == 18446744073707454463, +// opcode: cbo.inval ; op1:x27; op1val:0xffffffffffdfffff +TEST_CBO(x15,x27,cbo.inval,0xffffffffffdfffff) + +inst_26: +// rs1==x20, rs1_val == 18446744073705357311, +// opcode: cbo.inval ; op1:x20; op1val:0xffffffffffbfffff +TEST_CBO(x15,x20,cbo.inval,0xffffffffffbfffff) + +inst_27: +// rs1==x26, rs1_val == 18446744073701163007, +// opcode: cbo.inval ; op1:x26; op1val:0xffffffffff7fffff +TEST_CBO(x15,x26,cbo.inval,0xffffffffff7fffff) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_28: +// rs1==x15, rs1_val == 18446744073692774399, +// opcode: cbo.inval ; op1:x15; op1val:0xfffffffffeffffff +TEST_CBO(x1,x15,cbo.inval,0xfffffffffeffffff) + +inst_29: +// rs1==x31, rs1_val == 18446744073675997183, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffffdffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffffdffffff) + +inst_30: +// rs1==x21, rs1_val == 18446744073642442751, +// opcode: cbo.inval ; op1:x21; op1val:0xfffffffffbffffff +TEST_CBO(x1,x21,cbo.inval,0xfffffffffbffffff) + +inst_31: +// rs1_val == 18446744073575333887, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffff7ffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffff7ffffff) + +inst_32: +// rs1_val == 18446744073441116159, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffffefffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffffefffffff) + +inst_33: +// rs1_val == 18446744073172680703, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffffdfffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffffdfffffff) + +inst_34: +// rs1_val == 18446744072635809791, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffffbfffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffffbfffffff) + +inst_35: +// rs1_val == 18446744071562067967, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffff7fffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffff7fffffff) + +inst_36: +// rs1_val == 18446744069414584319, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffeffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffeffffffff) + +inst_37: +// rs1_val == 18446744065119617023, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffdffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffdffffffff) + +inst_38: +// rs1_val == 18446744056529682431, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffbffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffbffffffff) + +inst_39: +// rs1_val == 18446744039349813247, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffff7ffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffff7ffffffff) + +inst_40: +// rs1_val == 18446744004990074879, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffefffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffefffffffff) + +inst_41: +// rs1_val == 18446743936270598143, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffdfffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffdfffffffff) + +inst_42: +// rs1_val == 18446743798831644671, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffbfffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffbfffffffff) + +inst_43: +// rs1_val == 18446743523953737727, +// opcode: cbo.inval ; op1:x31; op1val:0xffffff7fffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffff7fffffffff) + +inst_44: +// rs1_val == 18446742974197923839, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffeffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffeffffffffff) + +inst_45: +// rs1_val == 18446741874686296063, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffdffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffdffffffffff) + +inst_46: +// rs1_val == 18446739675663040511, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffbffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffbffffffffff) + +inst_47: +// rs1_val == 18446735277616529407, +// opcode: cbo.inval ; op1:x31; op1val:0xfffff7ffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffff7ffffffffff) + +inst_48: +// rs1_val == 18446726481523507199, +// opcode: cbo.inval ; op1:x31; op1val:0xffffefffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffefffffffffff) + +inst_49: +// rs1_val == 18446708889337462783, +// opcode: cbo.inval ; op1:x31; op1val:0xffffdfffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffdfffffffffff) + +inst_50: +// rs1_val == 18446673704965373951, +// opcode: cbo.inval ; op1:x31; op1val:0xffffbfffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffbfffffffffff) + +inst_51: +// rs1_val == 18446603336221196287, +// opcode: cbo.inval ; op1:x31; op1val:0xffff7fffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffff7fffffffffff) + +inst_52: +// rs1_val == 18446462598732840959, +// opcode: cbo.inval ; op1:x31; op1val:0xfffeffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffeffffffffffff) + +inst_53: +// rs1_val == 18446181123756130303, +// opcode: cbo.inval ; op1:x31; op1val:0xfffdffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffdffffffffffff) + +inst_54: +// rs1_val == 18445618173802708991, +// opcode: cbo.inval ; op1:x31; op1val:0xfffbffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffbffffffffffff) + +inst_55: +// rs1_val == 18444492273895866367, +// opcode: cbo.inval ; op1:x31; op1val:0xfff7ffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfff7ffffffffffff) + +inst_56: +// rs1_val == 18442240474082181119, +// opcode: cbo.inval ; op1:x31; op1val:0xffefffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffefffffffffffff) + +inst_57: +// rs1_val == 18437736874454810623, +// opcode: cbo.inval ; op1:x31; op1val:0xffdfffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffdfffffffffffff) + +inst_58: +// rs1_val == 18428729675200069631, +// opcode: cbo.inval ; op1:x31; op1val:0xffbfffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffbfffffffffffff) + +inst_59: +// rs1_val == 18410715276690587647, +// opcode: cbo.inval ; op1:x31; op1val:0xff7fffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xff7fffffffffffff) + +inst_60: +// rs1_val == 18374686479671623679, +// opcode: cbo.inval ; op1:x31; op1val:0xfeffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfeffffffffffffff) + +inst_61: +// rs1_val == 18302628885633695743, +// opcode: cbo.inval ; op1:x31; op1val:0xfdffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfdffffffffffffff) + +inst_62: +// rs1_val == 18158513697557839871, +// opcode: cbo.inval ; op1:x31; op1val:0xfbffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfbffffffffffffff) + +inst_63: +// rs1_val == 17870283321406128127, +// opcode: cbo.inval ; op1:x31; op1val:0xf7ffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xf7ffffffffffffff) + +inst_64: +// rs1_val == 17293822569102704639, +// opcode: cbo.inval ; op1:x31; op1val:0xefffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xefffffffffffffff) + +inst_65: +// rs1_val == 16140901064495857663, +// opcode: cbo.inval ; op1:x31; op1val:0xdfffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xdfffffffffffffff) + +inst_66: +// rs1_val == 13835058055282163711, +// opcode: cbo.inval ; op1:x31; op1val:0xbfffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xbfffffffffffffff) + +inst_67: +// rs1_val == 9223372036854775807, +// opcode: cbo.inval ; op1:x31; op1val:0x7fffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0x7fffffffffffffff) + +inst_68: +// rs1_val == 1, +// opcode: cbo.inval ; op1:x31; op1val:0x1 +TEST_CBO(x1,x31,cbo.inval,0x1) + +inst_69: +// rs1_val == 1152921504606846976, +// opcode: cbo.inval ; op1:x31; op1val:0x1000000000000000 +TEST_CBO(x1,x31,cbo.inval,0x1000000000000000) + +inst_70: +// rs1_val == 2305843009213693952, +// opcode: cbo.inval ; op1:x31; op1val:0x2000000000000000 +TEST_CBO(x1,x31,cbo.inval,0x2000000000000000) + +inst_71: +// rs1_val == 4611686018427387904, +// opcode: cbo.inval ; op1:x31; op1val:0x4000000000000000 +TEST_CBO(x1,x31,cbo.inval,0x4000000000000000) + +inst_72: +// rs1_val == 9223372036854775808, +// opcode: cbo.inval ; op1:x31; op1val:0x8000000000000000 +TEST_CBO(x1,x31,cbo.inval,0x8000000000000000) + +inst_73: +// rs1_val == 2, +// opcode: cbo.inval ; op1:x31; op1val:0x2 +TEST_CBO(x1,x31,cbo.inval,0x2) + +inst_74: +// rs1_val == 4, +// opcode: cbo.inval ; op1:x31; op1val:0x4 +TEST_CBO(x1,x31,cbo.inval,0x4) + +inst_75: +// rs1_val == 8, +// opcode: cbo.inval ; op1:x31; op1val:0x8 +TEST_CBO(x1,x31,cbo.inval,0x8) + +inst_76: +// rs1_val == 16, +// opcode: cbo.inval ; op1:x31; op1val:0x10 +TEST_CBO(x1,x31,cbo.inval,0x10) + +inst_77: +// rs1_val == 32, +// opcode: cbo.inval ; op1:x31; op1val:0x20 +TEST_CBO(x1,x31,cbo.inval,0x20) + +inst_78: +// rs1_val == 64, +// opcode: cbo.inval ; op1:x31; op1val:0x40 +TEST_CBO(x1,x31,cbo.inval,0x40) + +inst_79: +// rs1_val == 128, +// opcode: cbo.inval ; op1:x31; op1val:0x80 +TEST_CBO(x1,x31,cbo.inval,0x80) + +inst_80: +// rs1_val == 256, +// opcode: cbo.inval ; op1:x31; op1val:0x100 +TEST_CBO(x1,x31,cbo.inval,0x100) + +inst_81: +// rs1_val == 512, +// opcode: cbo.inval ; op1:x31; op1val:0x200 +TEST_CBO(x1,x31,cbo.inval,0x200) + +inst_82: +// rs1_val == 1024, +// opcode: cbo.inval ; op1:x31; op1val:0x400 +TEST_CBO(x1,x31,cbo.inval,0x400) + +inst_83: +// rs1_val == 2048, +// opcode: cbo.inval ; op1:x31; op1val:0x800 +TEST_CBO(x1,x31,cbo.inval,0x800) + +inst_84: +// rs1_val == 4096, +// opcode: cbo.inval ; op1:x31; op1val:0x1000 +TEST_CBO(x1,x31,cbo.inval,0x1000) + +inst_85: +// rs1_val == 8192, +// opcode: cbo.inval ; op1:x31; op1val:0x2000 +TEST_CBO(x1,x31,cbo.inval,0x2000) + +inst_86: +// rs1_val == 16384, +// opcode: cbo.inval ; op1:x31; op1val:0x4000 +TEST_CBO(x1,x31,cbo.inval,0x4000) + +inst_87: +// rs1_val == 32768, +// opcode: cbo.inval ; op1:x31; op1val:0x8000 +TEST_CBO(x1,x31,cbo.inval,0x8000) + +inst_88: +// rs1_val == 65536, +// opcode: cbo.inval ; op1:x31; op1val:0x10000 +TEST_CBO(x1,x31,cbo.inval,0x10000) + +inst_89: +// rs1_val == 131072, +// opcode: cbo.inval ; op1:x31; op1val:0x20000 +TEST_CBO(x1,x31,cbo.inval,0x20000) + +inst_90: +// rs1_val == 262144, +// opcode: cbo.inval ; op1:x31; op1val:0x40000 +TEST_CBO(x1,x31,cbo.inval,0x40000) + +inst_91: +// rs1_val == 524288, +// opcode: cbo.inval ; op1:x31; op1val:0x80000 +TEST_CBO(x1,x31,cbo.inval,0x80000) + +inst_92: +// rs1_val == 1048576, +// opcode: cbo.inval ; op1:x31; op1val:0x100000 +TEST_CBO(x1,x31,cbo.inval,0x100000) + +inst_93: +// rs1_val == 2097152, +// opcode: cbo.inval ; op1:x31; op1val:0x200000 +TEST_CBO(x1,x31,cbo.inval,0x200000) + +inst_94: +// rs1_val == 4194304, +// opcode: cbo.inval ; op1:x31; op1val:0x400000 +TEST_CBO(x1,x31,cbo.inval,0x400000) + +inst_95: +// rs1_val == 8388608, +// opcode: cbo.inval ; op1:x31; op1val:0x800000 +TEST_CBO(x1,x31,cbo.inval,0x800000) + +inst_96: +// rs1_val == 16777216, +// opcode: cbo.inval ; op1:x31; op1val:0x1000000 +TEST_CBO(x1,x31,cbo.inval,0x1000000) + +inst_97: +// rs1_val == 33554432, +// opcode: cbo.inval ; op1:x31; op1val:0x2000000 +TEST_CBO(x1,x31,cbo.inval,0x2000000) + +inst_98: +// rs1_val == 67108864, +// opcode: cbo.inval ; op1:x31; op1val:0x4000000 +TEST_CBO(x1,x31,cbo.inval,0x4000000) + +inst_99: +// rs1_val == 134217728, +// opcode: cbo.inval ; op1:x31; op1val:0x8000000 +TEST_CBO(x1,x31,cbo.inval,0x8000000) + +inst_100: +// rs1_val == 268435456, +// opcode: cbo.inval ; op1:x31; op1val:0x10000000 +TEST_CBO(x1,x31,cbo.inval,0x10000000) + +inst_101: +// rs1_val == 536870912, +// opcode: cbo.inval ; op1:x31; op1val:0x20000000 +TEST_CBO(x1,x31,cbo.inval,0x20000000) + +inst_102: +// rs1_val == 1073741824, +// opcode: cbo.inval ; op1:x31; op1val:0x40000000 +TEST_CBO(x1,x31,cbo.inval,0x40000000) + +inst_103: +// rs1_val == 2147483648, +// opcode: cbo.inval ; op1:x31; op1val:0x80000000 +TEST_CBO(x1,x31,cbo.inval,0x80000000) + +inst_104: +// rs1_val == 4294967296, +// opcode: cbo.inval ; op1:x31; op1val:0x100000000 +TEST_CBO(x1,x31,cbo.inval,0x100000000) + +inst_105: +// rs1_val == 8589934592, +// opcode: cbo.inval ; op1:x31; op1val:0x200000000 +TEST_CBO(x1,x31,cbo.inval,0x200000000) + +inst_106: +// rs1_val == 17179869184, +// opcode: cbo.inval ; op1:x31; op1val:0x400000000 +TEST_CBO(x1,x31,cbo.inval,0x400000000) + +inst_107: +// rs1_val == 34359738368, +// opcode: cbo.inval ; op1:x31; op1val:0x800000000 +TEST_CBO(x1,x31,cbo.inval,0x800000000) + +inst_108: +// rs1_val == 68719476736, +// opcode: cbo.inval ; op1:x31; op1val:0x1000000000 +TEST_CBO(x1,x31,cbo.inval,0x1000000000) + +inst_109: +// rs1_val == 137438953472, +// opcode: cbo.inval ; op1:x31; op1val:0x2000000000 +TEST_CBO(x1,x31,cbo.inval,0x2000000000) + +inst_110: +// rs1_val == 274877906944, +// opcode: cbo.inval ; op1:x31; op1val:0x4000000000 +TEST_CBO(x1,x31,cbo.inval,0x4000000000) + +inst_111: +// rs1_val == 549755813888, +// opcode: cbo.inval ; op1:x31; op1val:0x8000000000 +TEST_CBO(x1,x31,cbo.inval,0x8000000000) + +inst_112: +// rs1_val == 1099511627776, +// opcode: cbo.inval ; op1:x31; op1val:0x10000000000 +TEST_CBO(x1,x31,cbo.inval,0x10000000000) + +inst_113: +// rs1_val == 2199023255552, +// opcode: cbo.inval ; op1:x31; op1val:0x20000000000 +TEST_CBO(x1,x31,cbo.inval,0x20000000000) + +inst_114: +// rs1_val == 4398046511104, +// opcode: cbo.inval ; op1:x31; op1val:0x40000000000 +TEST_CBO(x1,x31,cbo.inval,0x40000000000) + +inst_115: +// rs1_val == 8796093022208, +// opcode: cbo.inval ; op1:x31; op1val:0x80000000000 +TEST_CBO(x1,x31,cbo.inval,0x80000000000) + +inst_116: +// rs1_val == 17592186044416, +// opcode: cbo.inval ; op1:x31; op1val:0x100000000000 +TEST_CBO(x1,x31,cbo.inval,0x100000000000) + +inst_117: +// rs1_val == 35184372088832, +// opcode: cbo.inval ; op1:x31; op1val:0x200000000000 +TEST_CBO(x1,x31,cbo.inval,0x200000000000) + +inst_118: +// rs1_val == 70368744177664, +// opcode: cbo.inval ; op1:x31; op1val:0x400000000000 +TEST_CBO(x1,x31,cbo.inval,0x400000000000) + +inst_119: +// rs1_val == 140737488355328, +// opcode: cbo.inval ; op1:x31; op1val:0x800000000000 +TEST_CBO(x1,x31,cbo.inval,0x800000000000) + +inst_120: +// rs1_val == 281474976710656, +// opcode: cbo.inval ; op1:x31; op1val:0x1000000000000 +TEST_CBO(x1,x31,cbo.inval,0x1000000000000) + +inst_121: +// rs1_val == 562949953421312, +// opcode: cbo.inval ; op1:x31; op1val:0x2000000000000 +TEST_CBO(x1,x31,cbo.inval,0x2000000000000) + +inst_122: +// rs1_val == 1125899906842624, +// opcode: cbo.inval ; op1:x31; op1val:0x4000000000000 +TEST_CBO(x1,x31,cbo.inval,0x4000000000000) + +inst_123: +// rs1_val == 2251799813685248, +// opcode: cbo.inval ; op1:x31; op1val:0x8000000000000 +TEST_CBO(x1,x31,cbo.inval,0x8000000000000) + +inst_124: +// rs1_val == 4503599627370496, +// opcode: cbo.inval ; op1:x31; op1val:0x10000000000000 +TEST_CBO(x1,x31,cbo.inval,0x10000000000000) + +inst_125: +// rs1_val == 9007199254740992, +// opcode: cbo.inval ; op1:x31; op1val:0x20000000000000 +TEST_CBO(x1,x31,cbo.inval,0x20000000000000) + +inst_126: +// rs1_val == 18014398509481984, +// opcode: cbo.inval ; op1:x31; op1val:0x40000000000000 +TEST_CBO(x1,x31,cbo.inval,0x40000000000000) + +inst_127: +// rs1_val == 36028797018963968, +// opcode: cbo.inval ; op1:x31; op1val:0x80000000000000 +TEST_CBO(x1,x31,cbo.inval,0x80000000000000) + +inst_128: +// rs1_val == 72057594037927936, +// opcode: cbo.inval ; op1:x31; op1val:0x100000000000000 +TEST_CBO(x1,x31,cbo.inval,0x100000000000000) + +inst_129: +// rs1_val == 144115188075855872, +// opcode: cbo.inval ; op1:x31; op1val:0x200000000000000 +TEST_CBO(x1,x31,cbo.inval,0x200000000000000) + +inst_130: +// rs1_val == 288230376151711744, +// opcode: cbo.inval ; op1:x31; op1val:0x400000000000000 +TEST_CBO(x1,x31,cbo.inval,0x400000000000000) + +inst_131: +// rs1_val == 576460752303423488, +// opcode: cbo.inval ; op1:x31; op1val:0x800000000000000 +TEST_CBO(x1,x31,cbo.inval,0x800000000000000) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x15_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x15_1: + .fill 28*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 104*((XLEN/8)/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 diff --git a/riscv-test-suite/rv64i_m/CMO/src/cbo.zero-01 copy.S b/riscv-test-suite/rv64i_m/CMO/src/cbo.zero-01 copy.S new file mode 100644 index 000000000..87fe1971d --- /dev/null +++ b/riscv-test-suite/rv64i_m/CMO/src/cbo.zero-01 copy.S @@ -0,0 +1,312 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:03:05 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cboz.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the cbo.zero instruction of the RISC-V RV64Zicboz_Zicsr extension for the cbo.zero covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicboz_Zicsr") + +.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(.*I.*Zicboz.*Zicsr.*);def TEST_CASE_1=True;",cbo.zero) + +RVTEST_SIGBASE(x10,signature_x10_1) + +inst_0: +// rs1==x4, rs1_val == 0x4a9 +// opcode: cbo.zero ; op1:x4; op1val:0x4a9 +TEST_CBO(x10,x4,cbo.zero,0x4a9) + +inst_1: +// rs1==x29, rs1_val == 0xeb4 +// opcode: cbo.zero ; op1:x29; op1val:0xeb4 +TEST_CBO(x10,x29,cbo.zero,0xeb4) + +inst_2: +// rs1==x2, rs1_val == 0xe8e +// opcode: cbo.zero ; op1:x2; op1val:0xe8e +TEST_CBO(x10,x2,cbo.zero,0xe8e) + +inst_3: +// rs1==x24, rs1_val == 0x597 +// opcode: cbo.zero ; op1:x24; op1val:0x597 +TEST_CBO(x10,x24,cbo.zero,0x597) + +inst_4: +// rs1==x25, rs1_val == 4094, +// opcode: cbo.zero ; op1:x25; op1val:0xffe +TEST_CBO(x10,x25,cbo.zero,0xffe) + +inst_5: +// rs1==x16, rs1_val == 4093, +// opcode: cbo.zero ; op1:x16; op1val:0xffd +TEST_CBO(x10,x16,cbo.zero,0xffd) + +inst_6: +// rs1==x19, rs1_val == 4091, +// opcode: cbo.zero ; op1:x19; op1val:0xffb +TEST_CBO(x10,x19,cbo.zero,0xffb) + +inst_7: +// rs1==x17, rs1_val == 4087, +// opcode: cbo.zero ; op1:x17; op1val:0xff7 +TEST_CBO(x10,x17,cbo.zero,0xff7) + +inst_8: +// rs1==x20, rs1_val == 4079, +// opcode: cbo.zero ; op1:x20; op1val:0xfef +TEST_CBO(x10,x20,cbo.zero,0xfef) + +inst_9: +// rs1==x1, rs1_val == 4063, +// opcode: cbo.zero ; op1:x1; op1val:0xfdf +TEST_CBO(x10,x1,cbo.zero,0xfdf) + +inst_10: +// rs1==x30, rs1_val == 4031, +// opcode: cbo.zero ; op1:x30; op1val:0xfbf +TEST_CBO(x10,x30,cbo.zero,0xfbf) + +inst_11: +// rs1==x18, rs1_val == 3967, +// opcode: cbo.zero ; op1:x18; op1val:0xf7f +TEST_CBO(x10,x18,cbo.zero,0xf7f) + +inst_12: +// rs1==x7, rs1_val == 3839, +// opcode: cbo.zero ; op1:x7; op1val:0xeff +TEST_CBO(x10,x7,cbo.zero,0xeff) + +inst_13: +// rs1==x31, rs1_val == 3583, +// opcode: cbo.zero ; op1:x31; op1val:0xdff +TEST_CBO(x10,x31,cbo.zero,0xdff) + +inst_14: +// rs1==x21, rs1_val == 3071, +// opcode: cbo.zero ; op1:x21; op1val:0xbff +TEST_CBO(x10,x21,cbo.zero,0xbff) + +inst_15: +// rs1==x23, rs1_val == 2047, +// opcode: cbo.zero ; op1:x23; op1val:0x7ff +TEST_CBO(x10,x23,cbo.zero,0x7ff) + +inst_16: +// rs1==x12, rs1_val == 1, +// opcode: cbo.zero ; op1:x12; op1val:0x1 +TEST_CBO(x10,x12,cbo.zero,0x1) + +inst_17: +// rs1==x14, rs1_val == 2, +// opcode: cbo.zero ; op1:x14; op1val:0x2 +TEST_CBO(x10,x14,cbo.zero,0x2) + +inst_18: +// rs1==x13, rs1_val == 4, +// opcode: cbo.zero ; op1:x13; op1val:0x4 +TEST_CBO(x10,x13,cbo.zero,0x4) + +inst_19: +// rs1==x28, rs1_val == 8, +// opcode: cbo.zero ; op1:x28; op1val:0x8 +TEST_CBO(x10,x28,cbo.zero,0x8) + +inst_20: +// rs1==x15, rs1_val == 16, +// opcode: cbo.zero ; op1:x15; op1val:0x10 +TEST_CBO(x10,x15,cbo.zero,0x10) + +inst_21: +// rs1==x5, rs1_val == 32, +// opcode: cbo.zero ; op1:x5; op1val:0x20 +TEST_CBO(x10,x5,cbo.zero,0x20) + +inst_22: +// rs1==x8, rs1_val == 64, +// opcode: cbo.zero ; op1:x8; op1val:0x40 +TEST_CBO(x10,x8,cbo.zero,0x40) + +inst_23: +// rs1==x3, rs1_val == 128, +// opcode: cbo.zero ; op1:x3; op1val:0x80 +TEST_CBO(x10,x3,cbo.zero,0x80) + +inst_24: +// rs1==x6, rs1_val == 256, +// opcode: cbo.zero ; op1:x6; op1val:0x100 +TEST_CBO(x10,x6,cbo.zero,0x100) + +inst_25: +// rs1==x9, rs1_val == 512, +// opcode: cbo.zero ; op1:x9; op1val:0x200 +TEST_CBO(x10,x9,cbo.zero,0x200) + +inst_26: +// rs1==x22, rs1_val == 1024, +// opcode: cbo.zero ; op1:x22; op1val:0x400 +TEST_CBO(x10,x22,cbo.zero,0x400) + +inst_27: +// rs1==x27, rs1_val == 2048, +// opcode: cbo.zero ; op1:x27; op1val:0x800 +TEST_CBO(x10,x27,cbo.zero,0x800) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_28: +// rs1==x10, rs1_val == 0xc93 +// opcode: cbo.zero ; op1:x10; op1val:0xc93 +TEST_CBO(x1,x10,cbo.zero,0xc93) + +inst_29: +// rs1==x26, rs1_val == 0xb31 +// opcode: cbo.zero ; op1:x26; op1val:0xb31 +TEST_CBO(x1,x26,cbo.zero,0xb31) + +inst_30: +// rs1==x11, rs1_val == 0xddf +// opcode: cbo.zero ; op1:x11; op1val:0xddf +TEST_CBO(x1,x11,cbo.zero,0xddf) + +inst_31: +// rs1_val == 0x384 +// opcode: cbo.zero ; op1:x31; op1val:0x384 +TEST_CBO(x1,x31,cbo.zero,0x384) + +inst_32: +// rs1_val == 0x3e1 +// opcode: cbo.zero ; op1:x31; op1val:0x3e1 +TEST_CBO(x1,x31,cbo.zero,0x3e1) + +inst_33: +// rs1_val == 0x290 +// opcode: cbo.zero ; op1:x31; op1val:0x290 +TEST_CBO(x1,x31,cbo.zero,0x290) + +inst_34: +// rs1_val == 0xe97 +// opcode: cbo.zero ; op1:x31; op1val:0xe97 +TEST_CBO(x1,x31,cbo.zero,0xe97) + +inst_35: +// rs1_val == 0x86d +// opcode: cbo.zero ; op1:x31; op1val:0x86d +TEST_CBO(x1,x31,cbo.zero,0x86d) + +inst_36: +// rs1_val == 0x188 +// opcode: cbo.zero ; op1:x31; op1val:0x188 +TEST_CBO(x1,x31,cbo.zero,0x188) + +inst_37: +// rs1_val == 0x68b +// opcode: cbo.zero ; op1:x31; op1val:0x68b +TEST_CBO(x1,x31,cbo.zero,0x68b) + +inst_38: +// rs1_val == 0xabb +// opcode: cbo.zero ; op1:x31; op1val:0xabb +TEST_CBO(x1,x31,cbo.zero,0xabb) + +inst_39: +// rs1_val == 0x759 +// opcode: cbo.zero ; op1:x31; op1val:0x759 +TEST_CBO(x1,x31,cbo.zero,0x759) + +inst_40: +// rs1_val == 0x9e6 +// opcode: cbo.zero ; op1:x31; op1val:0x9e6 +TEST_CBO(x1,x31,cbo.zero,0x9e6) + +inst_41: +// rs1_val == 0x686 +// opcode: cbo.zero ; op1:x31; op1val:0x686 +TEST_CBO(x1,x31,cbo.zero,0x686) + +inst_42: +// rs1_val == 0x5b5 +// opcode: cbo.zero ; op1:x31; op1val:0x5b5 +TEST_CBO(x1,x31,cbo.zero,0x5b5) + +inst_43: +// rs1_val == 0x481 +// opcode: cbo.zero ; op1:x31; op1val:0x481 +TEST_CBO(x1,x31,cbo.zero,0x481) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x10_0: + .fill 0*((RVMODEL_CBZ_BLOCKSIZE)/4),4,0xdeadbeef + + +signature_x10_1: + .fill 28*((RVMODEL_CBZ_BLOCKSIZE)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 16*((RVMODEL_CBZ_BLOCKSIZE)/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 diff --git a/riscv-test-suite/rv64i_m/CMO/src/cbo.zero-01.S b/riscv-test-suite/rv64i_m/CMO/src/cbo.zero-01.S deleted file mode 100644 index 093ec88e1..000000000 --- a/riscv-test-suite/rv64i_m/CMO/src/cbo.zero-01.S +++ /dev/null @@ -1,262 +0,0 @@ - -// ----------- -// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) -// version : 0.10.4 -// timestamp : Wed Feb 22 09:03:10 2023 GMT -// usage : riscv_ctg \ -// -- cgf // --cgf /workspace/riscv-ctg/sample_cgfs/dataset.cgf \ -// --cgf /workspace/riscv-ctg/sample_cgfs/rv64i_cbo.cgf \ - \ -// -- xlen 64 \ -// --randomize \ -// ----------- -// -// ----------- -// Copyright (c) 2020. RISC-V International. All rights reserved. -// SPDX-License-Identifier: BSD-3-Clause -// ----------- -// -// This assembly file tests the cbo.zero instruction of the RISC-V RV64ZicsrZicboz extension for the cbozero covergroup. -// -#include "model_test.h" -#include "arch_test.h" -RVTEST_ISA("RV64IZicboz_Zicsr") - -.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(.*64.*I.*Zicboz.*Zicsr.*);def TEST_CASE_1=True;",cbozero) - -RVTEST_SIGBASE(x3,signature_x3_1) - -inst_0: -// rs1==x2, rs1_val == 0x4a9 -// opcode: cbo.zero ; op1:x2; op1val:0x4a9 -TEST_CBO_ZERO(x3,x2,cbo.zero,0x4a9) - -inst_1: -// rs1==x16, rs1_val == 0xeb4 -// opcode: cbo.zero ; op1:x16; op1val:0xeb4 -TEST_CBO_ZERO(x3,x16,cbo.zero,0xeb4) - -inst_2: -// rs1==x26, rs1_val == 0xe8e -// opcode: cbo.zero ; op1:x26; op1val:0xe8e -TEST_CBO_ZERO(x3,x26,cbo.zero,0xe8e) - -inst_3: -// rs1==x9, rs1_val == 0x597 -// opcode: cbo.zero ; op1:x9; op1val:0x597 -TEST_CBO_ZERO(x3,x9,cbo.zero,0x597) - -inst_4: -// rs1==x18, rs1_val == 4094, -// opcode: cbo.zero ; op1:x18; op1val:0xffe -TEST_CBO_ZERO(x3,x18,cbo.zero,0xffe) - -inst_5: -// rs1==x21, rs1_val == 4093, -// opcode: cbo.zero ; op1:x21; op1val:0xffd -TEST_CBO_ZERO(x3,x21,cbo.zero,0xffd) - -inst_6: -// rs1==x7, rs1_val == 4091, -// opcode: cbo.zero ; op1:x7; op1val:0xffb -TEST_CBO_ZERO(x3,x7,cbo.zero,0xffb) - -inst_7: -// rs1==x5, rs1_val == 4087, -// opcode: cbo.zero ; op1:x5; op1val:0xff7 -TEST_CBO_ZERO(x3,x5,cbo.zero,0xff7) - -inst_8: -// rs1==x13, rs1_val == 4079, -// opcode: cbo.zero ; op1:x13; op1val:0xfef -TEST_CBO_ZERO(x3,x13,cbo.zero,0xfef) - -inst_9: -// rs1==x28, rs1_val == 4063, -// opcode: cbo.zero ; op1:x28; op1val:0xfdf -TEST_CBO_ZERO(x3,x28,cbo.zero,0xfdf) - -inst_10: -// rs1==x25, rs1_val == 4031, -// opcode: cbo.zero ; op1:x25; op1val:0xfbf -TEST_CBO_ZERO(x3,x25,cbo.zero,0xfbf) - -inst_11: -// rs1==x1, rs1_val == 3967, -// opcode: cbo.zero ; op1:x1; op1val:0xf7f -TEST_CBO_ZERO(x3,x1,cbo.zero,0xf7f) - -inst_12: -// rs1==x4, rs1_val == 3839, -// opcode: cbo.zero ; op1:x4; op1val:0xeff -TEST_CBO_ZERO(x3,x4,cbo.zero,0xeff) - -inst_13: -// rs1==x19, rs1_val == 3583, -// opcode: cbo.zero ; op1:x19; op1val:0xdff -TEST_CBO_ZERO(x3,x19,cbo.zero,0xdff) - -inst_14: -// rs1==x15, rs1_val == 3071, -// opcode: cbo.zero ; op1:x15; op1val:0xbff -TEST_CBO_ZERO(x3,x15,cbo.zero,0xbff) - -inst_15: -// rs1==x12, rs1_val == 2047, -// opcode: cbo.zero ; op1:x12; op1val:0x7ff -TEST_CBO_ZERO(x3,x12,cbo.zero,0x7ff) - -inst_16: -// rs1==x23, rs1_val == 1, -// opcode: cbo.zero ; op1:x23; op1val:0x1 -TEST_CBO_ZERO(x3,x23,cbo.zero,0x1) - -inst_17: -// rs1==x30, rs1_val == 2, -// opcode: cbo.zero ; op1:x30; op1val:0x2 -TEST_CBO_ZERO(x3,x30,cbo.zero,0x2) - -inst_18: -// rs1==x27, rs1_val == 4, -// opcode: cbo.zero ; op1:x27; op1val:0x4 -TEST_CBO_ZERO(x3,x27,cbo.zero,0x4) - -inst_19: -// rs1==x20, rs1_val == 0x3e1 -// opcode: cbo.zero ; op1:x20; op1val:0x3e1 -TEST_CBO_ZERO(x3,x20,cbo.zero,0x3e1) - -inst_20: -// rs1==x22, rs1_val == 0x290 -// opcode: cbo.zero ; op1:x22; op1val:0x290 -TEST_CBO_ZERO(x3,x22,cbo.zero,0x290) - -inst_21: -// rs1==x14, rs1_val == 8, -// opcode: cbo.zero ; op1:x14; op1val:0x8 -TEST_CBO_ZERO(x3,x14,cbo.zero,0x8) - -inst_22: -// rs1==x29, rs1_val == 16, -// opcode: cbo.zero ; op1:x29; op1val:0x10 -TEST_CBO_ZERO(x3,x29,cbo.zero,0x10) - -inst_23: -// rs1==x24, rs1_val == 32, -// opcode: cbo.zero ; op1:x24; op1val:0x20 -TEST_CBO_ZERO(x3,x24,cbo.zero,0x20) - -inst_24: -// rs1==x10, rs1_val == 64, -// opcode: cbo.zero ; op1:x10; op1val:0x40 -TEST_CBO_ZERO(x3,x10,cbo.zero,0x40) - -inst_25: -// rs1==x6, rs1_val == 128, -// opcode: cbo.zero ; op1:x6; op1val:0x80 -TEST_CBO_ZERO(x3,x6,cbo.zero,0x80) - -inst_26: -// rs1==x31, rs1_val == 256, -// opcode: cbo.zero ; op1:x31; op1val:0x100 -TEST_CBO_ZERO(x3,x31,cbo.zero,0x100) - -inst_27: -// rs1==x11, rs1_val == 512, -// opcode: cbo.zero ; op1:x11; op1val:0x200 -TEST_CBO_ZERO(x3,x11,cbo.zero,0x200) -RVTEST_SIGBASE(x1,signature_x1_0) - -inst_28: -// rs1==x8, rs1_val == 1024, -// opcode: cbo.zero ; op1:x8; op1val:0x400 -TEST_CBO_ZERO(x1,x8,cbo.zero,0x400) - -inst_29: -// rs1==x17, rs1_val == 2048, -// opcode: cbo.zero ; op1:x17; op1val:0x800 -TEST_CBO_ZERO(x1,x17,cbo.zero,0x800) - -inst_30: -// rs1==x3, rs1_val == 0xc93 -// opcode: cbo.zero ; op1:x3; op1val:0xc93 -TEST_CBO_ZERO(x1,x3,cbo.zero,0xc93) - -inst_31: -// rs1_val == 0xb31 -// opcode: cbo.zero ; op1:x31; op1val:0xb31 -TEST_CBO_ZERO(x1,x31,cbo.zero,0xb31) - -inst_32: -// rs1_val == 0xddf -// opcode: cbo.zero ; op1:x31; op1val:0xddf -TEST_CBO_ZERO(x1,x31,cbo.zero,0xddf) - -inst_33: -// rs1_val == 0x384 -// opcode: cbo.zero ; op1:x31; op1val:0x384 -TEST_CBO_ZERO(x1,x31,cbo.zero,0x384) -#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 -rvtest_sig_begin: -sig_begin_canary: -CANARY; - - - -signature_x3_0: - .fill 0*((RVMODEL_CBZ_BLOCKSIZE)/4),4,0xdeadbeef - - -signature_x3_1: - .fill 28*((RVMODEL_CBZ_BLOCKSIZE)/4),4,0xdeadbeef - - -signature_x1_0: - .fill 6*((RVMODEL_CBZ_BLOCKSIZE)/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 diff --git a/riscv-test-suite/rv64i_m/CMO/src/prefetch.i-01.S b/riscv-test-suite/rv64i_m/CMO/src/prefetch.i-01.S new file mode 100644 index 000000000..7a32f7571 --- /dev/null +++ b/riscv-test-suite/rv64i_m/CMO/src/prefetch.i-01.S @@ -0,0 +1,767 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:02:52 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbop.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the prefetch.i instruction of the RISC-V RV64Zicbop_Zicsr extension for the prefetch.i covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbop_Zicsr") + +.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(.*I.*Zicbop.*Zicsr.*);def TEST_CASE_1=True;",prefetch.i) + +RVTEST_SIGBASE(x4,signature_x4_1) + +inst_0: +// rs1==x12, imm_val == (-2**(12-1)) & 0b00000, imm_val == (2**(12-1)-1) & 0b00000, imm_val == 0, rs1_val == 18446743523953737727, rs1_val > imm_val and imm_val == 0 +// opcode: prefetch.i ; op1:x12; dest:x10; op1val:0xffffff7fffffffff; immval:0x0 +TEST_PREFETCH(x4,x12,prefetch.i,0x0) + +inst_1: +// rs1==x6, imm_val == 1<<5, imm_val == 32, rs1_val < imm_val and rs1_val != 0 +// opcode: prefetch.i ; op1:x6; dest:x10; op1val:0x9; immval:0x20 +TEST_PREFETCH(x4,x6,prefetch.i,0x20) + +inst_2: +// rs1==x28, rs1_val == 18446744073709551614, +// opcode: prefetch.i ; op1:x28; dest:x10; op1val:0xfffffffffffffffe; immval:-0x80 +TEST_PREFETCH(x4,x28,prefetch.i,-0x80) + +inst_3: +// rs1==x26, rs1_val == 18446744073709551613, +// opcode: prefetch.i ; op1:x26; dest:x10; op1val:0xfffffffffffffffd; immval:0xa0 +TEST_PREFETCH(x4,x26,prefetch.i,0xa0) + +inst_4: +// rs1==x15, rs1_val == 18446744073709551611, +// opcode: prefetch.i ; op1:x15; dest:x10; op1val:0xfffffffffffffffb; immval:0x3e0 +TEST_PREFETCH(x4,x15,prefetch.i,0x3e0) + +inst_5: +// rs1==x14, rs1_val == 18446744073709551607, +// opcode: prefetch.i ; op1:x14; dest:x10; op1val:0xfffffffffffffff7; immval:-0x400 +TEST_PREFETCH(x4,x14,prefetch.i,-0x400) + +inst_6: +// rs1==x27, rs1_val == 18446744073709551599, imm_val == -64 +// opcode: prefetch.i ; op1:x27; dest:x10; op1val:0xffffffffffffffef; immval:-0x40 +TEST_PREFETCH(x4,x27,prefetch.i,-0x40) + +inst_7: +// rs1==x16, rs1_val == 18446744073709551583, imm_val == -1056 +// opcode: prefetch.i ; op1:x16; dest:x10; op1val:0xffffffffffffffdf; immval:-0x420 +TEST_PREFETCH(x4,x16,prefetch.i,-0x420) + +inst_8: +// rs1==x23, rs1_val == 18446744073709551551, +// opcode: prefetch.i ; op1:x23; dest:x10; op1val:0xffffffffffffffbf; immval:0x120 +TEST_PREFETCH(x4,x23,prefetch.i,0x120) + +inst_9: +// rs1==x25, rs1_val == 18446744073709551487, imm_val == 64 +// opcode: prefetch.i ; op1:x25; dest:x10; op1val:0xffffffffffffff7f; immval:0x40 +TEST_PREFETCH(x4,x25,prefetch.i,0x40) + +inst_10: +// rs1==x0, rs1_val == 18446744073709551359, +// opcode: prefetch.i ; op1:x0; dest:x10; op1val:0x0; immval:0xc0 +TEST_PREFETCH(x4,x0,prefetch.i,0xc0) + +inst_11: +// rs1==x2, rs1_val == 18446744073709551103, +// opcode: prefetch.i ; op1:x2; dest:x10; op1val:0xfffffffffffffdff; immval:-0x40 +TEST_PREFETCH(x4,x2,prefetch.i,-0x40) + +inst_12: +// rs1==x3, rs1_val == 18446744073709550591, +// opcode: prefetch.i ; op1:x3; dest:x10; op1val:0xfffffffffffffbff; immval:0x120 +TEST_PREFETCH(x4,x3,prefetch.i,0x120) + +inst_13: +// rs1==x24, rs1_val == 18446744073709549567, +// opcode: prefetch.i ; op1:x24; dest:x10; op1val:0xfffffffffffff7ff; immval:0x40 +TEST_PREFETCH(x4,x24,prefetch.i,0x40) + +inst_14: +// rs1==x11, rs1_val == 18446744073709547519, +// opcode: prefetch.i ; op1:x11; dest:x10; op1val:0xffffffffffffefff; immval:-0x20 +TEST_PREFETCH(x4,x11,prefetch.i,-0x20) + +inst_15: +// rs1==x7, rs1_val == 18446744073709543423, +// opcode: prefetch.i ; op1:x7; dest:x10; op1val:0xffffffffffffdfff; immval:-0x40 +TEST_PREFETCH(x4,x7,prefetch.i,-0x40) + +inst_16: +// rs1==x17, rs1_val == 18446744073709535231, imm_val == 2016 +// opcode: prefetch.i ; op1:x17; dest:x10; op1val:0xffffffffffffbfff; immval:0x7e0 +TEST_PREFETCH(x4,x17,prefetch.i,0x7e0) + +inst_17: +// rs1==x18, rs1_val == 18446744073709518847, +// opcode: prefetch.i ; op1:x18; dest:x10; op1val:0xffffffffffff7fff; immval:0x40 +TEST_PREFETCH(x4,x18,prefetch.i,0x40) + +inst_18: +// rs1==x19, rs1_val == 18446744073709486079, +// opcode: prefetch.i ; op1:x19; dest:x10; op1val:0xfffffffffffeffff; immval:-0x20 +TEST_PREFETCH(x4,x19,prefetch.i,-0x20) + +inst_19: +// rs1==x9, rs1_val == 18446744073709420543, +// opcode: prefetch.i ; op1:x9; dest:x10; op1val:0xfffffffffffdffff; immval:-0x420 +TEST_PREFETCH(x4,x9,prefetch.i,-0x420) + +inst_20: +// rs1==x20, rs1_val == 18446744073709289471, +// opcode: prefetch.i ; op1:x20; dest:x10; op1val:0xfffffffffffbffff; immval:0x40 +TEST_PREFETCH(x4,x20,prefetch.i,0x40) + +inst_21: +// rs1==x1, rs1_val == 18446744073709027327, imm_val == 128 +// opcode: prefetch.i ; op1:x1; dest:x10; op1val:0xfffffffffff7ffff; immval:0x80 +TEST_PREFETCH(x4,x1,prefetch.i,0x80) + +inst_22: +// rs1==x31, rs1_val == 18446744073708503039, imm_val == 256 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffffffefffff; immval:0x100 +TEST_PREFETCH(x4,x31,prefetch.i,0x100) + +inst_23: +// rs1==x29, rs1_val == 18446744073707454463, +// opcode: prefetch.i ; op1:x29; dest:x10; op1val:0xffffffffffdfffff; immval:-0x400 +TEST_PREFETCH(x4,x29,prefetch.i,-0x400) + +inst_24: +// rs1==x21, rs1_val == 18446744073705357311, +// opcode: prefetch.i ; op1:x21; dest:x10; op1val:0xffffffffffbfffff; immval:0x120 +TEST_PREFETCH(x4,x21,prefetch.i,0x120) + +inst_25: +// rs1==x8, rs1_val == 18446744073701163007, +// opcode: prefetch.i ; op1:x8; dest:x10; op1val:0xffffffffff7fffff; immval:-0x80 +TEST_PREFETCH(x4,x8,prefetch.i,-0x80) + +inst_26: +// rs1==x5, rs1_val == 18446744073692774399, +// opcode: prefetch.i ; op1:x5; dest:x10; op1val:0xfffffffffeffffff; immval:0x0 +TEST_PREFETCH(x4,x5,prefetch.i,0x0) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_27: +// rs1==x4, rs1_val == 18446744073675997183, +// opcode: prefetch.i ; op1:x4; dest:x10; op1val:0xfffffffffdffffff; immval:0x7e0 +TEST_PREFETCH(x1,x4,prefetch.i,0x7e0) + +inst_28: +// rs1==x13, rs1_val == 18446744073642442751, +// opcode: prefetch.i ; op1:x13; dest:x10; op1val:0xfffffffffbffffff; immval:0x20 +TEST_PREFETCH(x1,x13,prefetch.i,0x20) + +inst_29: +// rs1==x30, rs1_val == 18446744073575333887, +// opcode: prefetch.i ; op1:x30; dest:x10; op1val:0xfffffffff7ffffff; immval:0x80 +TEST_PREFETCH(x1,x30,prefetch.i,0x80) + +inst_30: +// rs1==x22, rs1_val == 18446744073441116159, +// opcode: prefetch.i ; op1:x22; dest:x10; op1val:0xffffffffefffffff; immval:-0xe0 +TEST_PREFETCH(x1,x22,prefetch.i,-0xe0) + +inst_31: +// rs1==x10, rs1_val == 18446744073172680703, imm_val == -544 +// opcode: prefetch.i ; op1:x10; dest:x10; op1val:0xffffffffdfffffff; immval:-0x220 +TEST_PREFETCH(x1,x10,prefetch.i,-0x220) + +inst_32: +// rs1_val == 18446744072635809791, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffffbfffffff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.i,0x0) + +inst_33: +// rs1_val == 18446744071562067967, imm_val == -288 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffff7fffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.i,-0x120) + +inst_34: +// rs1_val == 18446744069414584319, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffffeffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x3e0) + +inst_35: +// rs1_val == 18446744065119617023, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffffdffffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_36: +// rs1_val == 18446744056529682431, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffffbffffffff; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.i,-0x420) + +inst_37: +// rs1_val == 18446744039349813247, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffff7ffffffff; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.i,-0x140) + +inst_38: +// rs1_val == 18446744004990074879, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffefffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.i,-0x120) + +inst_39: +// rs1_val == 18446743936270598143, imm_val == -1376 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffdfffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_40: +// rs1_val == 18446743798831644671, imm_val == 1024 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffbfffffffff; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.i,0x400) + +inst_41: +// rs1_val == 18446742974197923839, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffeffffffffff; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.i,-0x40) + +inst_42: +// rs1_val == 18446741874686296063, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffdffffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.i,-0x400) + +inst_43: +// rs1_val == 18446739675663040511, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffbffffffffff; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_44: +// rs1_val == 18446735277616529407, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffff7ffffffffff; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.i,0x20) + +inst_45: +// rs1_val == 18446726481523507199, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffefffffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.i,-0x120) + +inst_46: +// rs1_val == 18446708889337462783, imm_val == -2048 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffdfffffffffff; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.i,-0x800) + +inst_47: +// rs1_val == 18446673704965373951, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffbfffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_48: +// rs1_val == 18446603336221196287, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffff7fffffffffff; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.i,0x120) + +inst_49: +// rs1_val == 18446462598732840959, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffeffffffffffff; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.i,-0x20) + +inst_50: +// rs1_val == 18446181123756130303, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffdffffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_51: +// rs1_val == 18445618173802708991, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffbffffffffffff; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.i,-0x20) + +inst_52: +// rs1_val == 18444492273895866367, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfff7ffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_53: +// rs1_val == 18442240474082181119, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffefffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_54: +// rs1_val == 18437736874454810623, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffdfffffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_55: +// rs1_val == 18428729675200069631, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffbfffffffffffff; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.i,-0x800) + +inst_56: +// rs1_val == 18410715276690587647, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xff7fffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_57: +// rs1_val == 18374686479671623679, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfeffffffffffffff; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_58: +// rs1_val == 18302628885633695743, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfdffffffffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.i,-0x400) + +inst_59: +// rs1_val == 18158513697557839871, imm_val == 1344 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfbffffffffffffff; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.i,0x540) + +inst_60: +// rs1_val == 17870283321406128127, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xf7ffffffffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.i,0x40) + +inst_61: +// rs1_val == 17293822569102704639, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xefffffffffffffff; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_62: +// rs1_val == 16140901064495857663, imm_val == -96 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xdfffffffffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.i,-0x60) + +inst_63: +// rs1_val == 13835058055282163711, imm_val == 512 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xbfffffffffffffff; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.i,0x200) + +inst_64: +// rs1_val == 9223372036854775807, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x7fffffffffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x3e0) + +inst_65: +// imm_val == -160, rs1_val == 16384 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_66: +// rs1_val == 1, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_67: +// rs1_val == 2, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.i,-0x100) + +inst_68: +// rs1_val == 4, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_69: +// rs1_val == 8, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_70: +// rs1_val == 16, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_71: +// rs1_val == 9007199254740992, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20000000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_72: +// rs1_val == 18014398509481984, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40000000000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_73: +// rs1_val == 36028797018963968, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80000000000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_74: +// rs1_val == 72057594037927936, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100000000000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_75: +// rs1_val == 144115188075855872, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200000000000000; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.i,-0x120) + +inst_76: +// rs1_val == 288230376151711744, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400000000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_77: +// rs1_val == 576460752303423488, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800000000000000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.i,0x540) + +inst_78: +// rs1_val == 1152921504606846976, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000000000000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_79: +// rs1_val == 2305843009213693952, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000000000000000; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_80: +// rs1_val == 4611686018427387904, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000000000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_81: +// rs1_val == 9223372036854775808, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000000000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_82: +// rs1_val == 6148914691236517205, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x5555555555555555; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_83: +// rs1_val == 12297829382473034410, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xaaaaaaaaaaaaaaaa; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.i,-0x220) + +inst_84: +// rs1_val == (2**(xlen)-1), +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffffffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.i,-0x60) + +inst_85: +// rs1_val == 0, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x0; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_86: +// rs1_val == imm_val and rs1_val == 0, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x0; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.i,0x0) + +inst_87: +// rs1_val == 32, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.i,-0x400) + +inst_88: +// rs1_val == 64, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.i,0x400) + +inst_89: +// rs1_val == 128, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_90: +// rs1_val == 256, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_91: +// rs1_val == 512, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.i,-0x40) + +inst_92: +// rs1_val == 1024, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_93: +// rs1_val == 2048, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_94: +// rs1_val == 4096, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.i,-0x40) + +inst_95: +// rs1_val == 8192, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.i,0x40) + +inst_96: +// rs1_val == 32768, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.i,0x20) + +inst_97: +// rs1_val == 65536, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10000; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.i,0x120) + +inst_98: +// rs1_val == 131072, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20000; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.i,-0x420) + +inst_99: +// rs1_val == 262144, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xe0) + +inst_100: +// rs1_val == 524288, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_101: +// rs1_val == 1048576, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.i,0x80) + +inst_102: +// rs1_val == 2097152, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.i,-0x400) + +inst_103: +// rs1_val == 4194304, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_104: +// rs1_val == 8388608, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_105: +// rs1_val == 16777216, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000000; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.i,0x0) + +inst_106: +// rs1_val == 33554432, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_107: +// rs1_val == 67108864, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x3e0) + +inst_108: +// rs1_val == 134217728, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.i,0x20) + +inst_109: +// rs1_val == 268435456, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_110: +// rs1_val == 536870912, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_111: +// rs1_val == 1073741824, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40000000; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.i,-0x420) + +inst_112: +// rs1_val == 2147483648, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_113: +// rs1_val == 4294967296, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.i,0x200) + +inst_114: +// rs1_val == 8589934592, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_115: +// rs1_val == 17179869184, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400000000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,0xa0) + +inst_116: +// rs1_val == 34359738368, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800000000; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_117: +// rs1_val == 68719476736, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000000000; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.i,-0x40) + +inst_118: +// rs1_val == 137438953472, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_119: +// rs1_val == 274877906944, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000000000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_120: +// rs1_val == 549755813888, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000000000; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.i,0x120) + +inst_121: +// rs1_val == 1099511627776, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10000000000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_122: +// rs1_val == 2199023255552, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20000000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_123: +// rs1_val == 4398046511104, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40000000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.i,0x200) + +inst_124: +// rs1_val == 8796093022208, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80000000000; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.i,-0x220) + +inst_125: +// rs1_val == 17592186044416, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100000000000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_126: +// rs1_val == 35184372088832, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200000000000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,0xa0) + +inst_127: +// rs1_val == 70368744177664, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400000000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_128: +// rs1_val == 140737488355328, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800000000000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_129: +// rs1_val == 281474976710656, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.i,-0x20) + +inst_130: +// rs1_val == 562949953421312, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000000000000; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.i,-0x800) + +inst_131: +// rs1_val == 1125899906842624, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000000000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_132: +// rs1_val == 2251799813685248, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000000000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x3e0) + +inst_133: +// rs1_val == 4503599627370496, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10000000000000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.i,0x540) + +inst_134: +// rs1_val == 18446744073709551359, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffffffffffeff; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x4_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x4_1: + .fill 27*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 108*((XLEN/8)/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 diff --git a/riscv-test-suite/rv64i_m/CMO/src/prefetch.r-01.S b/riscv-test-suite/rv64i_m/CMO/src/prefetch.r-01.S new file mode 100644 index 000000000..531a91839 --- /dev/null +++ b/riscv-test-suite/rv64i_m/CMO/src/prefetch.r-01.S @@ -0,0 +1,777 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:02:52 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbop.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the prefetch.r instruction of the RISC-V RV64Zicbop_Zicsr extension for the prefetch.r covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbop_Zicsr") + +.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(.*I.*Zicbop.*Zicsr.*);def TEST_CASE_1=True;",prefetch.r) + +RVTEST_SIGBASE(x14,signature_x14_1) + +inst_0: +// rs1==x8, imm_val == (-2**(12-1)) & 0b00000, imm_val == (2**(12-1)-1) & 0b00000, imm_val == 0, rs1_val < imm_val and rs1_val != 0 +// opcode: prefetch.r ; op1:x8; dest:x10; op1val:-0xb504f332; immval:0x0 +TEST_PREFETCH(x14,x8,prefetch.r,0x0) + +inst_1: +// rs1==x11, imm_val == 1<<5, rs1_val == 4194304, imm_val == 32 +// opcode: prefetch.r ; op1:x11; dest:x10; op1val:0x400000; immval:0x20 +TEST_PREFETCH(x14,x11,prefetch.r,0x20) + +inst_2: +// rs1==x22, rs1_val == 18446744073709551614, imm_val == 128 +// opcode: prefetch.r ; op1:x22; dest:x10; op1val:0xfffffffffffffffe; immval:0x80 +TEST_PREFETCH(x14,x22,prefetch.r,0x80) + +inst_3: +// rs1==x23, rs1_val == 18446744073709551613, +// opcode: prefetch.r ; op1:x23; dest:x10; op1val:0xfffffffffffffffd; immval:0x3e0 +TEST_PREFETCH(x14,x23,prefetch.r,0x3e0) + +inst_4: +// rs1==x19, rs1_val == 18446744073709551611, +// opcode: prefetch.r ; op1:x19; dest:x10; op1val:0xfffffffffffffffb; immval:-0x140 +TEST_PREFETCH(x14,x19,prefetch.r,-0x140) + +inst_5: +// rs1==x26, rs1_val == 18446744073709551607, imm_val == 1024 +// opcode: prefetch.r ; op1:x26; dest:x10; op1val:0xfffffffffffffff7; immval:0x400 +TEST_PREFETCH(x14,x26,prefetch.r,0x400) + +inst_6: +// rs1==x6, rs1_val == 18446744073709551599, +// opcode: prefetch.r ; op1:x6; dest:x10; op1val:0xffffffffffffffef; immval:0x80 +TEST_PREFETCH(x14,x6,prefetch.r,0x80) + +inst_7: +// rs1==x4, rs1_val == 18446744073709551583, +// opcode: prefetch.r ; op1:x4; dest:x10; op1val:0xffffffffffffffdf; immval:-0xe0 +TEST_PREFETCH(x14,x4,prefetch.r,-0xe0) + +inst_8: +// rs1==x5, rs1_val == 18446744073709551551, +// opcode: prefetch.r ; op1:x5; dest:x10; op1val:0xffffffffffffffbf; immval:0x20 +TEST_PREFETCH(x14,x5,prefetch.r,0x20) + +inst_9: +// rs1==x7, rs1_val == 18446744073709551487, imm_val == -1376 +// opcode: prefetch.r ; op1:x7; dest:x10; op1val:0xffffffffffffff7f; immval:-0x560 +TEST_PREFETCH(x14,x7,prefetch.r,-0x560) + +inst_10: +// rs1==x9, rs1_val == 18446744073709551359, +// opcode: prefetch.r ; op1:x9; dest:x10; op1val:0xfffffffffffffeff; immval:0x60 +TEST_PREFETCH(x14,x9,prefetch.r,0x60) + +inst_11: +// rs1==x0, rs1_val == 18446744073709551103, rs1_val > imm_val and imm_val == 0 +// opcode: prefetch.r ; op1:x0; dest:x10; op1val:0x0; immval:0x0 +TEST_PREFETCH(x14,x0,prefetch.r,0x0) + +inst_12: +// rs1==x17, rs1_val == 18446744073709550591, +// opcode: prefetch.r ; op1:x17; dest:x10; op1val:0xfffffffffffffbff; immval:-0x140 +TEST_PREFETCH(x14,x17,prefetch.r,-0x140) + +inst_13: +// rs1==x3, rs1_val == 18446744073709549567, +// opcode: prefetch.r ; op1:x3; dest:x10; op1val:0xfffffffffffff7ff; immval:-0xe0 +TEST_PREFETCH(x14,x3,prefetch.r,-0xe0) + +inst_14: +// rs1==x12, rs1_val == 18446744073709547519, +// opcode: prefetch.r ; op1:x12; dest:x10; op1val:0xffffffffffffefff; immval:-0x20 +TEST_PREFETCH(x14,x12,prefetch.r,-0x20) + +inst_15: +// rs1==x24, rs1_val == 18446744073709543423, +// opcode: prefetch.r ; op1:x24; dest:x10; op1val:0xffffffffffffdfff; immval:0x80 +TEST_PREFETCH(x14,x24,prefetch.r,0x80) + +inst_16: +// rs1==x16, rs1_val == 18446744073709535231, imm_val == -96 +// opcode: prefetch.r ; op1:x16; dest:x10; op1val:0xffffffffffffbfff; immval:-0x60 +TEST_PREFETCH(x14,x16,prefetch.r,-0x60) + +inst_17: +// rs1==x2, rs1_val == 18446744073709518847, +// opcode: prefetch.r ; op1:x2; dest:x10; op1val:0xffffffffffff7fff; immval:0x120 +TEST_PREFETCH(x14,x2,prefetch.r,0x120) + +inst_18: +// rs1==x30, rs1_val == 18446744073709486079, +// opcode: prefetch.r ; op1:x30; dest:x10; op1val:0xfffffffffffeffff; immval:0x60 +TEST_PREFETCH(x14,x30,prefetch.r,0x60) + +inst_19: +// rs1==x28, rs1_val == 18446744073709420543, +// opcode: prefetch.r ; op1:x28; dest:x10; op1val:0xfffffffffffdffff; immval:-0x60 +TEST_PREFETCH(x14,x28,prefetch.r,-0x60) + +inst_20: +// rs1==x25, rs1_val == 18446744073709289471, imm_val == 512 +// opcode: prefetch.r ; op1:x25; dest:x10; op1val:0xfffffffffffbffff; immval:0x200 +TEST_PREFETCH(x14,x25,prefetch.r,0x200) + +inst_21: +// rs1==x13, rs1_val == 18446744073709027327, +// opcode: prefetch.r ; op1:x13; dest:x10; op1val:0xfffffffffff7ffff; immval:0x200 +TEST_PREFETCH(x14,x13,prefetch.r,0x200) + +inst_22: +// rs1==x29, rs1_val == 18446744073708503039, imm_val == -288 +// opcode: prefetch.r ; op1:x29; dest:x10; op1val:0xffffffffffefffff; immval:-0x120 +TEST_PREFETCH(x14,x29,prefetch.r,-0x120) + +inst_23: +// rs1==x15, rs1_val == 18446744073707454463, imm_val == 64 +// opcode: prefetch.r ; op1:x15; dest:x10; op1val:0xffffffffffdfffff; immval:0x40 +TEST_PREFETCH(x14,x15,prefetch.r,0x40) + +inst_24: +// rs1==x21, rs1_val == 18446744073705357311, imm_val == 2016 +// opcode: prefetch.r ; op1:x21; dest:x10; op1val:0xffffffffffbfffff; immval:0x7e0 +TEST_PREFETCH(x14,x21,prefetch.r,0x7e0) + +inst_25: +// rs1==x1, rs1_val == 18446744073701163007, +// opcode: prefetch.r ; op1:x1; dest:x10; op1val:0xffffffffff7fffff; immval:0x20 +TEST_PREFETCH(x14,x1,prefetch.r,0x20) + +inst_26: +// rs1==x20, rs1_val == 18446744073692774399, imm_val == -2048 +// opcode: prefetch.r ; op1:x20; dest:x10; op1val:0xfffffffffeffffff; immval:-0x800 +TEST_PREFETCH(x14,x20,prefetch.r,-0x800) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_27: +// rs1==x31, rs1_val == 18446744073675997183, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffffdffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.r,-0x120) + +inst_28: +// rs1==x27, rs1_val == 18446744073642442751, +// opcode: prefetch.r ; op1:x27; dest:x10; op1val:0xfffffffffbffffff; immval:-0x100 +TEST_PREFETCH(x1,x27,prefetch.r,-0x100) + +inst_29: +// rs1==x14, rs1_val == 18446744073575333887, +// opcode: prefetch.r ; op1:x14; dest:x10; op1val:0xfffffffff7ffffff; immval:0x60 +TEST_PREFETCH(x1,x14,prefetch.r,0x60) + +inst_30: +// rs1==x18, rs1_val == 18446744073441116159, +// opcode: prefetch.r ; op1:x18; dest:x10; op1val:0xffffffffefffffff; immval:0x120 +TEST_PREFETCH(x1,x18,prefetch.r,0x120) + +inst_31: +// rs1==x10, rs1_val == 18446744073172680703, +// opcode: prefetch.r ; op1:x10; dest:x10; op1val:0xffffffffdfffffff; immval:-0xc0 +TEST_PREFETCH(x1,x10,prefetch.r,-0xc0) + +inst_32: +// rs1_val == 18446744072635809791, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffffbfffffff; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,0xa0) + +inst_33: +// rs1_val == 18446744071562067967, imm_val == -544 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffff7fffffff; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.r,-0x220) + +inst_34: +// rs1_val == 18446744069414584319, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffeffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_35: +// rs1_val == 18446744065119617023, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffdffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.r,-0x560) + +inst_36: +// rs1_val == 18446744056529682431, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffbffffffff; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.r,0x120) + +inst_37: +// rs1_val == 18446744039349813247, imm_val == -64 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffff7ffffffff; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.r,-0x40) + +inst_38: +// rs1_val == 18446744004990074879, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffefffffffff; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_39: +// rs1_val == 18446743936270598143, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffdfffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.r,-0x120) + +inst_40: +// rs1_val == 18446743798831644671, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffbfffffffff; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.r,0x60) + +inst_41: +// rs1_val == 18446743523953737727, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffff7fffffffff; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.r,-0x220) + +inst_42: +// rs1_val == 18446742974197923839, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffeffffffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.r,-0x80) + +inst_43: +// rs1_val == 18446741874686296063, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffdffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_44: +// rs1_val == 18446739675663040511, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffbffffffffff; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.r,0x20) + +inst_45: +// rs1_val == 18446735277616529407, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffff7ffffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.r,-0x400) + +inst_46: +// rs1_val == 18446726481523507199, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffefffffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_47: +// rs1_val == 18446708889337462783, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffdfffffffffff; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.r,-0x140) + +inst_48: +// rs1_val == 18446673704965373951, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffbfffffffffff; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_49: +// rs1_val == 18446603336221196287, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffff7fffffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_50: +// rs1_val == 18446462598732840959, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffeffffffffffff; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.r,-0x800) + +inst_51: +// rs1_val == 18446181123756130303, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffdffffffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_52: +// rs1_val == 18445618173802708991, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffbffffffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.r,-0x120) + +inst_53: +// rs1_val == 18444492273895866367, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfff7ffffffffffff; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.r,-0x100) + +inst_54: +// rs1_val == 18442240474082181119, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffefffffffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x3e0) + +inst_55: +// rs1_val == 18437736874454810623, imm_val == 256 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffdfffffffffffff; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.r,0x100) + +inst_56: +// rs1_val == 18428729675200069631, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffbfffffffffffff; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.r,0x400) + +inst_57: +// rs1_val == 18410715276690587647, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xff7fffffffffffff; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.r,0xc0) + +inst_58: +// rs1_val == 18374686479671623679, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfeffffffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_59: +// rs1_val == 18302628885633695743, imm_val == 1344 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfdffffffffffffff; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.r,0x540) + +inst_60: +// rs1_val == 18158513697557839871, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfbffffffffffffff; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.r,0x20) + +inst_61: +// rs1_val == 17870283321406128127, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xf7ffffffffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_62: +// rs1_val == 17293822569102704639, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xefffffffffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_63: +// rs1_val == 16140901064495857663, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xdfffffffffffffff; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.r,-0x220) + +inst_64: +// rs1_val == 13835058055282163711, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xbfffffffffffffff; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,0xa0) + +inst_65: +// rs1_val == 9223372036854775807, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x7fffffffffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.r,-0x120) + +inst_66: +// imm_val == -160, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:-0xb504f333; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xa0) + +inst_67: +// imm_val == -1056, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffffdffffff; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.r,-0x420) + +inst_68: +// rs1_val == 1, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_69: +// rs1_val == 2, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.r,-0x40) + +inst_70: +// rs1_val == 4, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_71: +// rs1_val == 8, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) + +inst_72: +// rs1_val == 16, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) + +inst_73: +// rs1_val == 9007199254740992, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_74: +// rs1_val == 18014398509481984, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40000000000000; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.r,-0x140) + +inst_75: +// rs1_val == 36028797018963968, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_76: +// rs1_val == 72057594037927936, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100000000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xe0) + +inst_77: +// rs1_val == 144115188075855872, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200000000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xe0) + +inst_78: +// rs1_val == 288230376151711744, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x400000000000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x3e0) + +inst_79: +// rs1_val == 576460752303423488, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800000000000000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_80: +// rs1_val == 1152921504606846976, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000000000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_81: +// rs1_val == 2305843009213693952, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000000000000000; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.r,-0x800) + +inst_82: +// rs1_val == 4611686018427387904, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000000000000000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_83: +// rs1_val == 9223372036854775808, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000000000000000; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.r,0x400) + +inst_84: +// rs1_val == 6148914691236517205, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x5555555555555555; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.r,-0x40) + +inst_85: +// rs1_val == 12297829382473034410, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xaaaaaaaaaaaaaaaa; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_86: +// rs1_val == (2**(xlen)-1), +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffffffffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.r,-0x80) + +inst_87: +// rs1_val == 0, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x0; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_88: +// rs1_val == imm_val and rs1_val == 0, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x0; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) + +inst_89: +// rs1_val == 32, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.r,0x60) + +inst_90: +// rs1_val == 64, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.r,0x200) + +inst_91: +// rs1_val == 128, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.r,-0x420) + +inst_92: +// rs1_val == 256, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.r,0x20) + +inst_93: +// rs1_val == 512, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.r,-0x400) + +inst_94: +// rs1_val == 1024, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x400; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.r,0x60) + +inst_95: +// rs1_val == 2048, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.r,-0x560) + +inst_96: +// rs1_val == 4096, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_97: +// rs1_val == 8192, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.r,-0x100) + +inst_98: +// rs1_val == 16384, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_99: +// rs1_val == 32768, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.r,-0x140) + +inst_100: +// rs1_val == 65536, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.r,-0x560) + +inst_101: +// rs1_val == 131072, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,0xa0) + +inst_102: +// rs1_val == 262144, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xa0) + +inst_103: +// rs1_val == 524288, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.r,0x20) + +inst_104: +// rs1_val == 1048576, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,0xa0) + +inst_105: +// rs1_val == 2097152, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.r,0x100) + +inst_106: +// rs1_val == 8388608, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xa0) + +inst_107: +// rs1_val == 16777216, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.r,0x540) + +inst_108: +// rs1_val == 33554432, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_109: +// rs1_val == 67108864, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_110: +// rs1_val == 134217728, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.r,0x100) + +inst_111: +// rs1_val == 268435456, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x3e0) + +inst_112: +// rs1_val == 536870912, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20000000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.r,-0x400) + +inst_113: +// rs1_val == 1073741824, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.r,0x200) + +inst_114: +// rs1_val == 2147483648, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x3e0) + +inst_115: +// rs1_val == 4294967296, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.r,-0x80) + +inst_116: +// rs1_val == 8589934592, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200000000; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.r,0x400) + +inst_117: +// rs1_val == 17179869184, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x400000000; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.r,-0x40) + +inst_118: +// rs1_val == 34359738368, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.r,-0x80) + +inst_119: +// rs1_val == 68719476736, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000000000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.r,0x540) + +inst_120: +// rs1_val == 137438953472, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000000000; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.r,0x60) + +inst_121: +// rs1_val == 274877906944, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_122: +// rs1_val == 549755813888, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000000000; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_123: +// rs1_val == 1099511627776, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_124: +// rs1_val == 2199023255552, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_125: +// rs1_val == 4398046511104, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xe0) + +inst_126: +// rs1_val == 8796093022208, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_127: +// rs1_val == 17592186044416, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100000000000; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) + +inst_128: +// rs1_val == 35184372088832, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200000000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.r,0x200) + +inst_129: +// rs1_val == 70368744177664, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x400000000000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.r,-0x400) + +inst_130: +// rs1_val == 140737488355328, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_131: +// rs1_val == 281474976710656, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000000000000; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x7e0) + +inst_132: +// rs1_val == 562949953421312, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000000000000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.r,-0x560) + +inst_133: +// rs1_val == 1125899906842624, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_134: +// rs1_val == 2251799813685248, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000000000000; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.r,-0x100) + +inst_135: +// rs1_val == 4503599627370496, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10000000000000; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_136: +// rs1_val == 18446744073709551103, rs1_val > imm_val and imm_val == 0 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffffffffdff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x14_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x14_1: + .fill 27*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 110*((XLEN/8)/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 diff --git a/riscv-test-suite/rv64i_m/CMO/src/prefetch.w-01.S b/riscv-test-suite/rv64i_m/CMO/src/prefetch.w-01.S new file mode 100644 index 000000000..829b3d76b --- /dev/null +++ b/riscv-test-suite/rv64i_m/CMO/src/prefetch.w-01.S @@ -0,0 +1,772 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:02:52 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbop.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the prefetch.w instruction of the RISC-V RV64Zicbop_Zicsr extension for the prefetch.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbop_Zicsr") + +.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(.*I.*Zicbop.*Zicsr.*);def TEST_CASE_1=True;",prefetch.w) + +RVTEST_SIGBASE(x15,signature_x15_1) + +inst_0: +// rs1==x7, imm_val == (-2**(12-1)) & 0b00000, imm_val == (2**(12-1)-1) & 0b00000, imm_val == 0, rs1_val == 18446744073707454463, rs1_val > imm_val and imm_val == 0 +// opcode: prefetch.w ; op1:x7; dest:x10; op1val:0xffffffffffdfffff; immval:0x0 +TEST_PREFETCH(x15,x7,prefetch.w,0x0) + +inst_1: +// rs1==x30, imm_val == 1<<5, rs1_val == 137438953472, imm_val == 32 +// opcode: prefetch.w ; op1:x30; dest:x10; op1val:0x2000000000; immval:0x20 +TEST_PREFETCH(x15,x30,prefetch.w,0x20) + +inst_2: +// rs1==x0, rs1_val == 18446744073709551614, imm_val == 1344 +// opcode: prefetch.w ; op1:x0; dest:x10; op1val:0x0; immval:0x540 +TEST_PREFETCH(x15,x0,prefetch.w,0x540) + +inst_3: +// rs1==x4, rs1_val == 18446744073709551613, +// opcode: prefetch.w ; op1:x4; dest:x10; op1val:0xfffffffffffffffd; immval:-0x100 +TEST_PREFETCH(x15,x4,prefetch.w,-0x100) + +inst_4: +// rs1==x9, rs1_val == 18446744073709551611, imm_val == 1024 +// opcode: prefetch.w ; op1:x9; dest:x10; op1val:0xfffffffffffffffb; immval:0x400 +TEST_PREFETCH(x15,x9,prefetch.w,0x400) + +inst_5: +// rs1==x28, rs1_val == 18446744073709551607, +// opcode: prefetch.w ; op1:x28; dest:x10; op1val:0xfffffffffffffff7; immval:0x120 +TEST_PREFETCH(x15,x28,prefetch.w,0x120) + +inst_6: +// rs1==x3, rs1_val == 18446744073709551599, +// opcode: prefetch.w ; op1:x3; dest:x10; op1val:0xffffffffffffffef; immval:0x120 +TEST_PREFETCH(x15,x3,prefetch.w,0x120) + +inst_7: +// rs1==x6, rs1_val == 18446744073709551583, imm_val == 256 +// opcode: prefetch.w ; op1:x6; dest:x10; op1val:0xffffffffffffffdf; immval:0x100 +TEST_PREFETCH(x15,x6,prefetch.w,0x100) + +inst_8: +// rs1==x12, rs1_val == 18446744073709551551, +// opcode: prefetch.w ; op1:x12; dest:x10; op1val:0xffffffffffffffbf; immval:0x20 +TEST_PREFETCH(x15,x12,prefetch.w,0x20) + +inst_9: +// rs1==x17, rs1_val == 18446744073709551487, +// opcode: prefetch.w ; op1:x17; dest:x10; op1val:0xffffffffffffff7f; immval:0x60 +TEST_PREFETCH(x15,x17,prefetch.w,0x60) + +inst_10: +// rs1==x5, rs1_val == 18446744073709551359, +// opcode: prefetch.w ; op1:x5; dest:x10; op1val:0xfffffffffffffeff; immval:0x120 +TEST_PREFETCH(x15,x5,prefetch.w,0x120) + +inst_11: +// rs1==x2, rs1_val == 18446744073709551103, +// opcode: prefetch.w ; op1:x2; dest:x10; op1val:0xfffffffffffffdff; immval:0x20 +TEST_PREFETCH(x15,x2,prefetch.w,0x20) + +inst_12: +// rs1==x27, rs1_val == 18446744073709550591, +// opcode: prefetch.w ; op1:x27; dest:x10; op1val:0xfffffffffffffbff; immval:-0xe0 +TEST_PREFETCH(x15,x27,prefetch.w,-0xe0) + +inst_13: +// rs1==x13, rs1_val == 18446744073709549567, imm_val == 2016 +// opcode: prefetch.w ; op1:x13; dest:x10; op1val:0xfffffffffffff7ff; immval:0x7e0 +TEST_PREFETCH(x15,x13,prefetch.w,0x7e0) + +inst_14: +// rs1==x1, rs1_val == 18446744073709547519, +// opcode: prefetch.w ; op1:x1; dest:x10; op1val:0xffffffffffffefff; immval:0xe0 +TEST_PREFETCH(x15,x1,prefetch.w,0xe0) + +inst_15: +// rs1==x29, rs1_val == 18446744073709543423, imm_val == -64 +// opcode: prefetch.w ; op1:x29; dest:x10; op1val:0xffffffffffffdfff; immval:-0x40 +TEST_PREFETCH(x15,x29,prefetch.w,-0x40) + +inst_16: +// rs1==x8, rs1_val == 18446744073709535231, +// opcode: prefetch.w ; op1:x8; dest:x10; op1val:0xffffffffffffbfff; immval:0x120 +TEST_PREFETCH(x15,x8,prefetch.w,0x120) + +inst_17: +// rs1==x25, rs1_val == 18446744073709518847, imm_val == 512 +// opcode: prefetch.w ; op1:x25; dest:x10; op1val:0xffffffffffff7fff; immval:0x200 +TEST_PREFETCH(x15,x25,prefetch.w,0x200) + +inst_18: +// rs1==x11, rs1_val == 18446744073709486079, +// opcode: prefetch.w ; op1:x11; dest:x10; op1val:0xfffffffffffeffff; immval:0x0 +TEST_PREFETCH(x15,x11,prefetch.w,0x0) + +inst_19: +// rs1==x14, rs1_val == 18446744073709420543, +// opcode: prefetch.w ; op1:x14; dest:x10; op1val:0xfffffffffffdffff; immval:0x20 +TEST_PREFETCH(x15,x14,prefetch.w,0x20) + +inst_20: +// rs1==x21, rs1_val == 18446744073709289471, +// opcode: prefetch.w ; op1:x21; dest:x10; op1val:0xfffffffffffbffff; immval:0xe0 +TEST_PREFETCH(x15,x21,prefetch.w,0xe0) + +inst_21: +// rs1==x16, rs1_val == 18446744073709027327, +// opcode: prefetch.w ; op1:x16; dest:x10; op1val:0xfffffffffff7ffff; immval:0x400 +TEST_PREFETCH(x15,x16,prefetch.w,0x400) + +inst_22: +// rs1==x19, rs1_val == 18446744073708503039, +// opcode: prefetch.w ; op1:x19; dest:x10; op1val:0xffffffffffefffff; immval:0x120 +TEST_PREFETCH(x15,x19,prefetch.w,0x120) + +inst_23: +// rs1==x24, rs1_val == 18446744073705357311, +// opcode: prefetch.w ; op1:x24; dest:x10; op1val:0xffffffffffbfffff; immval:0x3e0 +TEST_PREFETCH(x15,x24,prefetch.w,0x3e0) + +inst_24: +// rs1==x23, rs1_val == 18446744073701163007, +// opcode: prefetch.w ; op1:x23; dest:x10; op1val:0xffffffffff7fffff; immval:0x120 +TEST_PREFETCH(x15,x23,prefetch.w,0x120) + +inst_25: +// rs1==x18, rs1_val == 18446744073692774399, +// opcode: prefetch.w ; op1:x18; dest:x10; op1val:0xfffffffffeffffff; immval:0x3e0 +TEST_PREFETCH(x15,x18,prefetch.w,0x3e0) + +inst_26: +// rs1==x20, rs1_val == 18446744073675997183, +// opcode: prefetch.w ; op1:x20; dest:x10; op1val:0xfffffffffdffffff; immval:-0x20 +TEST_PREFETCH(x15,x20,prefetch.w,-0x20) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_27: +// rs1==x15, rs1_val == 18446744073642442751, +// opcode: prefetch.w ; op1:x15; dest:x10; op1val:0xfffffffffbffffff; immval:0x3e0 +TEST_PREFETCH(x1,x15,prefetch.w,0x3e0) + +inst_28: +// rs1==x26, rs1_val == 18446744073575333887, imm_val == -160 +// opcode: prefetch.w ; op1:x26; dest:x10; op1val:0xfffffffff7ffffff; immval:-0xa0 +TEST_PREFETCH(x1,x26,prefetch.w,-0xa0) + +inst_29: +// rs1==x31, rs1_val == 18446744073441116159, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffffefffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_30: +// rs1==x22, rs1_val == 18446744073172680703, +// opcode: prefetch.w ; op1:x22; dest:x10; op1val:0xffffffffdfffffff; immval:0xa0 +TEST_PREFETCH(x1,x22,prefetch.w,0xa0) + +inst_31: +// rs1==x10, rs1_val == 18446744072635809791, +// opcode: prefetch.w ; op1:x10; dest:x10; op1val:0xffffffffbfffffff; immval:0x20 +TEST_PREFETCH(x1,x10,prefetch.w,0x20) + +inst_32: +// rs1_val == 18446744071562067967, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffff7fffffff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_33: +// rs1_val == 18446744069414584319, imm_val == -288 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffffeffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.w,-0x120) + +inst_34: +// rs1_val == 18446744065119617023, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffffdffffffff; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.w,0x400) + +inst_35: +// rs1_val == 18446744056529682431, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffffbffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_36: +// rs1_val == 18446744039349813247, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffff7ffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x3e0) + +inst_37: +// rs1_val == 18446744004990074879, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffefffffffff; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.w,0x400) + +inst_38: +// rs1_val == 18446743936270598143, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffdfffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,0xe0) + +inst_39: +// rs1_val == 18446743798831644671, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffbfffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x3e0) + +inst_40: +// rs1_val == 18446743523953737727, imm_val == 64 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffff7fffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.w,0x40) + +inst_41: +// rs1_val == 18446742974197923839, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffeffffffffff; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.w,-0x100) + +inst_42: +// rs1_val == 18446741874686296063, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffdffffffffff; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.w,-0x40) + +inst_43: +// rs1_val == 18446739675663040511, imm_val == 128 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffbffffffffff; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.w,0x80) + +inst_44: +// rs1_val == 18446735277616529407, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffff7ffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,0xe0) + +inst_45: +// rs1_val == 18446726481523507199, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffefffffffffff; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.w,0x540) + +inst_46: +// rs1_val == 18446708889337462783, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffdfffffffffff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_47: +// rs1_val == 18446673704965373951, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffbfffffffffff; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_48: +// rs1_val == 18446603336221196287, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffff7fffffffffff; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.w,0x20) + +inst_49: +// rs1_val == 18446462598732840959, imm_val == -1376 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffeffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_50: +// rs1_val == 18446181123756130303, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffdffffffffffff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_51: +// rs1_val == 18445618173802708991, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffbffffffffffff; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,0xc0) + +inst_52: +// rs1_val == 18444492273895866367, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfff7ffffffffffff; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_53: +// rs1_val == 18442240474082181119, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffefffffffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_54: +// rs1_val == 18437736874454810623, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffdfffffffffffff; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.w,-0x140) + +inst_55: +// rs1_val == 18428729675200069631, imm_val == -2048 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffbfffffffffffff; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.w,-0x800) + +inst_56: +// rs1_val == 18410715276690587647, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xff7fffffffffffff; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xa0) + +inst_57: +// rs1_val == 18374686479671623679, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfeffffffffffffff; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_58: +// rs1_val == 18302628885633695743, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfdffffffffffffff; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.w,-0x140) + +inst_59: +// rs1_val == 18158513697557839871, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfbffffffffffffff; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.w,-0x40) + +inst_60: +// rs1_val == 17870283321406128127, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xf7ffffffffffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_61: +// rs1_val == 17293822569102704639, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xefffffffffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x3e0) + +inst_62: +// rs1_val == 16140901064495857663, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xdfffffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_63: +// rs1_val == 13835058055282163711, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xbfffffffffffffff; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.w,0x120) + +inst_64: +// rs1_val == 9223372036854775807, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x7fffffffffffffff; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.w,0x60) + +inst_65: +// imm_val == -96, rs1_val == 536870912 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20000000; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.w,-0x60) + +inst_66: +// imm_val == -544, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffefffffffffff; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.w,-0x220) + +inst_67: +// imm_val == -1056, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x12; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.w,-0x420) + +inst_68: +// rs1_val == 1, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_69: +// rs1_val == 2, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.w,-0x60) + +inst_70: +// rs1_val == 4, rs1_val < imm_val and rs1_val != 0 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.w,0x200) + +inst_71: +// rs1_val == 8, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.w,0x40) + +inst_72: +// rs1_val == 9007199254740992, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_73: +// rs1_val == 18014398509481984, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40000000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.w,0x80) + +inst_74: +// rs1_val == 36028797018963968, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80000000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.w,0x80) + +inst_75: +// rs1_val == 72057594037927936, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_76: +// rs1_val == 144115188075855872, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200000000000000; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.w,0x400) + +inst_77: +// rs1_val == 288230376151711744, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400000000000000; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.w,-0x220) + +inst_78: +// rs1_val == 576460752303423488, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800000000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xc0) + +inst_79: +// rs1_val == 1152921504606846976, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000000000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,0xe0) + +inst_80: +// rs1_val == 2305843009213693952, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2000000000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_81: +// rs1_val == 4611686018427387904, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000000000000000; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.w,-0x60) + +inst_82: +// rs1_val == 9223372036854775808, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000000000000000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_83: +// rs1_val == 6148914691236517205, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x5555555555555555; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.w,-0x100) + +inst_84: +// rs1_val == 12297829382473034410, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xaaaaaaaaaaaaaaaa; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,0xe0) + +inst_85: +// rs1_val == (2**(xlen)-1), +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffffffffffff; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.w,0x60) + +inst_86: +// rs1_val == 0, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x0; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x3e0) + +inst_87: +// rs1_val == imm_val and rs1_val == 0, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x0; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_88: +// rs1_val == 16, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x7e0) + +inst_89: +// rs1_val == 32, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xc0) + +inst_90: +// rs1_val == 64, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_91: +// rs1_val == 128, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.w,0x120) + +inst_92: +// rs1_val == 256, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.w,0x20) + +inst_93: +// rs1_val == 512, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.w,0x200) + +inst_94: +// rs1_val == 1024, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_95: +// rs1_val == 2048, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.w,-0x220) + +inst_96: +// rs1_val == 4096, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.w,-0x800) + +inst_97: +// rs1_val == 8192, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.w,0x540) + +inst_98: +// rs1_val == 16384, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_99: +// rs1_val == 32768, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_100: +// rs1_val == 65536, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_101: +// rs1_val == 131072, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_102: +// rs1_val == 262144, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.w,0x40) + +inst_103: +// rs1_val == 524288, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_104: +// rs1_val == 1048576, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.w,0x100) + +inst_105: +// rs1_val == 2097152, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_106: +// rs1_val == 4194304, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400000; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.w,-0x40) + +inst_107: +// rs1_val == 8388608, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_108: +// rs1_val == 16777216, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_109: +// rs1_val == 33554432, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2000000; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.w,0x60) + +inst_110: +// rs1_val == 67108864, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000000; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.w,-0x420) + +inst_111: +// rs1_val == 134217728, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_112: +// rs1_val == 268435456, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10000000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_113: +// rs1_val == 1073741824, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.w,0x100) + +inst_114: +// rs1_val == 2147483648, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80000000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.w,0xa0) + +inst_115: +// rs1_val == 4294967296, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100000000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.w,0x20) + +inst_116: +// rs1_val == 8589934592, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200000000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_117: +// rs1_val == 17179869184, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400000000; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.w,0x400) + +inst_118: +// rs1_val == 34359738368, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800000000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.w,0x20) + +inst_119: +// rs1_val == 68719476736, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.w,0x200) + +inst_120: +// rs1_val == 274877906944, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xc0) + +inst_121: +// rs1_val == 549755813888, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_122: +// rs1_val == 1099511627776, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.w,0x80) + +inst_123: +// rs1_val == 2199023255552, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20000000000; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.w,0x120) + +inst_124: +// rs1_val == 4398046511104, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40000000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.w,0x100) + +inst_125: +// rs1_val == 8796093022208, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80000000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xa0) + +inst_126: +// rs1_val == 17592186044416, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100000000000; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_127: +// rs1_val == 35184372088832, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200000000000; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.w,-0x100) + +inst_128: +// rs1_val == 70368744177664, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_129: +// rs1_val == 140737488355328, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800000000000; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.w,-0x100) + +inst_130: +// rs1_val == 281474976710656, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000000000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.w,0x200) + +inst_131: +// rs1_val == 562949953421312, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2000000000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_132: +// rs1_val == 1125899906842624, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000000000000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.w,0xa0) + +inst_133: +// rs1_val == 2251799813685248, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000000000000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,0xc0) + +inst_134: +// rs1_val == 4503599627370496, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10000000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_135: +// rs1_val == 18446744073709551614, imm_val == 1344 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffffffffffffe; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.w,0x540) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x15_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x15_1: + .fill 27*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 109*((XLEN/8)/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 diff --git a/riscv-test-suite/tmp/cbo.clean-01.S b/riscv-test-suite/tmp/cbo.clean-01.S new file mode 100644 index 000000000..0be026537 --- /dev/null +++ b/riscv-test-suite/tmp/cbo.clean-01.S @@ -0,0 +1,752 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:03:10 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbom.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the cbo.clean instruction of the RISC-V RV64Zicbom_Zicsr extension for the cbo.clean covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbom_Zicsr") + +.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(.*I.*Zicbom.*Zicsr.*);def TEST_CASE_1=True;",cbo.clean) + +RVTEST_SIGBASE(x12,signature_x12_1) + +inst_0: +// rs1==x2, rs1_val == (2**(xlen)-1), +// opcode: cbo.clean ; op1:x2; op1val:0xffffffffffffffff +TEST_CBO(x12,x2,cbo.clean,0xffffffffffffffff) + +inst_1: +// rs1==x24, rs1_val == 0, +// opcode: cbo.clean ; op1:x24; op1val:0x0 +TEST_CBO(x12,x24,cbo.clean,0x0) + +inst_2: +// rs1==x11, rs1_val == 6148914691236517205, +// opcode: cbo.clean ; op1:x11; op1val:0x5555555555555555 +TEST_CBO(x12,x11,cbo.clean,0x5555555555555555) + +inst_3: +// rs1==x28, rs1_val == 12297829382473034410, +// opcode: cbo.clean ; op1:x28; op1val:0xaaaaaaaaaaaaaaaa +TEST_CBO(x12,x28,cbo.clean,0xaaaaaaaaaaaaaaaa) + +inst_4: +// rs1==x1, rs1_val == 18446744073709551614, +// opcode: cbo.clean ; op1:x1; op1val:0xfffffffffffffffe +TEST_CBO(x12,x1,cbo.clean,0xfffffffffffffffe) + +inst_5: +// rs1==x4, rs1_val == 18446744073709551613, +// opcode: cbo.clean ; op1:x4; op1val:0xfffffffffffffffd +TEST_CBO(x12,x4,cbo.clean,0xfffffffffffffffd) + +inst_6: +// rs1==x23, rs1_val == 18446744073709551611, +// opcode: cbo.clean ; op1:x23; op1val:0xfffffffffffffffb +TEST_CBO(x12,x23,cbo.clean,0xfffffffffffffffb) + +inst_7: +// rs1==x27, rs1_val == 18446744073709551607, +// opcode: cbo.clean ; op1:x27; op1val:0xfffffffffffffff7 +TEST_CBO(x12,x27,cbo.clean,0xfffffffffffffff7) + +inst_8: +// rs1==x10, rs1_val == 18446744073709551599, +// opcode: cbo.clean ; op1:x10; op1val:0xffffffffffffffef +TEST_CBO(x12,x10,cbo.clean,0xffffffffffffffef) + +inst_9: +// rs1==x7, rs1_val == 18446744073709551583, +// opcode: cbo.clean ; op1:x7; op1val:0xffffffffffffffdf +TEST_CBO(x12,x7,cbo.clean,0xffffffffffffffdf) + +inst_10: +// rs1==x18, rs1_val == 18446744073709551551, +// opcode: cbo.clean ; op1:x18; op1val:0xffffffffffffffbf +TEST_CBO(x12,x18,cbo.clean,0xffffffffffffffbf) + +inst_11: +// rs1==x14, rs1_val == 18446744073709551487, +// opcode: cbo.clean ; op1:x14; op1val:0xffffffffffffff7f +TEST_CBO(x12,x14,cbo.clean,0xffffffffffffff7f) + +inst_12: +// rs1==x21, rs1_val == 18446744073709551359, +// opcode: cbo.clean ; op1:x21; op1val:0xfffffffffffffeff +TEST_CBO(x12,x21,cbo.clean,0xfffffffffffffeff) + +inst_13: +// rs1==x6, rs1_val == 18446744073709551103, +// opcode: cbo.clean ; op1:x6; op1val:0xfffffffffffffdff +TEST_CBO(x12,x6,cbo.clean,0xfffffffffffffdff) + +inst_14: +// rs1==x9, rs1_val == 18446744073709550591, +// opcode: cbo.clean ; op1:x9; op1val:0xfffffffffffffbff +TEST_CBO(x12,x9,cbo.clean,0xfffffffffffffbff) + +inst_15: +// rs1==x19, rs1_val == 18446744073709549567, +// opcode: cbo.clean ; op1:x19; op1val:0xfffffffffffff7ff +TEST_CBO(x12,x19,cbo.clean,0xfffffffffffff7ff) + +inst_16: +// rs1==x30, rs1_val == 18446744073709547519, +// opcode: cbo.clean ; op1:x30; op1val:0xffffffffffffefff +TEST_CBO(x12,x30,cbo.clean,0xffffffffffffefff) + +inst_17: +// rs1==x20, rs1_val == 18446744073709543423, +// opcode: cbo.clean ; op1:x20; op1val:0xffffffffffffdfff +TEST_CBO(x12,x20,cbo.clean,0xffffffffffffdfff) + +inst_18: +// rs1==x8, rs1_val == 18446744073709535231, +// opcode: cbo.clean ; op1:x8; op1val:0xffffffffffffbfff +TEST_CBO(x12,x8,cbo.clean,0xffffffffffffbfff) + +inst_19: +// rs1==x31, rs1_val == 18446744073709518847, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffffffff7fff +TEST_CBO(x12,x31,cbo.clean,0xffffffffffff7fff) + +inst_20: +// rs1==x26, rs1_val == 18446744073709486079, +// opcode: cbo.clean ; op1:x26; op1val:0xfffffffffffeffff +TEST_CBO(x12,x26,cbo.clean,0xfffffffffffeffff) + +inst_21: +// rs1==x17, rs1_val == 18446744073709420543, +// opcode: cbo.clean ; op1:x17; op1val:0xfffffffffffdffff +TEST_CBO(x12,x17,cbo.clean,0xfffffffffffdffff) + +inst_22: +// rs1==x25, rs1_val == 18446744073709289471, +// opcode: cbo.clean ; op1:x25; op1val:0xfffffffffffbffff +TEST_CBO(x12,x25,cbo.clean,0xfffffffffffbffff) + +inst_23: +// rs1==x3, rs1_val == 18446744073709027327, +// opcode: cbo.clean ; op1:x3; op1val:0xfffffffffff7ffff +TEST_CBO(x12,x3,cbo.clean,0xfffffffffff7ffff) + +inst_24: +// rs1==x22, rs1_val == 18446744073708503039, +// opcode: cbo.clean ; op1:x22; op1val:0xffffffffffefffff +TEST_CBO(x12,x22,cbo.clean,0xffffffffffefffff) + +inst_25: +// rs1==x29, rs1_val == 18446744073707454463, +// opcode: cbo.clean ; op1:x29; op1val:0xffffffffffdfffff +TEST_CBO(x12,x29,cbo.clean,0xffffffffffdfffff) + +inst_26: +// rs1==x5, rs1_val == 18446744073705357311, +// opcode: cbo.clean ; op1:x5; op1val:0xffffffffffbfffff +TEST_CBO(x12,x5,cbo.clean,0xffffffffffbfffff) + +inst_27: +// rs1==x15, rs1_val == 18446744073701163007, +// opcode: cbo.clean ; op1:x15; op1val:0xffffffffff7fffff +TEST_CBO(x12,x15,cbo.clean,0xffffffffff7fffff) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_28: +// rs1==x12, rs1_val == 18446744073692774399, +// opcode: cbo.clean ; op1:x12; op1val:0xfffffffffeffffff +TEST_CBO(x1,x12,cbo.clean,0xfffffffffeffffff) + +inst_29: +// rs1==x13, rs1_val == 18446744073675997183, +// opcode: cbo.clean ; op1:x13; op1val:0xfffffffffdffffff +TEST_CBO(x1,x13,cbo.clean,0xfffffffffdffffff) + +inst_30: +// rs1==x16, rs1_val == 18446744073642442751, +// opcode: cbo.clean ; op1:x16; op1val:0xfffffffffbffffff +TEST_CBO(x1,x16,cbo.clean,0xfffffffffbffffff) + +inst_31: +// rs1_val == 18446744073575333887, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffffff7ffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffffff7ffffff) + +inst_32: +// rs1_val == 18446744073441116159, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffffefffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffffefffffff) + +inst_33: +// rs1_val == 18446744073172680703, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffffdfffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffffdfffffff) + +inst_34: +// rs1_val == 18446744072635809791, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffffbfffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffffbfffffff) + +inst_35: +// rs1_val == 18446744071562067967, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffff7fffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffff7fffffff) + +inst_36: +// rs1_val == 18446744069414584319, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffffeffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffffeffffffff) + +inst_37: +// rs1_val == 18446744065119617023, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffffdffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffffdffffffff) + +inst_38: +// rs1_val == 18446744056529682431, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffffbffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffffbffffffff) + +inst_39: +// rs1_val == 18446744039349813247, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffff7ffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffff7ffffffff) + +inst_40: +// rs1_val == 18446744004990074879, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffefffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffefffffffff) + +inst_41: +// rs1_val == 18446743936270598143, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffdfffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffdfffffffff) + +inst_42: +// rs1_val == 18446743798831644671, +// opcode: cbo.clean ; op1:x31; op1val:0xffffffbfffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffffbfffffffff) + +inst_43: +// rs1_val == 18446743523953737727, +// opcode: cbo.clean ; op1:x31; op1val:0xffffff7fffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffff7fffffffff) + +inst_44: +// rs1_val == 18446742974197923839, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffeffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffeffffffffff) + +inst_45: +// rs1_val == 18446741874686296063, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffdffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffdffffffffff) + +inst_46: +// rs1_val == 18446739675663040511, +// opcode: cbo.clean ; op1:x31; op1val:0xfffffbffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffffbffffffffff) + +inst_47: +// rs1_val == 18446735277616529407, +// opcode: cbo.clean ; op1:x31; op1val:0xfffff7ffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffff7ffffffffff) + +inst_48: +// rs1_val == 18446726481523507199, +// opcode: cbo.clean ; op1:x31; op1val:0xffffefffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffefffffffffff) + +inst_49: +// rs1_val == 18446708889337462783, +// opcode: cbo.clean ; op1:x31; op1val:0xffffdfffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffdfffffffffff) + +inst_50: +// rs1_val == 18446673704965373951, +// opcode: cbo.clean ; op1:x31; op1val:0xffffbfffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffffbfffffffffff) + +inst_51: +// rs1_val == 18446603336221196287, +// opcode: cbo.clean ; op1:x31; op1val:0xffff7fffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffff7fffffffffff) + +inst_52: +// rs1_val == 18446462598732840959, +// opcode: cbo.clean ; op1:x31; op1val:0xfffeffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffeffffffffffff) + +inst_53: +// rs1_val == 18446181123756130303, +// opcode: cbo.clean ; op1:x31; op1val:0xfffdffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffdffffffffffff) + +inst_54: +// rs1_val == 18445618173802708991, +// opcode: cbo.clean ; op1:x31; op1val:0xfffbffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfffbffffffffffff) + +inst_55: +// rs1_val == 18444492273895866367, +// opcode: cbo.clean ; op1:x31; op1val:0xfff7ffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfff7ffffffffffff) + +inst_56: +// rs1_val == 18442240474082181119, +// opcode: cbo.clean ; op1:x31; op1val:0xffefffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffefffffffffffff) + +inst_57: +// rs1_val == 18437736874454810623, +// opcode: cbo.clean ; op1:x31; op1val:0xffdfffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffdfffffffffffff) + +inst_58: +// rs1_val == 18428729675200069631, +// opcode: cbo.clean ; op1:x31; op1val:0xffbfffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xffbfffffffffffff) + +inst_59: +// rs1_val == 18410715276690587647, +// opcode: cbo.clean ; op1:x31; op1val:0xff7fffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xff7fffffffffffff) + +inst_60: +// rs1_val == 18374686479671623679, +// opcode: cbo.clean ; op1:x31; op1val:0xfeffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfeffffffffffffff) + +inst_61: +// rs1_val == 18302628885633695743, +// opcode: cbo.clean ; op1:x31; op1val:0xfdffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfdffffffffffffff) + +inst_62: +// rs1_val == 18158513697557839871, +// opcode: cbo.clean ; op1:x31; op1val:0xfbffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xfbffffffffffffff) + +inst_63: +// rs1_val == 17870283321406128127, +// opcode: cbo.clean ; op1:x31; op1val:0xf7ffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xf7ffffffffffffff) + +inst_64: +// rs1_val == 17293822569102704639, +// opcode: cbo.clean ; op1:x31; op1val:0xefffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xefffffffffffffff) + +inst_65: +// rs1_val == 16140901064495857663, +// opcode: cbo.clean ; op1:x31; op1val:0xdfffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xdfffffffffffffff) + +inst_66: +// rs1_val == 13835058055282163711, +// opcode: cbo.clean ; op1:x31; op1val:0xbfffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0xbfffffffffffffff) + +inst_67: +// rs1_val == 9223372036854775807, +// opcode: cbo.clean ; op1:x31; op1val:0x7fffffffffffffff +TEST_CBO(x1,x31,cbo.clean,0x7fffffffffffffff) + +inst_68: +// rs1_val == 1, +// opcode: cbo.clean ; op1:x31; op1val:0x1 +TEST_CBO(x1,x31,cbo.clean,0x1) + +inst_69: +// rs1_val == 1152921504606846976, +// opcode: cbo.clean ; op1:x31; op1val:0x1000000000000000 +TEST_CBO(x1,x31,cbo.clean,0x1000000000000000) + +inst_70: +// rs1_val == 2305843009213693952, +// opcode: cbo.clean ; op1:x31; op1val:0x2000000000000000 +TEST_CBO(x1,x31,cbo.clean,0x2000000000000000) + +inst_71: +// rs1_val == 4611686018427387904, +// opcode: cbo.clean ; op1:x31; op1val:0x4000000000000000 +TEST_CBO(x1,x31,cbo.clean,0x4000000000000000) + +inst_72: +// rs1_val == 9223372036854775808, +// opcode: cbo.clean ; op1:x31; op1val:0x8000000000000000 +TEST_CBO(x1,x31,cbo.clean,0x8000000000000000) + +inst_73: +// rs1_val == 2, +// opcode: cbo.clean ; op1:x31; op1val:0x2 +TEST_CBO(x1,x31,cbo.clean,0x2) + +inst_74: +// rs1_val == 4, +// opcode: cbo.clean ; op1:x31; op1val:0x4 +TEST_CBO(x1,x31,cbo.clean,0x4) + +inst_75: +// rs1_val == 8, +// opcode: cbo.clean ; op1:x31; op1val:0x8 +TEST_CBO(x1,x31,cbo.clean,0x8) + +inst_76: +// rs1_val == 16, +// opcode: cbo.clean ; op1:x31; op1val:0x10 +TEST_CBO(x1,x31,cbo.clean,0x10) + +inst_77: +// rs1_val == 32, +// opcode: cbo.clean ; op1:x31; op1val:0x20 +TEST_CBO(x1,x31,cbo.clean,0x20) + +inst_78: +// rs1_val == 64, +// opcode: cbo.clean ; op1:x31; op1val:0x40 +TEST_CBO(x1,x31,cbo.clean,0x40) + +inst_79: +// rs1_val == 128, +// opcode: cbo.clean ; op1:x31; op1val:0x80 +TEST_CBO(x1,x31,cbo.clean,0x80) + +inst_80: +// rs1_val == 256, +// opcode: cbo.clean ; op1:x31; op1val:0x100 +TEST_CBO(x1,x31,cbo.clean,0x100) + +inst_81: +// rs1_val == 512, +// opcode: cbo.clean ; op1:x31; op1val:0x200 +TEST_CBO(x1,x31,cbo.clean,0x200) + +inst_82: +// rs1_val == 1024, +// opcode: cbo.clean ; op1:x31; op1val:0x400 +TEST_CBO(x1,x31,cbo.clean,0x400) + +inst_83: +// rs1_val == 2048, +// opcode: cbo.clean ; op1:x31; op1val:0x800 +TEST_CBO(x1,x31,cbo.clean,0x800) + +inst_84: +// rs1_val == 4096, +// opcode: cbo.clean ; op1:x31; op1val:0x1000 +TEST_CBO(x1,x31,cbo.clean,0x1000) + +inst_85: +// rs1_val == 8192, +// opcode: cbo.clean ; op1:x31; op1val:0x2000 +TEST_CBO(x1,x31,cbo.clean,0x2000) + +inst_86: +// rs1_val == 16384, +// opcode: cbo.clean ; op1:x31; op1val:0x4000 +TEST_CBO(x1,x31,cbo.clean,0x4000) + +inst_87: +// rs1_val == 32768, +// opcode: cbo.clean ; op1:x31; op1val:0x8000 +TEST_CBO(x1,x31,cbo.clean,0x8000) + +inst_88: +// rs1_val == 65536, +// opcode: cbo.clean ; op1:x31; op1val:0x10000 +TEST_CBO(x1,x31,cbo.clean,0x10000) + +inst_89: +// rs1_val == 131072, +// opcode: cbo.clean ; op1:x31; op1val:0x20000 +TEST_CBO(x1,x31,cbo.clean,0x20000) + +inst_90: +// rs1_val == 262144, +// opcode: cbo.clean ; op1:x31; op1val:0x40000 +TEST_CBO(x1,x31,cbo.clean,0x40000) + +inst_91: +// rs1_val == 524288, +// opcode: cbo.clean ; op1:x31; op1val:0x80000 +TEST_CBO(x1,x31,cbo.clean,0x80000) + +inst_92: +// rs1_val == 1048576, +// opcode: cbo.clean ; op1:x31; op1val:0x100000 +TEST_CBO(x1,x31,cbo.clean,0x100000) + +inst_93: +// rs1_val == 2097152, +// opcode: cbo.clean ; op1:x31; op1val:0x200000 +TEST_CBO(x1,x31,cbo.clean,0x200000) + +inst_94: +// rs1_val == 4194304, +// opcode: cbo.clean ; op1:x31; op1val:0x400000 +TEST_CBO(x1,x31,cbo.clean,0x400000) + +inst_95: +// rs1_val == 8388608, +// opcode: cbo.clean ; op1:x31; op1val:0x800000 +TEST_CBO(x1,x31,cbo.clean,0x800000) + +inst_96: +// rs1_val == 16777216, +// opcode: cbo.clean ; op1:x31; op1val:0x1000000 +TEST_CBO(x1,x31,cbo.clean,0x1000000) + +inst_97: +// rs1_val == 33554432, +// opcode: cbo.clean ; op1:x31; op1val:0x2000000 +TEST_CBO(x1,x31,cbo.clean,0x2000000) + +inst_98: +// rs1_val == 67108864, +// opcode: cbo.clean ; op1:x31; op1val:0x4000000 +TEST_CBO(x1,x31,cbo.clean,0x4000000) + +inst_99: +// rs1_val == 134217728, +// opcode: cbo.clean ; op1:x31; op1val:0x8000000 +TEST_CBO(x1,x31,cbo.clean,0x8000000) + +inst_100: +// rs1_val == 268435456, +// opcode: cbo.clean ; op1:x31; op1val:0x10000000 +TEST_CBO(x1,x31,cbo.clean,0x10000000) + +inst_101: +// rs1_val == 536870912, +// opcode: cbo.clean ; op1:x31; op1val:0x20000000 +TEST_CBO(x1,x31,cbo.clean,0x20000000) + +inst_102: +// rs1_val == 1073741824, +// opcode: cbo.clean ; op1:x31; op1val:0x40000000 +TEST_CBO(x1,x31,cbo.clean,0x40000000) + +inst_103: +// rs1_val == 2147483648, +// opcode: cbo.clean ; op1:x31; op1val:0x80000000 +TEST_CBO(x1,x31,cbo.clean,0x80000000) + +inst_104: +// rs1_val == 4294967296, +// opcode: cbo.clean ; op1:x31; op1val:0x100000000 +TEST_CBO(x1,x31,cbo.clean,0x100000000) + +inst_105: +// rs1_val == 8589934592, +// opcode: cbo.clean ; op1:x31; op1val:0x200000000 +TEST_CBO(x1,x31,cbo.clean,0x200000000) + +inst_106: +// rs1_val == 17179869184, +// opcode: cbo.clean ; op1:x31; op1val:0x400000000 +TEST_CBO(x1,x31,cbo.clean,0x400000000) + +inst_107: +// rs1_val == 34359738368, +// opcode: cbo.clean ; op1:x31; op1val:0x800000000 +TEST_CBO(x1,x31,cbo.clean,0x800000000) + +inst_108: +// rs1_val == 68719476736, +// opcode: cbo.clean ; op1:x31; op1val:0x1000000000 +TEST_CBO(x1,x31,cbo.clean,0x1000000000) + +inst_109: +// rs1_val == 137438953472, +// opcode: cbo.clean ; op1:x31; op1val:0x2000000000 +TEST_CBO(x1,x31,cbo.clean,0x2000000000) + +inst_110: +// rs1_val == 274877906944, +// opcode: cbo.clean ; op1:x31; op1val:0x4000000000 +TEST_CBO(x1,x31,cbo.clean,0x4000000000) + +inst_111: +// rs1_val == 549755813888, +// opcode: cbo.clean ; op1:x31; op1val:0x8000000000 +TEST_CBO(x1,x31,cbo.clean,0x8000000000) + +inst_112: +// rs1_val == 1099511627776, +// opcode: cbo.clean ; op1:x31; op1val:0x10000000000 +TEST_CBO(x1,x31,cbo.clean,0x10000000000) + +inst_113: +// rs1_val == 2199023255552, +// opcode: cbo.clean ; op1:x31; op1val:0x20000000000 +TEST_CBO(x1,x31,cbo.clean,0x20000000000) + +inst_114: +// rs1_val == 4398046511104, +// opcode: cbo.clean ; op1:x31; op1val:0x40000000000 +TEST_CBO(x1,x31,cbo.clean,0x40000000000) + +inst_115: +// rs1_val == 8796093022208, +// opcode: cbo.clean ; op1:x31; op1val:0x80000000000 +TEST_CBO(x1,x31,cbo.clean,0x80000000000) + +inst_116: +// rs1_val == 17592186044416, +// opcode: cbo.clean ; op1:x31; op1val:0x100000000000 +TEST_CBO(x1,x31,cbo.clean,0x100000000000) + +inst_117: +// rs1_val == 35184372088832, +// opcode: cbo.clean ; op1:x31; op1val:0x200000000000 +TEST_CBO(x1,x31,cbo.clean,0x200000000000) + +inst_118: +// rs1_val == 70368744177664, +// opcode: cbo.clean ; op1:x31; op1val:0x400000000000 +TEST_CBO(x1,x31,cbo.clean,0x400000000000) + +inst_119: +// rs1_val == 140737488355328, +// opcode: cbo.clean ; op1:x31; op1val:0x800000000000 +TEST_CBO(x1,x31,cbo.clean,0x800000000000) + +inst_120: +// rs1_val == 281474976710656, +// opcode: cbo.clean ; op1:x31; op1val:0x1000000000000 +TEST_CBO(x1,x31,cbo.clean,0x1000000000000) + +inst_121: +// rs1_val == 562949953421312, +// opcode: cbo.clean ; op1:x31; op1val:0x2000000000000 +TEST_CBO(x1,x31,cbo.clean,0x2000000000000) + +inst_122: +// rs1_val == 1125899906842624, +// opcode: cbo.clean ; op1:x31; op1val:0x4000000000000 +TEST_CBO(x1,x31,cbo.clean,0x4000000000000) + +inst_123: +// rs1_val == 2251799813685248, +// opcode: cbo.clean ; op1:x31; op1val:0x8000000000000 +TEST_CBO(x1,x31,cbo.clean,0x8000000000000) + +inst_124: +// rs1_val == 4503599627370496, +// opcode: cbo.clean ; op1:x31; op1val:0x10000000000000 +TEST_CBO(x1,x31,cbo.clean,0x10000000000000) + +inst_125: +// rs1_val == 9007199254740992, +// opcode: cbo.clean ; op1:x31; op1val:0x20000000000000 +TEST_CBO(x1,x31,cbo.clean,0x20000000000000) + +inst_126: +// rs1_val == 18014398509481984, +// opcode: cbo.clean ; op1:x31; op1val:0x40000000000000 +TEST_CBO(x1,x31,cbo.clean,0x40000000000000) + +inst_127: +// rs1_val == 36028797018963968, +// opcode: cbo.clean ; op1:x31; op1val:0x80000000000000 +TEST_CBO(x1,x31,cbo.clean,0x80000000000000) + +inst_128: +// rs1_val == 72057594037927936, +// opcode: cbo.clean ; op1:x31; op1val:0x100000000000000 +TEST_CBO(x1,x31,cbo.clean,0x100000000000000) + +inst_129: +// rs1_val == 144115188075855872, +// opcode: cbo.clean ; op1:x31; op1val:0x200000000000000 +TEST_CBO(x1,x31,cbo.clean,0x200000000000000) + +inst_130: +// rs1_val == 288230376151711744, +// opcode: cbo.clean ; op1:x31; op1val:0x400000000000000 +TEST_CBO(x1,x31,cbo.clean,0x400000000000000) + +inst_131: +// rs1_val == 576460752303423488, +// opcode: cbo.clean ; op1:x31; op1val:0x800000000000000 +TEST_CBO(x1,x31,cbo.clean,0x800000000000000) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x12_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x12_1: + .fill 28*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 104*((XLEN/8)/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 diff --git a/riscv-test-suite/tmp/cbo.flush-01.S b/riscv-test-suite/tmp/cbo.flush-01.S new file mode 100644 index 000000000..a56babe85 --- /dev/null +++ b/riscv-test-suite/tmp/cbo.flush-01.S @@ -0,0 +1,752 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:03:10 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbom.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the cbo.flush instruction of the RISC-V RV64Zicbom_Zicsr extension for the cbo.flush covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbom_Zicsr") + +.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(.*I.*Zicbom.*Zicsr.*);def TEST_CASE_1=True;",cbo.flush) + +RVTEST_SIGBASE(x15,signature_x15_1) + +inst_0: +// rs1==x5, rs1_val == (2**(xlen)-1), +// opcode: cbo.flush ; op1:x5; op1val:0xffffffffffffffff +TEST_CBO(x15,x5,cbo.flush,0xffffffffffffffff) + +inst_1: +// rs1==x10, rs1_val == 0, +// opcode: cbo.flush ; op1:x10; op1val:0x0 +TEST_CBO(x15,x10,cbo.flush,0x0) + +inst_2: +// rs1==x21, rs1_val == 6148914691236517205, +// opcode: cbo.flush ; op1:x21; op1val:0x5555555555555555 +TEST_CBO(x15,x21,cbo.flush,0x5555555555555555) + +inst_3: +// rs1==x7, rs1_val == 12297829382473034410, +// opcode: cbo.flush ; op1:x7; op1val:0xaaaaaaaaaaaaaaaa +TEST_CBO(x15,x7,cbo.flush,0xaaaaaaaaaaaaaaaa) + +inst_4: +// rs1==x12, rs1_val == 18446744073709551614, +// opcode: cbo.flush ; op1:x12; op1val:0xfffffffffffffffe +TEST_CBO(x15,x12,cbo.flush,0xfffffffffffffffe) + +inst_5: +// rs1==x30, rs1_val == 18446744073709551613, +// opcode: cbo.flush ; op1:x30; op1val:0xfffffffffffffffd +TEST_CBO(x15,x30,cbo.flush,0xfffffffffffffffd) + +inst_6: +// rs1==x23, rs1_val == 18446744073709551611, +// opcode: cbo.flush ; op1:x23; op1val:0xfffffffffffffffb +TEST_CBO(x15,x23,cbo.flush,0xfffffffffffffffb) + +inst_7: +// rs1==x3, rs1_val == 18446744073709551607, +// opcode: cbo.flush ; op1:x3; op1val:0xfffffffffffffff7 +TEST_CBO(x15,x3,cbo.flush,0xfffffffffffffff7) + +inst_8: +// rs1==x9, rs1_val == 18446744073709551599, +// opcode: cbo.flush ; op1:x9; op1val:0xffffffffffffffef +TEST_CBO(x15,x9,cbo.flush,0xffffffffffffffef) + +inst_9: +// rs1==x25, rs1_val == 18446744073709551583, +// opcode: cbo.flush ; op1:x25; op1val:0xffffffffffffffdf +TEST_CBO(x15,x25,cbo.flush,0xffffffffffffffdf) + +inst_10: +// rs1==x6, rs1_val == 18446744073709551551, +// opcode: cbo.flush ; op1:x6; op1val:0xffffffffffffffbf +TEST_CBO(x15,x6,cbo.flush,0xffffffffffffffbf) + +inst_11: +// rs1==x31, rs1_val == 18446744073709551487, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffffffffff7f +TEST_CBO(x15,x31,cbo.flush,0xffffffffffffff7f) + +inst_12: +// rs1==x18, rs1_val == 18446744073709551359, +// opcode: cbo.flush ; op1:x18; op1val:0xfffffffffffffeff +TEST_CBO(x15,x18,cbo.flush,0xfffffffffffffeff) + +inst_13: +// rs1==x24, rs1_val == 18446744073709551103, +// opcode: cbo.flush ; op1:x24; op1val:0xfffffffffffffdff +TEST_CBO(x15,x24,cbo.flush,0xfffffffffffffdff) + +inst_14: +// rs1==x28, rs1_val == 18446744073709550591, +// opcode: cbo.flush ; op1:x28; op1val:0xfffffffffffffbff +TEST_CBO(x15,x28,cbo.flush,0xfffffffffffffbff) + +inst_15: +// rs1==x26, rs1_val == 18446744073709549567, +// opcode: cbo.flush ; op1:x26; op1val:0xfffffffffffff7ff +TEST_CBO(x15,x26,cbo.flush,0xfffffffffffff7ff) + +inst_16: +// rs1==x17, rs1_val == 18446744073709547519, +// opcode: cbo.flush ; op1:x17; op1val:0xffffffffffffefff +TEST_CBO(x15,x17,cbo.flush,0xffffffffffffefff) + +inst_17: +// rs1==x8, rs1_val == 18446744073709543423, +// opcode: cbo.flush ; op1:x8; op1val:0xffffffffffffdfff +TEST_CBO(x15,x8,cbo.flush,0xffffffffffffdfff) + +inst_18: +// rs1==x16, rs1_val == 18446744073709535231, +// opcode: cbo.flush ; op1:x16; op1val:0xffffffffffffbfff +TEST_CBO(x15,x16,cbo.flush,0xffffffffffffbfff) + +inst_19: +// rs1==x13, rs1_val == 18446744073709518847, +// opcode: cbo.flush ; op1:x13; op1val:0xffffffffffff7fff +TEST_CBO(x15,x13,cbo.flush,0xffffffffffff7fff) + +inst_20: +// rs1==x22, rs1_val == 18446744073709486079, +// opcode: cbo.flush ; op1:x22; op1val:0xfffffffffffeffff +TEST_CBO(x15,x22,cbo.flush,0xfffffffffffeffff) + +inst_21: +// rs1==x1, rs1_val == 18446744073709420543, +// opcode: cbo.flush ; op1:x1; op1val:0xfffffffffffdffff +TEST_CBO(x15,x1,cbo.flush,0xfffffffffffdffff) + +inst_22: +// rs1==x4, rs1_val == 18446744073709289471, +// opcode: cbo.flush ; op1:x4; op1val:0xfffffffffffbffff +TEST_CBO(x15,x4,cbo.flush,0xfffffffffffbffff) + +inst_23: +// rs1==x11, rs1_val == 18446744073709027327, +// opcode: cbo.flush ; op1:x11; op1val:0xfffffffffff7ffff +TEST_CBO(x15,x11,cbo.flush,0xfffffffffff7ffff) + +inst_24: +// rs1==x14, rs1_val == 18446744073708503039, +// opcode: cbo.flush ; op1:x14; op1val:0xffffffffffefffff +TEST_CBO(x15,x14,cbo.flush,0xffffffffffefffff) + +inst_25: +// rs1==x19, rs1_val == 18446744073707454463, +// opcode: cbo.flush ; op1:x19; op1val:0xffffffffffdfffff +TEST_CBO(x15,x19,cbo.flush,0xffffffffffdfffff) + +inst_26: +// rs1==x2, rs1_val == 18446744073705357311, +// opcode: cbo.flush ; op1:x2; op1val:0xffffffffffbfffff +TEST_CBO(x15,x2,cbo.flush,0xffffffffffbfffff) + +inst_27: +// rs1==x27, rs1_val == 18446744073701163007, +// opcode: cbo.flush ; op1:x27; op1val:0xffffffffff7fffff +TEST_CBO(x15,x27,cbo.flush,0xffffffffff7fffff) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_28: +// rs1==x15, rs1_val == 18446744073692774399, +// opcode: cbo.flush ; op1:x15; op1val:0xfffffffffeffffff +TEST_CBO(x1,x15,cbo.flush,0xfffffffffeffffff) + +inst_29: +// rs1==x20, rs1_val == 18446744073675997183, +// opcode: cbo.flush ; op1:x20; op1val:0xfffffffffdffffff +TEST_CBO(x1,x20,cbo.flush,0xfffffffffdffffff) + +inst_30: +// rs1==x29, rs1_val == 18446744073642442751, +// opcode: cbo.flush ; op1:x29; op1val:0xfffffffffbffffff +TEST_CBO(x1,x29,cbo.flush,0xfffffffffbffffff) + +inst_31: +// rs1_val == 18446744073575333887, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffffff7ffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffffff7ffffff) + +inst_32: +// rs1_val == 18446744073441116159, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffffefffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffffefffffff) + +inst_33: +// rs1_val == 18446744073172680703, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffffdfffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffffdfffffff) + +inst_34: +// rs1_val == 18446744072635809791, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffffbfffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffffbfffffff) + +inst_35: +// rs1_val == 18446744071562067967, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffff7fffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffff7fffffff) + +inst_36: +// rs1_val == 18446744069414584319, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffffeffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffffeffffffff) + +inst_37: +// rs1_val == 18446744065119617023, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffffdffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffffdffffffff) + +inst_38: +// rs1_val == 18446744056529682431, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffffbffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffffbffffffff) + +inst_39: +// rs1_val == 18446744039349813247, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffff7ffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffff7ffffffff) + +inst_40: +// rs1_val == 18446744004990074879, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffefffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffefffffffff) + +inst_41: +// rs1_val == 18446743936270598143, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffdfffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffdfffffffff) + +inst_42: +// rs1_val == 18446743798831644671, +// opcode: cbo.flush ; op1:x31; op1val:0xffffffbfffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffffbfffffffff) + +inst_43: +// rs1_val == 18446743523953737727, +// opcode: cbo.flush ; op1:x31; op1val:0xffffff7fffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffff7fffffffff) + +inst_44: +// rs1_val == 18446742974197923839, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffeffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffeffffffffff) + +inst_45: +// rs1_val == 18446741874686296063, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffdffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffdffffffffff) + +inst_46: +// rs1_val == 18446739675663040511, +// opcode: cbo.flush ; op1:x31; op1val:0xfffffbffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffffbffffffffff) + +inst_47: +// rs1_val == 18446735277616529407, +// opcode: cbo.flush ; op1:x31; op1val:0xfffff7ffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffff7ffffffffff) + +inst_48: +// rs1_val == 18446726481523507199, +// opcode: cbo.flush ; op1:x31; op1val:0xffffefffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffefffffffffff) + +inst_49: +// rs1_val == 18446708889337462783, +// opcode: cbo.flush ; op1:x31; op1val:0xffffdfffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffdfffffffffff) + +inst_50: +// rs1_val == 18446673704965373951, +// opcode: cbo.flush ; op1:x31; op1val:0xffffbfffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffffbfffffffffff) + +inst_51: +// rs1_val == 18446603336221196287, +// opcode: cbo.flush ; op1:x31; op1val:0xffff7fffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffff7fffffffffff) + +inst_52: +// rs1_val == 18446462598732840959, +// opcode: cbo.flush ; op1:x31; op1val:0xfffeffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffeffffffffffff) + +inst_53: +// rs1_val == 18446181123756130303, +// opcode: cbo.flush ; op1:x31; op1val:0xfffdffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffdffffffffffff) + +inst_54: +// rs1_val == 18445618173802708991, +// opcode: cbo.flush ; op1:x31; op1val:0xfffbffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfffbffffffffffff) + +inst_55: +// rs1_val == 18444492273895866367, +// opcode: cbo.flush ; op1:x31; op1val:0xfff7ffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfff7ffffffffffff) + +inst_56: +// rs1_val == 18442240474082181119, +// opcode: cbo.flush ; op1:x31; op1val:0xffefffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffefffffffffffff) + +inst_57: +// rs1_val == 18437736874454810623, +// opcode: cbo.flush ; op1:x31; op1val:0xffdfffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffdfffffffffffff) + +inst_58: +// rs1_val == 18428729675200069631, +// opcode: cbo.flush ; op1:x31; op1val:0xffbfffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xffbfffffffffffff) + +inst_59: +// rs1_val == 18410715276690587647, +// opcode: cbo.flush ; op1:x31; op1val:0xff7fffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xff7fffffffffffff) + +inst_60: +// rs1_val == 18374686479671623679, +// opcode: cbo.flush ; op1:x31; op1val:0xfeffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfeffffffffffffff) + +inst_61: +// rs1_val == 18302628885633695743, +// opcode: cbo.flush ; op1:x31; op1val:0xfdffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfdffffffffffffff) + +inst_62: +// rs1_val == 18158513697557839871, +// opcode: cbo.flush ; op1:x31; op1val:0xfbffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xfbffffffffffffff) + +inst_63: +// rs1_val == 17870283321406128127, +// opcode: cbo.flush ; op1:x31; op1val:0xf7ffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xf7ffffffffffffff) + +inst_64: +// rs1_val == 17293822569102704639, +// opcode: cbo.flush ; op1:x31; op1val:0xefffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xefffffffffffffff) + +inst_65: +// rs1_val == 16140901064495857663, +// opcode: cbo.flush ; op1:x31; op1val:0xdfffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xdfffffffffffffff) + +inst_66: +// rs1_val == 13835058055282163711, +// opcode: cbo.flush ; op1:x31; op1val:0xbfffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0xbfffffffffffffff) + +inst_67: +// rs1_val == 9223372036854775807, +// opcode: cbo.flush ; op1:x31; op1val:0x7fffffffffffffff +TEST_CBO(x1,x31,cbo.flush,0x7fffffffffffffff) + +inst_68: +// rs1_val == 1, +// opcode: cbo.flush ; op1:x31; op1val:0x1 +TEST_CBO(x1,x31,cbo.flush,0x1) + +inst_69: +// rs1_val == 1152921504606846976, +// opcode: cbo.flush ; op1:x31; op1val:0x1000000000000000 +TEST_CBO(x1,x31,cbo.flush,0x1000000000000000) + +inst_70: +// rs1_val == 2305843009213693952, +// opcode: cbo.flush ; op1:x31; op1val:0x2000000000000000 +TEST_CBO(x1,x31,cbo.flush,0x2000000000000000) + +inst_71: +// rs1_val == 4611686018427387904, +// opcode: cbo.flush ; op1:x31; op1val:0x4000000000000000 +TEST_CBO(x1,x31,cbo.flush,0x4000000000000000) + +inst_72: +// rs1_val == 9223372036854775808, +// opcode: cbo.flush ; op1:x31; op1val:0x8000000000000000 +TEST_CBO(x1,x31,cbo.flush,0x8000000000000000) + +inst_73: +// rs1_val == 2, +// opcode: cbo.flush ; op1:x31; op1val:0x2 +TEST_CBO(x1,x31,cbo.flush,0x2) + +inst_74: +// rs1_val == 4, +// opcode: cbo.flush ; op1:x31; op1val:0x4 +TEST_CBO(x1,x31,cbo.flush,0x4) + +inst_75: +// rs1_val == 8, +// opcode: cbo.flush ; op1:x31; op1val:0x8 +TEST_CBO(x1,x31,cbo.flush,0x8) + +inst_76: +// rs1_val == 16, +// opcode: cbo.flush ; op1:x31; op1val:0x10 +TEST_CBO(x1,x31,cbo.flush,0x10) + +inst_77: +// rs1_val == 32, +// opcode: cbo.flush ; op1:x31; op1val:0x20 +TEST_CBO(x1,x31,cbo.flush,0x20) + +inst_78: +// rs1_val == 64, +// opcode: cbo.flush ; op1:x31; op1val:0x40 +TEST_CBO(x1,x31,cbo.flush,0x40) + +inst_79: +// rs1_val == 128, +// opcode: cbo.flush ; op1:x31; op1val:0x80 +TEST_CBO(x1,x31,cbo.flush,0x80) + +inst_80: +// rs1_val == 256, +// opcode: cbo.flush ; op1:x31; op1val:0x100 +TEST_CBO(x1,x31,cbo.flush,0x100) + +inst_81: +// rs1_val == 512, +// opcode: cbo.flush ; op1:x31; op1val:0x200 +TEST_CBO(x1,x31,cbo.flush,0x200) + +inst_82: +// rs1_val == 1024, +// opcode: cbo.flush ; op1:x31; op1val:0x400 +TEST_CBO(x1,x31,cbo.flush,0x400) + +inst_83: +// rs1_val == 2048, +// opcode: cbo.flush ; op1:x31; op1val:0x800 +TEST_CBO(x1,x31,cbo.flush,0x800) + +inst_84: +// rs1_val == 4096, +// opcode: cbo.flush ; op1:x31; op1val:0x1000 +TEST_CBO(x1,x31,cbo.flush,0x1000) + +inst_85: +// rs1_val == 8192, +// opcode: cbo.flush ; op1:x31; op1val:0x2000 +TEST_CBO(x1,x31,cbo.flush,0x2000) + +inst_86: +// rs1_val == 16384, +// opcode: cbo.flush ; op1:x31; op1val:0x4000 +TEST_CBO(x1,x31,cbo.flush,0x4000) + +inst_87: +// rs1_val == 32768, +// opcode: cbo.flush ; op1:x31; op1val:0x8000 +TEST_CBO(x1,x31,cbo.flush,0x8000) + +inst_88: +// rs1_val == 65536, +// opcode: cbo.flush ; op1:x31; op1val:0x10000 +TEST_CBO(x1,x31,cbo.flush,0x10000) + +inst_89: +// rs1_val == 131072, +// opcode: cbo.flush ; op1:x31; op1val:0x20000 +TEST_CBO(x1,x31,cbo.flush,0x20000) + +inst_90: +// rs1_val == 262144, +// opcode: cbo.flush ; op1:x31; op1val:0x40000 +TEST_CBO(x1,x31,cbo.flush,0x40000) + +inst_91: +// rs1_val == 524288, +// opcode: cbo.flush ; op1:x31; op1val:0x80000 +TEST_CBO(x1,x31,cbo.flush,0x80000) + +inst_92: +// rs1_val == 1048576, +// opcode: cbo.flush ; op1:x31; op1val:0x100000 +TEST_CBO(x1,x31,cbo.flush,0x100000) + +inst_93: +// rs1_val == 2097152, +// opcode: cbo.flush ; op1:x31; op1val:0x200000 +TEST_CBO(x1,x31,cbo.flush,0x200000) + +inst_94: +// rs1_val == 4194304, +// opcode: cbo.flush ; op1:x31; op1val:0x400000 +TEST_CBO(x1,x31,cbo.flush,0x400000) + +inst_95: +// rs1_val == 8388608, +// opcode: cbo.flush ; op1:x31; op1val:0x800000 +TEST_CBO(x1,x31,cbo.flush,0x800000) + +inst_96: +// rs1_val == 16777216, +// opcode: cbo.flush ; op1:x31; op1val:0x1000000 +TEST_CBO(x1,x31,cbo.flush,0x1000000) + +inst_97: +// rs1_val == 33554432, +// opcode: cbo.flush ; op1:x31; op1val:0x2000000 +TEST_CBO(x1,x31,cbo.flush,0x2000000) + +inst_98: +// rs1_val == 67108864, +// opcode: cbo.flush ; op1:x31; op1val:0x4000000 +TEST_CBO(x1,x31,cbo.flush,0x4000000) + +inst_99: +// rs1_val == 134217728, +// opcode: cbo.flush ; op1:x31; op1val:0x8000000 +TEST_CBO(x1,x31,cbo.flush,0x8000000) + +inst_100: +// rs1_val == 268435456, +// opcode: cbo.flush ; op1:x31; op1val:0x10000000 +TEST_CBO(x1,x31,cbo.flush,0x10000000) + +inst_101: +// rs1_val == 536870912, +// opcode: cbo.flush ; op1:x31; op1val:0x20000000 +TEST_CBO(x1,x31,cbo.flush,0x20000000) + +inst_102: +// rs1_val == 1073741824, +// opcode: cbo.flush ; op1:x31; op1val:0x40000000 +TEST_CBO(x1,x31,cbo.flush,0x40000000) + +inst_103: +// rs1_val == 2147483648, +// opcode: cbo.flush ; op1:x31; op1val:0x80000000 +TEST_CBO(x1,x31,cbo.flush,0x80000000) + +inst_104: +// rs1_val == 4294967296, +// opcode: cbo.flush ; op1:x31; op1val:0x100000000 +TEST_CBO(x1,x31,cbo.flush,0x100000000) + +inst_105: +// rs1_val == 8589934592, +// opcode: cbo.flush ; op1:x31; op1val:0x200000000 +TEST_CBO(x1,x31,cbo.flush,0x200000000) + +inst_106: +// rs1_val == 17179869184, +// opcode: cbo.flush ; op1:x31; op1val:0x400000000 +TEST_CBO(x1,x31,cbo.flush,0x400000000) + +inst_107: +// rs1_val == 34359738368, +// opcode: cbo.flush ; op1:x31; op1val:0x800000000 +TEST_CBO(x1,x31,cbo.flush,0x800000000) + +inst_108: +// rs1_val == 68719476736, +// opcode: cbo.flush ; op1:x31; op1val:0x1000000000 +TEST_CBO(x1,x31,cbo.flush,0x1000000000) + +inst_109: +// rs1_val == 137438953472, +// opcode: cbo.flush ; op1:x31; op1val:0x2000000000 +TEST_CBO(x1,x31,cbo.flush,0x2000000000) + +inst_110: +// rs1_val == 274877906944, +// opcode: cbo.flush ; op1:x31; op1val:0x4000000000 +TEST_CBO(x1,x31,cbo.flush,0x4000000000) + +inst_111: +// rs1_val == 549755813888, +// opcode: cbo.flush ; op1:x31; op1val:0x8000000000 +TEST_CBO(x1,x31,cbo.flush,0x8000000000) + +inst_112: +// rs1_val == 1099511627776, +// opcode: cbo.flush ; op1:x31; op1val:0x10000000000 +TEST_CBO(x1,x31,cbo.flush,0x10000000000) + +inst_113: +// rs1_val == 2199023255552, +// opcode: cbo.flush ; op1:x31; op1val:0x20000000000 +TEST_CBO(x1,x31,cbo.flush,0x20000000000) + +inst_114: +// rs1_val == 4398046511104, +// opcode: cbo.flush ; op1:x31; op1val:0x40000000000 +TEST_CBO(x1,x31,cbo.flush,0x40000000000) + +inst_115: +// rs1_val == 8796093022208, +// opcode: cbo.flush ; op1:x31; op1val:0x80000000000 +TEST_CBO(x1,x31,cbo.flush,0x80000000000) + +inst_116: +// rs1_val == 17592186044416, +// opcode: cbo.flush ; op1:x31; op1val:0x100000000000 +TEST_CBO(x1,x31,cbo.flush,0x100000000000) + +inst_117: +// rs1_val == 35184372088832, +// opcode: cbo.flush ; op1:x31; op1val:0x200000000000 +TEST_CBO(x1,x31,cbo.flush,0x200000000000) + +inst_118: +// rs1_val == 70368744177664, +// opcode: cbo.flush ; op1:x31; op1val:0x400000000000 +TEST_CBO(x1,x31,cbo.flush,0x400000000000) + +inst_119: +// rs1_val == 140737488355328, +// opcode: cbo.flush ; op1:x31; op1val:0x800000000000 +TEST_CBO(x1,x31,cbo.flush,0x800000000000) + +inst_120: +// rs1_val == 281474976710656, +// opcode: cbo.flush ; op1:x31; op1val:0x1000000000000 +TEST_CBO(x1,x31,cbo.flush,0x1000000000000) + +inst_121: +// rs1_val == 562949953421312, +// opcode: cbo.flush ; op1:x31; op1val:0x2000000000000 +TEST_CBO(x1,x31,cbo.flush,0x2000000000000) + +inst_122: +// rs1_val == 1125899906842624, +// opcode: cbo.flush ; op1:x31; op1val:0x4000000000000 +TEST_CBO(x1,x31,cbo.flush,0x4000000000000) + +inst_123: +// rs1_val == 2251799813685248, +// opcode: cbo.flush ; op1:x31; op1val:0x8000000000000 +TEST_CBO(x1,x31,cbo.flush,0x8000000000000) + +inst_124: +// rs1_val == 4503599627370496, +// opcode: cbo.flush ; op1:x31; op1val:0x10000000000000 +TEST_CBO(x1,x31,cbo.flush,0x10000000000000) + +inst_125: +// rs1_val == 9007199254740992, +// opcode: cbo.flush ; op1:x31; op1val:0x20000000000000 +TEST_CBO(x1,x31,cbo.flush,0x20000000000000) + +inst_126: +// rs1_val == 18014398509481984, +// opcode: cbo.flush ; op1:x31; op1val:0x40000000000000 +TEST_CBO(x1,x31,cbo.flush,0x40000000000000) + +inst_127: +// rs1_val == 36028797018963968, +// opcode: cbo.flush ; op1:x31; op1val:0x80000000000000 +TEST_CBO(x1,x31,cbo.flush,0x80000000000000) + +inst_128: +// rs1_val == 72057594037927936, +// opcode: cbo.flush ; op1:x31; op1val:0x100000000000000 +TEST_CBO(x1,x31,cbo.flush,0x100000000000000) + +inst_129: +// rs1_val == 144115188075855872, +// opcode: cbo.flush ; op1:x31; op1val:0x200000000000000 +TEST_CBO(x1,x31,cbo.flush,0x200000000000000) + +inst_130: +// rs1_val == 288230376151711744, +// opcode: cbo.flush ; op1:x31; op1val:0x400000000000000 +TEST_CBO(x1,x31,cbo.flush,0x400000000000000) + +inst_131: +// rs1_val == 576460752303423488, +// opcode: cbo.flush ; op1:x31; op1val:0x800000000000000 +TEST_CBO(x1,x31,cbo.flush,0x800000000000000) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x15_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x15_1: + .fill 28*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 104*((XLEN/8)/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 diff --git a/riscv-test-suite/tmp/cbo.inval-01.S b/riscv-test-suite/tmp/cbo.inval-01.S new file mode 100644 index 000000000..dde892da4 --- /dev/null +++ b/riscv-test-suite/tmp/cbo.inval-01.S @@ -0,0 +1,752 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:03:10 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbom.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the cbo.inval instruction of the RISC-V RV64Zicbom_Zicsr extension for the cbo.inval covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbom_Zicsr") + +.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(.*I.*Zicbom.*Zicsr.*);def TEST_CASE_1=True;",cbo.inval) + +RVTEST_SIGBASE(x15,signature_x15_1) + +inst_0: +// rs1==x12, rs1_val == (2**(xlen)-1), +// opcode: cbo.inval ; op1:x12; op1val:0xffffffffffffffff +TEST_CBO(x15,x12,cbo.inval,0xffffffffffffffff) + +inst_1: +// rs1==x14, rs1_val == 0, +// opcode: cbo.inval ; op1:x14; op1val:0x0 +TEST_CBO(x15,x14,cbo.inval,0x0) + +inst_2: +// rs1==x7, rs1_val == 6148914691236517205, +// opcode: cbo.inval ; op1:x7; op1val:0x5555555555555555 +TEST_CBO(x15,x7,cbo.inval,0x5555555555555555) + +inst_3: +// rs1==x2, rs1_val == 12297829382473034410, +// opcode: cbo.inval ; op1:x2; op1val:0xaaaaaaaaaaaaaaaa +TEST_CBO(x15,x2,cbo.inval,0xaaaaaaaaaaaaaaaa) + +inst_4: +// rs1==x16, rs1_val == 18446744073709551614, +// opcode: cbo.inval ; op1:x16; op1val:0xfffffffffffffffe +TEST_CBO(x15,x16,cbo.inval,0xfffffffffffffffe) + +inst_5: +// rs1==x9, rs1_val == 18446744073709551613, +// opcode: cbo.inval ; op1:x9; op1val:0xfffffffffffffffd +TEST_CBO(x15,x9,cbo.inval,0xfffffffffffffffd) + +inst_6: +// rs1==x1, rs1_val == 18446744073709551611, +// opcode: cbo.inval ; op1:x1; op1val:0xfffffffffffffffb +TEST_CBO(x15,x1,cbo.inval,0xfffffffffffffffb) + +inst_7: +// rs1==x13, rs1_val == 18446744073709551607, +// opcode: cbo.inval ; op1:x13; op1val:0xfffffffffffffff7 +TEST_CBO(x15,x13,cbo.inval,0xfffffffffffffff7) + +inst_8: +// rs1==x29, rs1_val == 18446744073709551599, +// opcode: cbo.inval ; op1:x29; op1val:0xffffffffffffffef +TEST_CBO(x15,x29,cbo.inval,0xffffffffffffffef) + +inst_9: +// rs1==x11, rs1_val == 18446744073709551583, +// opcode: cbo.inval ; op1:x11; op1val:0xffffffffffffffdf +TEST_CBO(x15,x11,cbo.inval,0xffffffffffffffdf) + +inst_10: +// rs1==x4, rs1_val == 18446744073709551551, +// opcode: cbo.inval ; op1:x4; op1val:0xffffffffffffffbf +TEST_CBO(x15,x4,cbo.inval,0xffffffffffffffbf) + +inst_11: +// rs1==x3, rs1_val == 18446744073709551487, +// opcode: cbo.inval ; op1:x3; op1val:0xffffffffffffff7f +TEST_CBO(x15,x3,cbo.inval,0xffffffffffffff7f) + +inst_12: +// rs1==x5, rs1_val == 18446744073709551359, +// opcode: cbo.inval ; op1:x5; op1val:0xfffffffffffffeff +TEST_CBO(x15,x5,cbo.inval,0xfffffffffffffeff) + +inst_13: +// rs1==x28, rs1_val == 18446744073709551103, +// opcode: cbo.inval ; op1:x28; op1val:0xfffffffffffffdff +TEST_CBO(x15,x28,cbo.inval,0xfffffffffffffdff) + +inst_14: +// rs1==x17, rs1_val == 18446744073709550591, +// opcode: cbo.inval ; op1:x17; op1val:0xfffffffffffffbff +TEST_CBO(x15,x17,cbo.inval,0xfffffffffffffbff) + +inst_15: +// rs1==x19, rs1_val == 18446744073709549567, +// opcode: cbo.inval ; op1:x19; op1val:0xfffffffffffff7ff +TEST_CBO(x15,x19,cbo.inval,0xfffffffffffff7ff) + +inst_16: +// rs1==x6, rs1_val == 18446744073709547519, +// opcode: cbo.inval ; op1:x6; op1val:0xffffffffffffefff +TEST_CBO(x15,x6,cbo.inval,0xffffffffffffefff) + +inst_17: +// rs1==x25, rs1_val == 18446744073709543423, +// opcode: cbo.inval ; op1:x25; op1val:0xffffffffffffdfff +TEST_CBO(x15,x25,cbo.inval,0xffffffffffffdfff) + +inst_18: +// rs1==x22, rs1_val == 18446744073709535231, +// opcode: cbo.inval ; op1:x22; op1val:0xffffffffffffbfff +TEST_CBO(x15,x22,cbo.inval,0xffffffffffffbfff) + +inst_19: +// rs1==x10, rs1_val == 18446744073709518847, +// opcode: cbo.inval ; op1:x10; op1val:0xffffffffffff7fff +TEST_CBO(x15,x10,cbo.inval,0xffffffffffff7fff) + +inst_20: +// rs1==x30, rs1_val == 18446744073709486079, +// opcode: cbo.inval ; op1:x30; op1val:0xfffffffffffeffff +TEST_CBO(x15,x30,cbo.inval,0xfffffffffffeffff) + +inst_21: +// rs1==x18, rs1_val == 18446744073709420543, +// opcode: cbo.inval ; op1:x18; op1val:0xfffffffffffdffff +TEST_CBO(x15,x18,cbo.inval,0xfffffffffffdffff) + +inst_22: +// rs1==x23, rs1_val == 18446744073709289471, +// opcode: cbo.inval ; op1:x23; op1val:0xfffffffffffbffff +TEST_CBO(x15,x23,cbo.inval,0xfffffffffffbffff) + +inst_23: +// rs1==x24, rs1_val == 18446744073709027327, +// opcode: cbo.inval ; op1:x24; op1val:0xfffffffffff7ffff +TEST_CBO(x15,x24,cbo.inval,0xfffffffffff7ffff) + +inst_24: +// rs1==x8, rs1_val == 18446744073708503039, +// opcode: cbo.inval ; op1:x8; op1val:0xffffffffffefffff +TEST_CBO(x15,x8,cbo.inval,0xffffffffffefffff) + +inst_25: +// rs1==x27, rs1_val == 18446744073707454463, +// opcode: cbo.inval ; op1:x27; op1val:0xffffffffffdfffff +TEST_CBO(x15,x27,cbo.inval,0xffffffffffdfffff) + +inst_26: +// rs1==x20, rs1_val == 18446744073705357311, +// opcode: cbo.inval ; op1:x20; op1val:0xffffffffffbfffff +TEST_CBO(x15,x20,cbo.inval,0xffffffffffbfffff) + +inst_27: +// rs1==x26, rs1_val == 18446744073701163007, +// opcode: cbo.inval ; op1:x26; op1val:0xffffffffff7fffff +TEST_CBO(x15,x26,cbo.inval,0xffffffffff7fffff) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_28: +// rs1==x15, rs1_val == 18446744073692774399, +// opcode: cbo.inval ; op1:x15; op1val:0xfffffffffeffffff +TEST_CBO(x1,x15,cbo.inval,0xfffffffffeffffff) + +inst_29: +// rs1==x31, rs1_val == 18446744073675997183, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffffdffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffffdffffff) + +inst_30: +// rs1==x21, rs1_val == 18446744073642442751, +// opcode: cbo.inval ; op1:x21; op1val:0xfffffffffbffffff +TEST_CBO(x1,x21,cbo.inval,0xfffffffffbffffff) + +inst_31: +// rs1_val == 18446744073575333887, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffff7ffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffff7ffffff) + +inst_32: +// rs1_val == 18446744073441116159, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffffefffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffffefffffff) + +inst_33: +// rs1_val == 18446744073172680703, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffffdfffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffffdfffffff) + +inst_34: +// rs1_val == 18446744072635809791, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffffbfffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffffbfffffff) + +inst_35: +// rs1_val == 18446744071562067967, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffff7fffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffff7fffffff) + +inst_36: +// rs1_val == 18446744069414584319, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffeffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffeffffffff) + +inst_37: +// rs1_val == 18446744065119617023, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffdffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffdffffffff) + +inst_38: +// rs1_val == 18446744056529682431, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffffbffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffffbffffffff) + +inst_39: +// rs1_val == 18446744039349813247, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffff7ffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffff7ffffffff) + +inst_40: +// rs1_val == 18446744004990074879, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffefffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffefffffffff) + +inst_41: +// rs1_val == 18446743936270598143, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffdfffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffdfffffffff) + +inst_42: +// rs1_val == 18446743798831644671, +// opcode: cbo.inval ; op1:x31; op1val:0xffffffbfffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffffbfffffffff) + +inst_43: +// rs1_val == 18446743523953737727, +// opcode: cbo.inval ; op1:x31; op1val:0xffffff7fffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffff7fffffffff) + +inst_44: +// rs1_val == 18446742974197923839, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffeffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffeffffffffff) + +inst_45: +// rs1_val == 18446741874686296063, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffdffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffdffffffffff) + +inst_46: +// rs1_val == 18446739675663040511, +// opcode: cbo.inval ; op1:x31; op1val:0xfffffbffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffffbffffffffff) + +inst_47: +// rs1_val == 18446735277616529407, +// opcode: cbo.inval ; op1:x31; op1val:0xfffff7ffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffff7ffffffffff) + +inst_48: +// rs1_val == 18446726481523507199, +// opcode: cbo.inval ; op1:x31; op1val:0xffffefffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffefffffffffff) + +inst_49: +// rs1_val == 18446708889337462783, +// opcode: cbo.inval ; op1:x31; op1val:0xffffdfffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffdfffffffffff) + +inst_50: +// rs1_val == 18446673704965373951, +// opcode: cbo.inval ; op1:x31; op1val:0xffffbfffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffffbfffffffffff) + +inst_51: +// rs1_val == 18446603336221196287, +// opcode: cbo.inval ; op1:x31; op1val:0xffff7fffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffff7fffffffffff) + +inst_52: +// rs1_val == 18446462598732840959, +// opcode: cbo.inval ; op1:x31; op1val:0xfffeffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffeffffffffffff) + +inst_53: +// rs1_val == 18446181123756130303, +// opcode: cbo.inval ; op1:x31; op1val:0xfffdffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffdffffffffffff) + +inst_54: +// rs1_val == 18445618173802708991, +// opcode: cbo.inval ; op1:x31; op1val:0xfffbffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfffbffffffffffff) + +inst_55: +// rs1_val == 18444492273895866367, +// opcode: cbo.inval ; op1:x31; op1val:0xfff7ffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfff7ffffffffffff) + +inst_56: +// rs1_val == 18442240474082181119, +// opcode: cbo.inval ; op1:x31; op1val:0xffefffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffefffffffffffff) + +inst_57: +// rs1_val == 18437736874454810623, +// opcode: cbo.inval ; op1:x31; op1val:0xffdfffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffdfffffffffffff) + +inst_58: +// rs1_val == 18428729675200069631, +// opcode: cbo.inval ; op1:x31; op1val:0xffbfffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xffbfffffffffffff) + +inst_59: +// rs1_val == 18410715276690587647, +// opcode: cbo.inval ; op1:x31; op1val:0xff7fffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xff7fffffffffffff) + +inst_60: +// rs1_val == 18374686479671623679, +// opcode: cbo.inval ; op1:x31; op1val:0xfeffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfeffffffffffffff) + +inst_61: +// rs1_val == 18302628885633695743, +// opcode: cbo.inval ; op1:x31; op1val:0xfdffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfdffffffffffffff) + +inst_62: +// rs1_val == 18158513697557839871, +// opcode: cbo.inval ; op1:x31; op1val:0xfbffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xfbffffffffffffff) + +inst_63: +// rs1_val == 17870283321406128127, +// opcode: cbo.inval ; op1:x31; op1val:0xf7ffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xf7ffffffffffffff) + +inst_64: +// rs1_val == 17293822569102704639, +// opcode: cbo.inval ; op1:x31; op1val:0xefffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xefffffffffffffff) + +inst_65: +// rs1_val == 16140901064495857663, +// opcode: cbo.inval ; op1:x31; op1val:0xdfffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xdfffffffffffffff) + +inst_66: +// rs1_val == 13835058055282163711, +// opcode: cbo.inval ; op1:x31; op1val:0xbfffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0xbfffffffffffffff) + +inst_67: +// rs1_val == 9223372036854775807, +// opcode: cbo.inval ; op1:x31; op1val:0x7fffffffffffffff +TEST_CBO(x1,x31,cbo.inval,0x7fffffffffffffff) + +inst_68: +// rs1_val == 1, +// opcode: cbo.inval ; op1:x31; op1val:0x1 +TEST_CBO(x1,x31,cbo.inval,0x1) + +inst_69: +// rs1_val == 1152921504606846976, +// opcode: cbo.inval ; op1:x31; op1val:0x1000000000000000 +TEST_CBO(x1,x31,cbo.inval,0x1000000000000000) + +inst_70: +// rs1_val == 2305843009213693952, +// opcode: cbo.inval ; op1:x31; op1val:0x2000000000000000 +TEST_CBO(x1,x31,cbo.inval,0x2000000000000000) + +inst_71: +// rs1_val == 4611686018427387904, +// opcode: cbo.inval ; op1:x31; op1val:0x4000000000000000 +TEST_CBO(x1,x31,cbo.inval,0x4000000000000000) + +inst_72: +// rs1_val == 9223372036854775808, +// opcode: cbo.inval ; op1:x31; op1val:0x8000000000000000 +TEST_CBO(x1,x31,cbo.inval,0x8000000000000000) + +inst_73: +// rs1_val == 2, +// opcode: cbo.inval ; op1:x31; op1val:0x2 +TEST_CBO(x1,x31,cbo.inval,0x2) + +inst_74: +// rs1_val == 4, +// opcode: cbo.inval ; op1:x31; op1val:0x4 +TEST_CBO(x1,x31,cbo.inval,0x4) + +inst_75: +// rs1_val == 8, +// opcode: cbo.inval ; op1:x31; op1val:0x8 +TEST_CBO(x1,x31,cbo.inval,0x8) + +inst_76: +// rs1_val == 16, +// opcode: cbo.inval ; op1:x31; op1val:0x10 +TEST_CBO(x1,x31,cbo.inval,0x10) + +inst_77: +// rs1_val == 32, +// opcode: cbo.inval ; op1:x31; op1val:0x20 +TEST_CBO(x1,x31,cbo.inval,0x20) + +inst_78: +// rs1_val == 64, +// opcode: cbo.inval ; op1:x31; op1val:0x40 +TEST_CBO(x1,x31,cbo.inval,0x40) + +inst_79: +// rs1_val == 128, +// opcode: cbo.inval ; op1:x31; op1val:0x80 +TEST_CBO(x1,x31,cbo.inval,0x80) + +inst_80: +// rs1_val == 256, +// opcode: cbo.inval ; op1:x31; op1val:0x100 +TEST_CBO(x1,x31,cbo.inval,0x100) + +inst_81: +// rs1_val == 512, +// opcode: cbo.inval ; op1:x31; op1val:0x200 +TEST_CBO(x1,x31,cbo.inval,0x200) + +inst_82: +// rs1_val == 1024, +// opcode: cbo.inval ; op1:x31; op1val:0x400 +TEST_CBO(x1,x31,cbo.inval,0x400) + +inst_83: +// rs1_val == 2048, +// opcode: cbo.inval ; op1:x31; op1val:0x800 +TEST_CBO(x1,x31,cbo.inval,0x800) + +inst_84: +// rs1_val == 4096, +// opcode: cbo.inval ; op1:x31; op1val:0x1000 +TEST_CBO(x1,x31,cbo.inval,0x1000) + +inst_85: +// rs1_val == 8192, +// opcode: cbo.inval ; op1:x31; op1val:0x2000 +TEST_CBO(x1,x31,cbo.inval,0x2000) + +inst_86: +// rs1_val == 16384, +// opcode: cbo.inval ; op1:x31; op1val:0x4000 +TEST_CBO(x1,x31,cbo.inval,0x4000) + +inst_87: +// rs1_val == 32768, +// opcode: cbo.inval ; op1:x31; op1val:0x8000 +TEST_CBO(x1,x31,cbo.inval,0x8000) + +inst_88: +// rs1_val == 65536, +// opcode: cbo.inval ; op1:x31; op1val:0x10000 +TEST_CBO(x1,x31,cbo.inval,0x10000) + +inst_89: +// rs1_val == 131072, +// opcode: cbo.inval ; op1:x31; op1val:0x20000 +TEST_CBO(x1,x31,cbo.inval,0x20000) + +inst_90: +// rs1_val == 262144, +// opcode: cbo.inval ; op1:x31; op1val:0x40000 +TEST_CBO(x1,x31,cbo.inval,0x40000) + +inst_91: +// rs1_val == 524288, +// opcode: cbo.inval ; op1:x31; op1val:0x80000 +TEST_CBO(x1,x31,cbo.inval,0x80000) + +inst_92: +// rs1_val == 1048576, +// opcode: cbo.inval ; op1:x31; op1val:0x100000 +TEST_CBO(x1,x31,cbo.inval,0x100000) + +inst_93: +// rs1_val == 2097152, +// opcode: cbo.inval ; op1:x31; op1val:0x200000 +TEST_CBO(x1,x31,cbo.inval,0x200000) + +inst_94: +// rs1_val == 4194304, +// opcode: cbo.inval ; op1:x31; op1val:0x400000 +TEST_CBO(x1,x31,cbo.inval,0x400000) + +inst_95: +// rs1_val == 8388608, +// opcode: cbo.inval ; op1:x31; op1val:0x800000 +TEST_CBO(x1,x31,cbo.inval,0x800000) + +inst_96: +// rs1_val == 16777216, +// opcode: cbo.inval ; op1:x31; op1val:0x1000000 +TEST_CBO(x1,x31,cbo.inval,0x1000000) + +inst_97: +// rs1_val == 33554432, +// opcode: cbo.inval ; op1:x31; op1val:0x2000000 +TEST_CBO(x1,x31,cbo.inval,0x2000000) + +inst_98: +// rs1_val == 67108864, +// opcode: cbo.inval ; op1:x31; op1val:0x4000000 +TEST_CBO(x1,x31,cbo.inval,0x4000000) + +inst_99: +// rs1_val == 134217728, +// opcode: cbo.inval ; op1:x31; op1val:0x8000000 +TEST_CBO(x1,x31,cbo.inval,0x8000000) + +inst_100: +// rs1_val == 268435456, +// opcode: cbo.inval ; op1:x31; op1val:0x10000000 +TEST_CBO(x1,x31,cbo.inval,0x10000000) + +inst_101: +// rs1_val == 536870912, +// opcode: cbo.inval ; op1:x31; op1val:0x20000000 +TEST_CBO(x1,x31,cbo.inval,0x20000000) + +inst_102: +// rs1_val == 1073741824, +// opcode: cbo.inval ; op1:x31; op1val:0x40000000 +TEST_CBO(x1,x31,cbo.inval,0x40000000) + +inst_103: +// rs1_val == 2147483648, +// opcode: cbo.inval ; op1:x31; op1val:0x80000000 +TEST_CBO(x1,x31,cbo.inval,0x80000000) + +inst_104: +// rs1_val == 4294967296, +// opcode: cbo.inval ; op1:x31; op1val:0x100000000 +TEST_CBO(x1,x31,cbo.inval,0x100000000) + +inst_105: +// rs1_val == 8589934592, +// opcode: cbo.inval ; op1:x31; op1val:0x200000000 +TEST_CBO(x1,x31,cbo.inval,0x200000000) + +inst_106: +// rs1_val == 17179869184, +// opcode: cbo.inval ; op1:x31; op1val:0x400000000 +TEST_CBO(x1,x31,cbo.inval,0x400000000) + +inst_107: +// rs1_val == 34359738368, +// opcode: cbo.inval ; op1:x31; op1val:0x800000000 +TEST_CBO(x1,x31,cbo.inval,0x800000000) + +inst_108: +// rs1_val == 68719476736, +// opcode: cbo.inval ; op1:x31; op1val:0x1000000000 +TEST_CBO(x1,x31,cbo.inval,0x1000000000) + +inst_109: +// rs1_val == 137438953472, +// opcode: cbo.inval ; op1:x31; op1val:0x2000000000 +TEST_CBO(x1,x31,cbo.inval,0x2000000000) + +inst_110: +// rs1_val == 274877906944, +// opcode: cbo.inval ; op1:x31; op1val:0x4000000000 +TEST_CBO(x1,x31,cbo.inval,0x4000000000) + +inst_111: +// rs1_val == 549755813888, +// opcode: cbo.inval ; op1:x31; op1val:0x8000000000 +TEST_CBO(x1,x31,cbo.inval,0x8000000000) + +inst_112: +// rs1_val == 1099511627776, +// opcode: cbo.inval ; op1:x31; op1val:0x10000000000 +TEST_CBO(x1,x31,cbo.inval,0x10000000000) + +inst_113: +// rs1_val == 2199023255552, +// opcode: cbo.inval ; op1:x31; op1val:0x20000000000 +TEST_CBO(x1,x31,cbo.inval,0x20000000000) + +inst_114: +// rs1_val == 4398046511104, +// opcode: cbo.inval ; op1:x31; op1val:0x40000000000 +TEST_CBO(x1,x31,cbo.inval,0x40000000000) + +inst_115: +// rs1_val == 8796093022208, +// opcode: cbo.inval ; op1:x31; op1val:0x80000000000 +TEST_CBO(x1,x31,cbo.inval,0x80000000000) + +inst_116: +// rs1_val == 17592186044416, +// opcode: cbo.inval ; op1:x31; op1val:0x100000000000 +TEST_CBO(x1,x31,cbo.inval,0x100000000000) + +inst_117: +// rs1_val == 35184372088832, +// opcode: cbo.inval ; op1:x31; op1val:0x200000000000 +TEST_CBO(x1,x31,cbo.inval,0x200000000000) + +inst_118: +// rs1_val == 70368744177664, +// opcode: cbo.inval ; op1:x31; op1val:0x400000000000 +TEST_CBO(x1,x31,cbo.inval,0x400000000000) + +inst_119: +// rs1_val == 140737488355328, +// opcode: cbo.inval ; op1:x31; op1val:0x800000000000 +TEST_CBO(x1,x31,cbo.inval,0x800000000000) + +inst_120: +// rs1_val == 281474976710656, +// opcode: cbo.inval ; op1:x31; op1val:0x1000000000000 +TEST_CBO(x1,x31,cbo.inval,0x1000000000000) + +inst_121: +// rs1_val == 562949953421312, +// opcode: cbo.inval ; op1:x31; op1val:0x2000000000000 +TEST_CBO(x1,x31,cbo.inval,0x2000000000000) + +inst_122: +// rs1_val == 1125899906842624, +// opcode: cbo.inval ; op1:x31; op1val:0x4000000000000 +TEST_CBO(x1,x31,cbo.inval,0x4000000000000) + +inst_123: +// rs1_val == 2251799813685248, +// opcode: cbo.inval ; op1:x31; op1val:0x8000000000000 +TEST_CBO(x1,x31,cbo.inval,0x8000000000000) + +inst_124: +// rs1_val == 4503599627370496, +// opcode: cbo.inval ; op1:x31; op1val:0x10000000000000 +TEST_CBO(x1,x31,cbo.inval,0x10000000000000) + +inst_125: +// rs1_val == 9007199254740992, +// opcode: cbo.inval ; op1:x31; op1val:0x20000000000000 +TEST_CBO(x1,x31,cbo.inval,0x20000000000000) + +inst_126: +// rs1_val == 18014398509481984, +// opcode: cbo.inval ; op1:x31; op1val:0x40000000000000 +TEST_CBO(x1,x31,cbo.inval,0x40000000000000) + +inst_127: +// rs1_val == 36028797018963968, +// opcode: cbo.inval ; op1:x31; op1val:0x80000000000000 +TEST_CBO(x1,x31,cbo.inval,0x80000000000000) + +inst_128: +// rs1_val == 72057594037927936, +// opcode: cbo.inval ; op1:x31; op1val:0x100000000000000 +TEST_CBO(x1,x31,cbo.inval,0x100000000000000) + +inst_129: +// rs1_val == 144115188075855872, +// opcode: cbo.inval ; op1:x31; op1val:0x200000000000000 +TEST_CBO(x1,x31,cbo.inval,0x200000000000000) + +inst_130: +// rs1_val == 288230376151711744, +// opcode: cbo.inval ; op1:x31; op1val:0x400000000000000 +TEST_CBO(x1,x31,cbo.inval,0x400000000000000) + +inst_131: +// rs1_val == 576460752303423488, +// opcode: cbo.inval ; op1:x31; op1val:0x800000000000000 +TEST_CBO(x1,x31,cbo.inval,0x800000000000000) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x15_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x15_1: + .fill 28*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 104*((XLEN/8)/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 diff --git a/riscv-test-suite/tmp/cbo.zero-01.S b/riscv-test-suite/tmp/cbo.zero-01.S new file mode 100644 index 000000000..87fe1971d --- /dev/null +++ b/riscv-test-suite/tmp/cbo.zero-01.S @@ -0,0 +1,312 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:03:05 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cboz.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the cbo.zero instruction of the RISC-V RV64Zicboz_Zicsr extension for the cbo.zero covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicboz_Zicsr") + +.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(.*I.*Zicboz.*Zicsr.*);def TEST_CASE_1=True;",cbo.zero) + +RVTEST_SIGBASE(x10,signature_x10_1) + +inst_0: +// rs1==x4, rs1_val == 0x4a9 +// opcode: cbo.zero ; op1:x4; op1val:0x4a9 +TEST_CBO(x10,x4,cbo.zero,0x4a9) + +inst_1: +// rs1==x29, rs1_val == 0xeb4 +// opcode: cbo.zero ; op1:x29; op1val:0xeb4 +TEST_CBO(x10,x29,cbo.zero,0xeb4) + +inst_2: +// rs1==x2, rs1_val == 0xe8e +// opcode: cbo.zero ; op1:x2; op1val:0xe8e +TEST_CBO(x10,x2,cbo.zero,0xe8e) + +inst_3: +// rs1==x24, rs1_val == 0x597 +// opcode: cbo.zero ; op1:x24; op1val:0x597 +TEST_CBO(x10,x24,cbo.zero,0x597) + +inst_4: +// rs1==x25, rs1_val == 4094, +// opcode: cbo.zero ; op1:x25; op1val:0xffe +TEST_CBO(x10,x25,cbo.zero,0xffe) + +inst_5: +// rs1==x16, rs1_val == 4093, +// opcode: cbo.zero ; op1:x16; op1val:0xffd +TEST_CBO(x10,x16,cbo.zero,0xffd) + +inst_6: +// rs1==x19, rs1_val == 4091, +// opcode: cbo.zero ; op1:x19; op1val:0xffb +TEST_CBO(x10,x19,cbo.zero,0xffb) + +inst_7: +// rs1==x17, rs1_val == 4087, +// opcode: cbo.zero ; op1:x17; op1val:0xff7 +TEST_CBO(x10,x17,cbo.zero,0xff7) + +inst_8: +// rs1==x20, rs1_val == 4079, +// opcode: cbo.zero ; op1:x20; op1val:0xfef +TEST_CBO(x10,x20,cbo.zero,0xfef) + +inst_9: +// rs1==x1, rs1_val == 4063, +// opcode: cbo.zero ; op1:x1; op1val:0xfdf +TEST_CBO(x10,x1,cbo.zero,0xfdf) + +inst_10: +// rs1==x30, rs1_val == 4031, +// opcode: cbo.zero ; op1:x30; op1val:0xfbf +TEST_CBO(x10,x30,cbo.zero,0xfbf) + +inst_11: +// rs1==x18, rs1_val == 3967, +// opcode: cbo.zero ; op1:x18; op1val:0xf7f +TEST_CBO(x10,x18,cbo.zero,0xf7f) + +inst_12: +// rs1==x7, rs1_val == 3839, +// opcode: cbo.zero ; op1:x7; op1val:0xeff +TEST_CBO(x10,x7,cbo.zero,0xeff) + +inst_13: +// rs1==x31, rs1_val == 3583, +// opcode: cbo.zero ; op1:x31; op1val:0xdff +TEST_CBO(x10,x31,cbo.zero,0xdff) + +inst_14: +// rs1==x21, rs1_val == 3071, +// opcode: cbo.zero ; op1:x21; op1val:0xbff +TEST_CBO(x10,x21,cbo.zero,0xbff) + +inst_15: +// rs1==x23, rs1_val == 2047, +// opcode: cbo.zero ; op1:x23; op1val:0x7ff +TEST_CBO(x10,x23,cbo.zero,0x7ff) + +inst_16: +// rs1==x12, rs1_val == 1, +// opcode: cbo.zero ; op1:x12; op1val:0x1 +TEST_CBO(x10,x12,cbo.zero,0x1) + +inst_17: +// rs1==x14, rs1_val == 2, +// opcode: cbo.zero ; op1:x14; op1val:0x2 +TEST_CBO(x10,x14,cbo.zero,0x2) + +inst_18: +// rs1==x13, rs1_val == 4, +// opcode: cbo.zero ; op1:x13; op1val:0x4 +TEST_CBO(x10,x13,cbo.zero,0x4) + +inst_19: +// rs1==x28, rs1_val == 8, +// opcode: cbo.zero ; op1:x28; op1val:0x8 +TEST_CBO(x10,x28,cbo.zero,0x8) + +inst_20: +// rs1==x15, rs1_val == 16, +// opcode: cbo.zero ; op1:x15; op1val:0x10 +TEST_CBO(x10,x15,cbo.zero,0x10) + +inst_21: +// rs1==x5, rs1_val == 32, +// opcode: cbo.zero ; op1:x5; op1val:0x20 +TEST_CBO(x10,x5,cbo.zero,0x20) + +inst_22: +// rs1==x8, rs1_val == 64, +// opcode: cbo.zero ; op1:x8; op1val:0x40 +TEST_CBO(x10,x8,cbo.zero,0x40) + +inst_23: +// rs1==x3, rs1_val == 128, +// opcode: cbo.zero ; op1:x3; op1val:0x80 +TEST_CBO(x10,x3,cbo.zero,0x80) + +inst_24: +// rs1==x6, rs1_val == 256, +// opcode: cbo.zero ; op1:x6; op1val:0x100 +TEST_CBO(x10,x6,cbo.zero,0x100) + +inst_25: +// rs1==x9, rs1_val == 512, +// opcode: cbo.zero ; op1:x9; op1val:0x200 +TEST_CBO(x10,x9,cbo.zero,0x200) + +inst_26: +// rs1==x22, rs1_val == 1024, +// opcode: cbo.zero ; op1:x22; op1val:0x400 +TEST_CBO(x10,x22,cbo.zero,0x400) + +inst_27: +// rs1==x27, rs1_val == 2048, +// opcode: cbo.zero ; op1:x27; op1val:0x800 +TEST_CBO(x10,x27,cbo.zero,0x800) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_28: +// rs1==x10, rs1_val == 0xc93 +// opcode: cbo.zero ; op1:x10; op1val:0xc93 +TEST_CBO(x1,x10,cbo.zero,0xc93) + +inst_29: +// rs1==x26, rs1_val == 0xb31 +// opcode: cbo.zero ; op1:x26; op1val:0xb31 +TEST_CBO(x1,x26,cbo.zero,0xb31) + +inst_30: +// rs1==x11, rs1_val == 0xddf +// opcode: cbo.zero ; op1:x11; op1val:0xddf +TEST_CBO(x1,x11,cbo.zero,0xddf) + +inst_31: +// rs1_val == 0x384 +// opcode: cbo.zero ; op1:x31; op1val:0x384 +TEST_CBO(x1,x31,cbo.zero,0x384) + +inst_32: +// rs1_val == 0x3e1 +// opcode: cbo.zero ; op1:x31; op1val:0x3e1 +TEST_CBO(x1,x31,cbo.zero,0x3e1) + +inst_33: +// rs1_val == 0x290 +// opcode: cbo.zero ; op1:x31; op1val:0x290 +TEST_CBO(x1,x31,cbo.zero,0x290) + +inst_34: +// rs1_val == 0xe97 +// opcode: cbo.zero ; op1:x31; op1val:0xe97 +TEST_CBO(x1,x31,cbo.zero,0xe97) + +inst_35: +// rs1_val == 0x86d +// opcode: cbo.zero ; op1:x31; op1val:0x86d +TEST_CBO(x1,x31,cbo.zero,0x86d) + +inst_36: +// rs1_val == 0x188 +// opcode: cbo.zero ; op1:x31; op1val:0x188 +TEST_CBO(x1,x31,cbo.zero,0x188) + +inst_37: +// rs1_val == 0x68b +// opcode: cbo.zero ; op1:x31; op1val:0x68b +TEST_CBO(x1,x31,cbo.zero,0x68b) + +inst_38: +// rs1_val == 0xabb +// opcode: cbo.zero ; op1:x31; op1val:0xabb +TEST_CBO(x1,x31,cbo.zero,0xabb) + +inst_39: +// rs1_val == 0x759 +// opcode: cbo.zero ; op1:x31; op1val:0x759 +TEST_CBO(x1,x31,cbo.zero,0x759) + +inst_40: +// rs1_val == 0x9e6 +// opcode: cbo.zero ; op1:x31; op1val:0x9e6 +TEST_CBO(x1,x31,cbo.zero,0x9e6) + +inst_41: +// rs1_val == 0x686 +// opcode: cbo.zero ; op1:x31; op1val:0x686 +TEST_CBO(x1,x31,cbo.zero,0x686) + +inst_42: +// rs1_val == 0x5b5 +// opcode: cbo.zero ; op1:x31; op1val:0x5b5 +TEST_CBO(x1,x31,cbo.zero,0x5b5) + +inst_43: +// rs1_val == 0x481 +// opcode: cbo.zero ; op1:x31; op1val:0x481 +TEST_CBO(x1,x31,cbo.zero,0x481) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x10_0: + .fill 0*((RVMODEL_CBZ_BLOCKSIZE)/4),4,0xdeadbeef + + +signature_x10_1: + .fill 28*((RVMODEL_CBZ_BLOCKSIZE)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 16*((RVMODEL_CBZ_BLOCKSIZE)/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 diff --git a/riscv-test-suite/tmp/prefetch.i-01.S b/riscv-test-suite/tmp/prefetch.i-01.S new file mode 100644 index 000000000..7a32f7571 --- /dev/null +++ b/riscv-test-suite/tmp/prefetch.i-01.S @@ -0,0 +1,767 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:02:52 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbop.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the prefetch.i instruction of the RISC-V RV64Zicbop_Zicsr extension for the prefetch.i covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbop_Zicsr") + +.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(.*I.*Zicbop.*Zicsr.*);def TEST_CASE_1=True;",prefetch.i) + +RVTEST_SIGBASE(x4,signature_x4_1) + +inst_0: +// rs1==x12, imm_val == (-2**(12-1)) & 0b00000, imm_val == (2**(12-1)-1) & 0b00000, imm_val == 0, rs1_val == 18446743523953737727, rs1_val > imm_val and imm_val == 0 +// opcode: prefetch.i ; op1:x12; dest:x10; op1val:0xffffff7fffffffff; immval:0x0 +TEST_PREFETCH(x4,x12,prefetch.i,0x0) + +inst_1: +// rs1==x6, imm_val == 1<<5, imm_val == 32, rs1_val < imm_val and rs1_val != 0 +// opcode: prefetch.i ; op1:x6; dest:x10; op1val:0x9; immval:0x20 +TEST_PREFETCH(x4,x6,prefetch.i,0x20) + +inst_2: +// rs1==x28, rs1_val == 18446744073709551614, +// opcode: prefetch.i ; op1:x28; dest:x10; op1val:0xfffffffffffffffe; immval:-0x80 +TEST_PREFETCH(x4,x28,prefetch.i,-0x80) + +inst_3: +// rs1==x26, rs1_val == 18446744073709551613, +// opcode: prefetch.i ; op1:x26; dest:x10; op1val:0xfffffffffffffffd; immval:0xa0 +TEST_PREFETCH(x4,x26,prefetch.i,0xa0) + +inst_4: +// rs1==x15, rs1_val == 18446744073709551611, +// opcode: prefetch.i ; op1:x15; dest:x10; op1val:0xfffffffffffffffb; immval:0x3e0 +TEST_PREFETCH(x4,x15,prefetch.i,0x3e0) + +inst_5: +// rs1==x14, rs1_val == 18446744073709551607, +// opcode: prefetch.i ; op1:x14; dest:x10; op1val:0xfffffffffffffff7; immval:-0x400 +TEST_PREFETCH(x4,x14,prefetch.i,-0x400) + +inst_6: +// rs1==x27, rs1_val == 18446744073709551599, imm_val == -64 +// opcode: prefetch.i ; op1:x27; dest:x10; op1val:0xffffffffffffffef; immval:-0x40 +TEST_PREFETCH(x4,x27,prefetch.i,-0x40) + +inst_7: +// rs1==x16, rs1_val == 18446744073709551583, imm_val == -1056 +// opcode: prefetch.i ; op1:x16; dest:x10; op1val:0xffffffffffffffdf; immval:-0x420 +TEST_PREFETCH(x4,x16,prefetch.i,-0x420) + +inst_8: +// rs1==x23, rs1_val == 18446744073709551551, +// opcode: prefetch.i ; op1:x23; dest:x10; op1val:0xffffffffffffffbf; immval:0x120 +TEST_PREFETCH(x4,x23,prefetch.i,0x120) + +inst_9: +// rs1==x25, rs1_val == 18446744073709551487, imm_val == 64 +// opcode: prefetch.i ; op1:x25; dest:x10; op1val:0xffffffffffffff7f; immval:0x40 +TEST_PREFETCH(x4,x25,prefetch.i,0x40) + +inst_10: +// rs1==x0, rs1_val == 18446744073709551359, +// opcode: prefetch.i ; op1:x0; dest:x10; op1val:0x0; immval:0xc0 +TEST_PREFETCH(x4,x0,prefetch.i,0xc0) + +inst_11: +// rs1==x2, rs1_val == 18446744073709551103, +// opcode: prefetch.i ; op1:x2; dest:x10; op1val:0xfffffffffffffdff; immval:-0x40 +TEST_PREFETCH(x4,x2,prefetch.i,-0x40) + +inst_12: +// rs1==x3, rs1_val == 18446744073709550591, +// opcode: prefetch.i ; op1:x3; dest:x10; op1val:0xfffffffffffffbff; immval:0x120 +TEST_PREFETCH(x4,x3,prefetch.i,0x120) + +inst_13: +// rs1==x24, rs1_val == 18446744073709549567, +// opcode: prefetch.i ; op1:x24; dest:x10; op1val:0xfffffffffffff7ff; immval:0x40 +TEST_PREFETCH(x4,x24,prefetch.i,0x40) + +inst_14: +// rs1==x11, rs1_val == 18446744073709547519, +// opcode: prefetch.i ; op1:x11; dest:x10; op1val:0xffffffffffffefff; immval:-0x20 +TEST_PREFETCH(x4,x11,prefetch.i,-0x20) + +inst_15: +// rs1==x7, rs1_val == 18446744073709543423, +// opcode: prefetch.i ; op1:x7; dest:x10; op1val:0xffffffffffffdfff; immval:-0x40 +TEST_PREFETCH(x4,x7,prefetch.i,-0x40) + +inst_16: +// rs1==x17, rs1_val == 18446744073709535231, imm_val == 2016 +// opcode: prefetch.i ; op1:x17; dest:x10; op1val:0xffffffffffffbfff; immval:0x7e0 +TEST_PREFETCH(x4,x17,prefetch.i,0x7e0) + +inst_17: +// rs1==x18, rs1_val == 18446744073709518847, +// opcode: prefetch.i ; op1:x18; dest:x10; op1val:0xffffffffffff7fff; immval:0x40 +TEST_PREFETCH(x4,x18,prefetch.i,0x40) + +inst_18: +// rs1==x19, rs1_val == 18446744073709486079, +// opcode: prefetch.i ; op1:x19; dest:x10; op1val:0xfffffffffffeffff; immval:-0x20 +TEST_PREFETCH(x4,x19,prefetch.i,-0x20) + +inst_19: +// rs1==x9, rs1_val == 18446744073709420543, +// opcode: prefetch.i ; op1:x9; dest:x10; op1val:0xfffffffffffdffff; immval:-0x420 +TEST_PREFETCH(x4,x9,prefetch.i,-0x420) + +inst_20: +// rs1==x20, rs1_val == 18446744073709289471, +// opcode: prefetch.i ; op1:x20; dest:x10; op1val:0xfffffffffffbffff; immval:0x40 +TEST_PREFETCH(x4,x20,prefetch.i,0x40) + +inst_21: +// rs1==x1, rs1_val == 18446744073709027327, imm_val == 128 +// opcode: prefetch.i ; op1:x1; dest:x10; op1val:0xfffffffffff7ffff; immval:0x80 +TEST_PREFETCH(x4,x1,prefetch.i,0x80) + +inst_22: +// rs1==x31, rs1_val == 18446744073708503039, imm_val == 256 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffffffefffff; immval:0x100 +TEST_PREFETCH(x4,x31,prefetch.i,0x100) + +inst_23: +// rs1==x29, rs1_val == 18446744073707454463, +// opcode: prefetch.i ; op1:x29; dest:x10; op1val:0xffffffffffdfffff; immval:-0x400 +TEST_PREFETCH(x4,x29,prefetch.i,-0x400) + +inst_24: +// rs1==x21, rs1_val == 18446744073705357311, +// opcode: prefetch.i ; op1:x21; dest:x10; op1val:0xffffffffffbfffff; immval:0x120 +TEST_PREFETCH(x4,x21,prefetch.i,0x120) + +inst_25: +// rs1==x8, rs1_val == 18446744073701163007, +// opcode: prefetch.i ; op1:x8; dest:x10; op1val:0xffffffffff7fffff; immval:-0x80 +TEST_PREFETCH(x4,x8,prefetch.i,-0x80) + +inst_26: +// rs1==x5, rs1_val == 18446744073692774399, +// opcode: prefetch.i ; op1:x5; dest:x10; op1val:0xfffffffffeffffff; immval:0x0 +TEST_PREFETCH(x4,x5,prefetch.i,0x0) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_27: +// rs1==x4, rs1_val == 18446744073675997183, +// opcode: prefetch.i ; op1:x4; dest:x10; op1val:0xfffffffffdffffff; immval:0x7e0 +TEST_PREFETCH(x1,x4,prefetch.i,0x7e0) + +inst_28: +// rs1==x13, rs1_val == 18446744073642442751, +// opcode: prefetch.i ; op1:x13; dest:x10; op1val:0xfffffffffbffffff; immval:0x20 +TEST_PREFETCH(x1,x13,prefetch.i,0x20) + +inst_29: +// rs1==x30, rs1_val == 18446744073575333887, +// opcode: prefetch.i ; op1:x30; dest:x10; op1val:0xfffffffff7ffffff; immval:0x80 +TEST_PREFETCH(x1,x30,prefetch.i,0x80) + +inst_30: +// rs1==x22, rs1_val == 18446744073441116159, +// opcode: prefetch.i ; op1:x22; dest:x10; op1val:0xffffffffefffffff; immval:-0xe0 +TEST_PREFETCH(x1,x22,prefetch.i,-0xe0) + +inst_31: +// rs1==x10, rs1_val == 18446744073172680703, imm_val == -544 +// opcode: prefetch.i ; op1:x10; dest:x10; op1val:0xffffffffdfffffff; immval:-0x220 +TEST_PREFETCH(x1,x10,prefetch.i,-0x220) + +inst_32: +// rs1_val == 18446744072635809791, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffffbfffffff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.i,0x0) + +inst_33: +// rs1_val == 18446744071562067967, imm_val == -288 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffff7fffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.i,-0x120) + +inst_34: +// rs1_val == 18446744069414584319, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffffeffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x3e0) + +inst_35: +// rs1_val == 18446744065119617023, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffffdffffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_36: +// rs1_val == 18446744056529682431, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffffbffffffff; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.i,-0x420) + +inst_37: +// rs1_val == 18446744039349813247, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffff7ffffffff; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.i,-0x140) + +inst_38: +// rs1_val == 18446744004990074879, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffefffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.i,-0x120) + +inst_39: +// rs1_val == 18446743936270598143, imm_val == -1376 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffdfffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_40: +// rs1_val == 18446743798831644671, imm_val == 1024 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffbfffffffff; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.i,0x400) + +inst_41: +// rs1_val == 18446742974197923839, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffeffffffffff; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.i,-0x40) + +inst_42: +// rs1_val == 18446741874686296063, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffdffffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.i,-0x400) + +inst_43: +// rs1_val == 18446739675663040511, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffbffffffffff; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_44: +// rs1_val == 18446735277616529407, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffff7ffffffffff; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.i,0x20) + +inst_45: +// rs1_val == 18446726481523507199, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffefffffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.i,-0x120) + +inst_46: +// rs1_val == 18446708889337462783, imm_val == -2048 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffdfffffffffff; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.i,-0x800) + +inst_47: +// rs1_val == 18446673704965373951, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffbfffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_48: +// rs1_val == 18446603336221196287, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffff7fffffffffff; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.i,0x120) + +inst_49: +// rs1_val == 18446462598732840959, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffeffffffffffff; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.i,-0x20) + +inst_50: +// rs1_val == 18446181123756130303, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffdffffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_51: +// rs1_val == 18445618173802708991, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffbffffffffffff; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.i,-0x20) + +inst_52: +// rs1_val == 18444492273895866367, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfff7ffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_53: +// rs1_val == 18442240474082181119, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffefffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_54: +// rs1_val == 18437736874454810623, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffdfffffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_55: +// rs1_val == 18428729675200069631, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffbfffffffffffff; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.i,-0x800) + +inst_56: +// rs1_val == 18410715276690587647, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xff7fffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_57: +// rs1_val == 18374686479671623679, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfeffffffffffffff; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_58: +// rs1_val == 18302628885633695743, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfdffffffffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.i,-0x400) + +inst_59: +// rs1_val == 18158513697557839871, imm_val == 1344 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfbffffffffffffff; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.i,0x540) + +inst_60: +// rs1_val == 17870283321406128127, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xf7ffffffffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.i,0x40) + +inst_61: +// rs1_val == 17293822569102704639, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xefffffffffffffff; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_62: +// rs1_val == 16140901064495857663, imm_val == -96 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xdfffffffffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.i,-0x60) + +inst_63: +// rs1_val == 13835058055282163711, imm_val == 512 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xbfffffffffffffff; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.i,0x200) + +inst_64: +// rs1_val == 9223372036854775807, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x7fffffffffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x3e0) + +inst_65: +// imm_val == -160, rs1_val == 16384 +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_66: +// rs1_val == 1, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_67: +// rs1_val == 2, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.i,-0x100) + +inst_68: +// rs1_val == 4, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_69: +// rs1_val == 8, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_70: +// rs1_val == 16, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_71: +// rs1_val == 9007199254740992, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20000000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_72: +// rs1_val == 18014398509481984, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40000000000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_73: +// rs1_val == 36028797018963968, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80000000000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_74: +// rs1_val == 72057594037927936, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100000000000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_75: +// rs1_val == 144115188075855872, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200000000000000; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.i,-0x120) + +inst_76: +// rs1_val == 288230376151711744, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400000000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_77: +// rs1_val == 576460752303423488, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800000000000000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.i,0x540) + +inst_78: +// rs1_val == 1152921504606846976, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000000000000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_79: +// rs1_val == 2305843009213693952, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000000000000000; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_80: +// rs1_val == 4611686018427387904, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000000000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_81: +// rs1_val == 9223372036854775808, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000000000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_82: +// rs1_val == 6148914691236517205, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x5555555555555555; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_83: +// rs1_val == 12297829382473034410, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xaaaaaaaaaaaaaaaa; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.i,-0x220) + +inst_84: +// rs1_val == (2**(xlen)-1), +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xffffffffffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.i,-0x60) + +inst_85: +// rs1_val == 0, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x0; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_86: +// rs1_val == imm_val and rs1_val == 0, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x0; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.i,0x0) + +inst_87: +// rs1_val == 32, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.i,-0x400) + +inst_88: +// rs1_val == 64, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.i,0x400) + +inst_89: +// rs1_val == 128, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_90: +// rs1_val == 256, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_91: +// rs1_val == 512, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.i,-0x40) + +inst_92: +// rs1_val == 1024, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_93: +// rs1_val == 2048, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_94: +// rs1_val == 4096, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.i,-0x40) + +inst_95: +// rs1_val == 8192, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.i,0x40) + +inst_96: +// rs1_val == 32768, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.i,0x20) + +inst_97: +// rs1_val == 65536, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10000; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.i,0x120) + +inst_98: +// rs1_val == 131072, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20000; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.i,-0x420) + +inst_99: +// rs1_val == 262144, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xe0) + +inst_100: +// rs1_val == 524288, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_101: +// rs1_val == 1048576, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.i,0x80) + +inst_102: +// rs1_val == 2097152, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.i,-0x400) + +inst_103: +// rs1_val == 4194304, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_104: +// rs1_val == 8388608, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_105: +// rs1_val == 16777216, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000000; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.i,0x0) + +inst_106: +// rs1_val == 33554432, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_107: +// rs1_val == 67108864, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x3e0) + +inst_108: +// rs1_val == 134217728, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.i,0x20) + +inst_109: +// rs1_val == 268435456, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_110: +// rs1_val == 536870912, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_111: +// rs1_val == 1073741824, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40000000; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.i,-0x420) + +inst_112: +// rs1_val == 2147483648, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_113: +// rs1_val == 4294967296, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.i,0x200) + +inst_114: +// rs1_val == 8589934592, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.i,0xe0) + +inst_115: +// rs1_val == 17179869184, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400000000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,0xa0) + +inst_116: +// rs1_val == 34359738368, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800000000; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x7e0) + +inst_117: +// rs1_val == 68719476736, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000000000; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.i,-0x40) + +inst_118: +// rs1_val == 137438953472, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xc0) + +inst_119: +// rs1_val == 274877906944, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000000000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_120: +// rs1_val == 549755813888, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000000000; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.i,0x120) + +inst_121: +// rs1_val == 1099511627776, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10000000000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.i,-0x560) + +inst_122: +// rs1_val == 2199023255552, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x20000000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.i,0x100) + +inst_123: +// rs1_val == 4398046511104, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x40000000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.i,0x200) + +inst_124: +// rs1_val == 8796093022208, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x80000000000; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.i,-0x220) + +inst_125: +// rs1_val == 17592186044416, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x100000000000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_126: +// rs1_val == 35184372088832, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x200000000000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,0xa0) + +inst_127: +// rs1_val == 70368744177664, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x400000000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.i,-0x80) + +inst_128: +// rs1_val == 140737488355328, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x800000000000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) + +inst_129: +// rs1_val == 281474976710656, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x1000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.i,-0x20) + +inst_130: +// rs1_val == 562949953421312, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x2000000000000; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.i,-0x800) + +inst_131: +// rs1_val == 1125899906842624, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x4000000000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.i,-0xa0) + +inst_132: +// rs1_val == 2251799813685248, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x8000000000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.i,0x3e0) + +inst_133: +// rs1_val == 4503599627370496, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0x10000000000000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.i,0x540) + +inst_134: +// rs1_val == 18446744073709551359, +// opcode: prefetch.i ; op1:x31; dest:x10; op1val:0xfffffffffffffeff; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.i,0xc0) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x4_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x4_1: + .fill 27*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 108*((XLEN/8)/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 diff --git a/riscv-test-suite/tmp/prefetch.r-01.S b/riscv-test-suite/tmp/prefetch.r-01.S new file mode 100644 index 000000000..531a91839 --- /dev/null +++ b/riscv-test-suite/tmp/prefetch.r-01.S @@ -0,0 +1,777 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:02:52 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbop.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the prefetch.r instruction of the RISC-V RV64Zicbop_Zicsr extension for the prefetch.r covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbop_Zicsr") + +.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(.*I.*Zicbop.*Zicsr.*);def TEST_CASE_1=True;",prefetch.r) + +RVTEST_SIGBASE(x14,signature_x14_1) + +inst_0: +// rs1==x8, imm_val == (-2**(12-1)) & 0b00000, imm_val == (2**(12-1)-1) & 0b00000, imm_val == 0, rs1_val < imm_val and rs1_val != 0 +// opcode: prefetch.r ; op1:x8; dest:x10; op1val:-0xb504f332; immval:0x0 +TEST_PREFETCH(x14,x8,prefetch.r,0x0) + +inst_1: +// rs1==x11, imm_val == 1<<5, rs1_val == 4194304, imm_val == 32 +// opcode: prefetch.r ; op1:x11; dest:x10; op1val:0x400000; immval:0x20 +TEST_PREFETCH(x14,x11,prefetch.r,0x20) + +inst_2: +// rs1==x22, rs1_val == 18446744073709551614, imm_val == 128 +// opcode: prefetch.r ; op1:x22; dest:x10; op1val:0xfffffffffffffffe; immval:0x80 +TEST_PREFETCH(x14,x22,prefetch.r,0x80) + +inst_3: +// rs1==x23, rs1_val == 18446744073709551613, +// opcode: prefetch.r ; op1:x23; dest:x10; op1val:0xfffffffffffffffd; immval:0x3e0 +TEST_PREFETCH(x14,x23,prefetch.r,0x3e0) + +inst_4: +// rs1==x19, rs1_val == 18446744073709551611, +// opcode: prefetch.r ; op1:x19; dest:x10; op1val:0xfffffffffffffffb; immval:-0x140 +TEST_PREFETCH(x14,x19,prefetch.r,-0x140) + +inst_5: +// rs1==x26, rs1_val == 18446744073709551607, imm_val == 1024 +// opcode: prefetch.r ; op1:x26; dest:x10; op1val:0xfffffffffffffff7; immval:0x400 +TEST_PREFETCH(x14,x26,prefetch.r,0x400) + +inst_6: +// rs1==x6, rs1_val == 18446744073709551599, +// opcode: prefetch.r ; op1:x6; dest:x10; op1val:0xffffffffffffffef; immval:0x80 +TEST_PREFETCH(x14,x6,prefetch.r,0x80) + +inst_7: +// rs1==x4, rs1_val == 18446744073709551583, +// opcode: prefetch.r ; op1:x4; dest:x10; op1val:0xffffffffffffffdf; immval:-0xe0 +TEST_PREFETCH(x14,x4,prefetch.r,-0xe0) + +inst_8: +// rs1==x5, rs1_val == 18446744073709551551, +// opcode: prefetch.r ; op1:x5; dest:x10; op1val:0xffffffffffffffbf; immval:0x20 +TEST_PREFETCH(x14,x5,prefetch.r,0x20) + +inst_9: +// rs1==x7, rs1_val == 18446744073709551487, imm_val == -1376 +// opcode: prefetch.r ; op1:x7; dest:x10; op1val:0xffffffffffffff7f; immval:-0x560 +TEST_PREFETCH(x14,x7,prefetch.r,-0x560) + +inst_10: +// rs1==x9, rs1_val == 18446744073709551359, +// opcode: prefetch.r ; op1:x9; dest:x10; op1val:0xfffffffffffffeff; immval:0x60 +TEST_PREFETCH(x14,x9,prefetch.r,0x60) + +inst_11: +// rs1==x0, rs1_val == 18446744073709551103, rs1_val > imm_val and imm_val == 0 +// opcode: prefetch.r ; op1:x0; dest:x10; op1val:0x0; immval:0x0 +TEST_PREFETCH(x14,x0,prefetch.r,0x0) + +inst_12: +// rs1==x17, rs1_val == 18446744073709550591, +// opcode: prefetch.r ; op1:x17; dest:x10; op1val:0xfffffffffffffbff; immval:-0x140 +TEST_PREFETCH(x14,x17,prefetch.r,-0x140) + +inst_13: +// rs1==x3, rs1_val == 18446744073709549567, +// opcode: prefetch.r ; op1:x3; dest:x10; op1val:0xfffffffffffff7ff; immval:-0xe0 +TEST_PREFETCH(x14,x3,prefetch.r,-0xe0) + +inst_14: +// rs1==x12, rs1_val == 18446744073709547519, +// opcode: prefetch.r ; op1:x12; dest:x10; op1val:0xffffffffffffefff; immval:-0x20 +TEST_PREFETCH(x14,x12,prefetch.r,-0x20) + +inst_15: +// rs1==x24, rs1_val == 18446744073709543423, +// opcode: prefetch.r ; op1:x24; dest:x10; op1val:0xffffffffffffdfff; immval:0x80 +TEST_PREFETCH(x14,x24,prefetch.r,0x80) + +inst_16: +// rs1==x16, rs1_val == 18446744073709535231, imm_val == -96 +// opcode: prefetch.r ; op1:x16; dest:x10; op1val:0xffffffffffffbfff; immval:-0x60 +TEST_PREFETCH(x14,x16,prefetch.r,-0x60) + +inst_17: +// rs1==x2, rs1_val == 18446744073709518847, +// opcode: prefetch.r ; op1:x2; dest:x10; op1val:0xffffffffffff7fff; immval:0x120 +TEST_PREFETCH(x14,x2,prefetch.r,0x120) + +inst_18: +// rs1==x30, rs1_val == 18446744073709486079, +// opcode: prefetch.r ; op1:x30; dest:x10; op1val:0xfffffffffffeffff; immval:0x60 +TEST_PREFETCH(x14,x30,prefetch.r,0x60) + +inst_19: +// rs1==x28, rs1_val == 18446744073709420543, +// opcode: prefetch.r ; op1:x28; dest:x10; op1val:0xfffffffffffdffff; immval:-0x60 +TEST_PREFETCH(x14,x28,prefetch.r,-0x60) + +inst_20: +// rs1==x25, rs1_val == 18446744073709289471, imm_val == 512 +// opcode: prefetch.r ; op1:x25; dest:x10; op1val:0xfffffffffffbffff; immval:0x200 +TEST_PREFETCH(x14,x25,prefetch.r,0x200) + +inst_21: +// rs1==x13, rs1_val == 18446744073709027327, +// opcode: prefetch.r ; op1:x13; dest:x10; op1val:0xfffffffffff7ffff; immval:0x200 +TEST_PREFETCH(x14,x13,prefetch.r,0x200) + +inst_22: +// rs1==x29, rs1_val == 18446744073708503039, imm_val == -288 +// opcode: prefetch.r ; op1:x29; dest:x10; op1val:0xffffffffffefffff; immval:-0x120 +TEST_PREFETCH(x14,x29,prefetch.r,-0x120) + +inst_23: +// rs1==x15, rs1_val == 18446744073707454463, imm_val == 64 +// opcode: prefetch.r ; op1:x15; dest:x10; op1val:0xffffffffffdfffff; immval:0x40 +TEST_PREFETCH(x14,x15,prefetch.r,0x40) + +inst_24: +// rs1==x21, rs1_val == 18446744073705357311, imm_val == 2016 +// opcode: prefetch.r ; op1:x21; dest:x10; op1val:0xffffffffffbfffff; immval:0x7e0 +TEST_PREFETCH(x14,x21,prefetch.r,0x7e0) + +inst_25: +// rs1==x1, rs1_val == 18446744073701163007, +// opcode: prefetch.r ; op1:x1; dest:x10; op1val:0xffffffffff7fffff; immval:0x20 +TEST_PREFETCH(x14,x1,prefetch.r,0x20) + +inst_26: +// rs1==x20, rs1_val == 18446744073692774399, imm_val == -2048 +// opcode: prefetch.r ; op1:x20; dest:x10; op1val:0xfffffffffeffffff; immval:-0x800 +TEST_PREFETCH(x14,x20,prefetch.r,-0x800) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_27: +// rs1==x31, rs1_val == 18446744073675997183, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffffdffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.r,-0x120) + +inst_28: +// rs1==x27, rs1_val == 18446744073642442751, +// opcode: prefetch.r ; op1:x27; dest:x10; op1val:0xfffffffffbffffff; immval:-0x100 +TEST_PREFETCH(x1,x27,prefetch.r,-0x100) + +inst_29: +// rs1==x14, rs1_val == 18446744073575333887, +// opcode: prefetch.r ; op1:x14; dest:x10; op1val:0xfffffffff7ffffff; immval:0x60 +TEST_PREFETCH(x1,x14,prefetch.r,0x60) + +inst_30: +// rs1==x18, rs1_val == 18446744073441116159, +// opcode: prefetch.r ; op1:x18; dest:x10; op1val:0xffffffffefffffff; immval:0x120 +TEST_PREFETCH(x1,x18,prefetch.r,0x120) + +inst_31: +// rs1==x10, rs1_val == 18446744073172680703, +// opcode: prefetch.r ; op1:x10; dest:x10; op1val:0xffffffffdfffffff; immval:-0xc0 +TEST_PREFETCH(x1,x10,prefetch.r,-0xc0) + +inst_32: +// rs1_val == 18446744072635809791, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffffbfffffff; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,0xa0) + +inst_33: +// rs1_val == 18446744071562067967, imm_val == -544 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffff7fffffff; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.r,-0x220) + +inst_34: +// rs1_val == 18446744069414584319, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffeffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_35: +// rs1_val == 18446744065119617023, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffdffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.r,-0x560) + +inst_36: +// rs1_val == 18446744056529682431, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffbffffffff; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.r,0x120) + +inst_37: +// rs1_val == 18446744039349813247, imm_val == -64 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffff7ffffffff; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.r,-0x40) + +inst_38: +// rs1_val == 18446744004990074879, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffefffffffff; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_39: +// rs1_val == 18446743936270598143, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffdfffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.r,-0x120) + +inst_40: +// rs1_val == 18446743798831644671, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffbfffffffff; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.r,0x60) + +inst_41: +// rs1_val == 18446743523953737727, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffff7fffffffff; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.r,-0x220) + +inst_42: +// rs1_val == 18446742974197923839, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffeffffffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.r,-0x80) + +inst_43: +// rs1_val == 18446741874686296063, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffdffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_44: +// rs1_val == 18446739675663040511, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffbffffffffff; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.r,0x20) + +inst_45: +// rs1_val == 18446735277616529407, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffff7ffffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.r,-0x400) + +inst_46: +// rs1_val == 18446726481523507199, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffefffffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_47: +// rs1_val == 18446708889337462783, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffdfffffffffff; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.r,-0x140) + +inst_48: +// rs1_val == 18446673704965373951, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffbfffffffffff; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_49: +// rs1_val == 18446603336221196287, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffff7fffffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_50: +// rs1_val == 18446462598732840959, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffeffffffffffff; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.r,-0x800) + +inst_51: +// rs1_val == 18446181123756130303, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffdffffffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_52: +// rs1_val == 18445618173802708991, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffbffffffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.r,-0x120) + +inst_53: +// rs1_val == 18444492273895866367, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfff7ffffffffffff; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.r,-0x100) + +inst_54: +// rs1_val == 18442240474082181119, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffefffffffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x3e0) + +inst_55: +// rs1_val == 18437736874454810623, imm_val == 256 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffdfffffffffffff; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.r,0x100) + +inst_56: +// rs1_val == 18428729675200069631, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffbfffffffffffff; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.r,0x400) + +inst_57: +// rs1_val == 18410715276690587647, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xff7fffffffffffff; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.r,0xc0) + +inst_58: +// rs1_val == 18374686479671623679, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfeffffffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_59: +// rs1_val == 18302628885633695743, imm_val == 1344 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfdffffffffffffff; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.r,0x540) + +inst_60: +// rs1_val == 18158513697557839871, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfbffffffffffffff; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.r,0x20) + +inst_61: +// rs1_val == 17870283321406128127, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xf7ffffffffffffff; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_62: +// rs1_val == 17293822569102704639, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xefffffffffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_63: +// rs1_val == 16140901064495857663, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xdfffffffffffffff; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.r,-0x220) + +inst_64: +// rs1_val == 13835058055282163711, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xbfffffffffffffff; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,0xa0) + +inst_65: +// rs1_val == 9223372036854775807, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x7fffffffffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.r,-0x120) + +inst_66: +// imm_val == -160, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:-0xb504f333; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xa0) + +inst_67: +// imm_val == -1056, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffffdffffff; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.r,-0x420) + +inst_68: +// rs1_val == 1, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_69: +// rs1_val == 2, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.r,-0x40) + +inst_70: +// rs1_val == 4, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_71: +// rs1_val == 8, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) + +inst_72: +// rs1_val == 16, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) + +inst_73: +// rs1_val == 9007199254740992, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_74: +// rs1_val == 18014398509481984, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40000000000000; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.r,-0x140) + +inst_75: +// rs1_val == 36028797018963968, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_76: +// rs1_val == 72057594037927936, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100000000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xe0) + +inst_77: +// rs1_val == 144115188075855872, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200000000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xe0) + +inst_78: +// rs1_val == 288230376151711744, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x400000000000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x3e0) + +inst_79: +// rs1_val == 576460752303423488, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800000000000000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_80: +// rs1_val == 1152921504606846976, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000000000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_81: +// rs1_val == 2305843009213693952, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000000000000000; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.r,-0x800) + +inst_82: +// rs1_val == 4611686018427387904, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000000000000000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_83: +// rs1_val == 9223372036854775808, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000000000000000; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.r,0x400) + +inst_84: +// rs1_val == 6148914691236517205, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x5555555555555555; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.r,-0x40) + +inst_85: +// rs1_val == 12297829382473034410, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xaaaaaaaaaaaaaaaa; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_86: +// rs1_val == (2**(xlen)-1), +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xffffffffffffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.r,-0x80) + +inst_87: +// rs1_val == 0, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x0; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_88: +// rs1_val == imm_val and rs1_val == 0, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x0; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) + +inst_89: +// rs1_val == 32, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.r,0x60) + +inst_90: +// rs1_val == 64, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.r,0x200) + +inst_91: +// rs1_val == 128, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.r,-0x420) + +inst_92: +// rs1_val == 256, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.r,0x20) + +inst_93: +// rs1_val == 512, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.r,-0x400) + +inst_94: +// rs1_val == 1024, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x400; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.r,0x60) + +inst_95: +// rs1_val == 2048, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.r,-0x560) + +inst_96: +// rs1_val == 4096, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_97: +// rs1_val == 8192, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.r,-0x100) + +inst_98: +// rs1_val == 16384, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_99: +// rs1_val == 32768, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.r,-0x140) + +inst_100: +// rs1_val == 65536, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.r,-0x560) + +inst_101: +// rs1_val == 131072, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,0xa0) + +inst_102: +// rs1_val == 262144, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xa0) + +inst_103: +// rs1_val == 524288, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.r,0x20) + +inst_104: +// rs1_val == 1048576, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,0xa0) + +inst_105: +// rs1_val == 2097152, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.r,0x100) + +inst_106: +// rs1_val == 8388608, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xa0) + +inst_107: +// rs1_val == 16777216, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.r,0x540) + +inst_108: +// rs1_val == 33554432, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.r,0x40) + +inst_109: +// rs1_val == 67108864, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_110: +// rs1_val == 134217728, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.r,0x100) + +inst_111: +// rs1_val == 268435456, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x3e0) + +inst_112: +// rs1_val == 536870912, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20000000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.r,-0x400) + +inst_113: +// rs1_val == 1073741824, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.r,0x200) + +inst_114: +// rs1_val == 2147483648, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80000000; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x3e0) + +inst_115: +// rs1_val == 4294967296, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.r,-0x80) + +inst_116: +// rs1_val == 8589934592, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200000000; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.r,0x400) + +inst_117: +// rs1_val == 17179869184, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x400000000; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.r,-0x40) + +inst_118: +// rs1_val == 34359738368, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.r,-0x80) + +inst_119: +// rs1_val == 68719476736, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000000000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.r,0x540) + +inst_120: +// rs1_val == 137438953472, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000000000; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.r,0x60) + +inst_121: +// rs1_val == 274877906944, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_122: +// rs1_val == 549755813888, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000000000; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_123: +// rs1_val == 1099511627776, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_124: +// rs1_val == 2199023255552, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x20000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.r,-0x20) + +inst_125: +// rs1_val == 4398046511104, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x40000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,-0xe0) + +inst_126: +// rs1_val == 8796093022208, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x80000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.r,0x80) + +inst_127: +// rs1_val == 17592186044416, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x100000000000; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) + +inst_128: +// rs1_val == 35184372088832, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x200000000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.r,0x200) + +inst_129: +// rs1_val == 70368744177664, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x400000000000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.r,-0x400) + +inst_130: +// rs1_val == 140737488355328, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x800000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_131: +// rs1_val == 281474976710656, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x1000000000000; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.r,0x7e0) + +inst_132: +// rs1_val == 562949953421312, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x2000000000000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.r,-0x560) + +inst_133: +// rs1_val == 1125899906842624, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x4000000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.r,0xe0) + +inst_134: +// rs1_val == 2251799813685248, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x8000000000000; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.r,-0x100) + +inst_135: +// rs1_val == 4503599627370496, +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0x10000000000000; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.r,-0x60) + +inst_136: +// rs1_val == 18446744073709551103, rs1_val > imm_val and imm_val == 0 +// opcode: prefetch.r ; op1:x31; dest:x10; op1val:0xfffffffffffffdff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.r,0x0) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x14_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x14_1: + .fill 27*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 110*((XLEN/8)/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 diff --git a/riscv-test-suite/tmp/prefetch.w-01.S b/riscv-test-suite/tmp/prefetch.w-01.S new file mode 100644 index 000000000..829b3d76b --- /dev/null +++ b/riscv-test-suite/tmp/prefetch.w-01.S @@ -0,0 +1,772 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.12.2 +// timestamp : Wed Oct 16 01:02:52 2024 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/dataset.cgf \ +// --cgf /home/trdthg/repo/act/riscv-arch-test/coverage/cmo/cbop.cgf \ + \ +// -- xlen 64 \ +// --randomize \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the prefetch.w instruction of the RISC-V RV64Zicbop_Zicsr extension for the prefetch.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IZicbop_Zicsr") + +.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(.*I.*Zicbop.*Zicsr.*);def TEST_CASE_1=True;",prefetch.w) + +RVTEST_SIGBASE(x15,signature_x15_1) + +inst_0: +// rs1==x7, imm_val == (-2**(12-1)) & 0b00000, imm_val == (2**(12-1)-1) & 0b00000, imm_val == 0, rs1_val == 18446744073707454463, rs1_val > imm_val and imm_val == 0 +// opcode: prefetch.w ; op1:x7; dest:x10; op1val:0xffffffffffdfffff; immval:0x0 +TEST_PREFETCH(x15,x7,prefetch.w,0x0) + +inst_1: +// rs1==x30, imm_val == 1<<5, rs1_val == 137438953472, imm_val == 32 +// opcode: prefetch.w ; op1:x30; dest:x10; op1val:0x2000000000; immval:0x20 +TEST_PREFETCH(x15,x30,prefetch.w,0x20) + +inst_2: +// rs1==x0, rs1_val == 18446744073709551614, imm_val == 1344 +// opcode: prefetch.w ; op1:x0; dest:x10; op1val:0x0; immval:0x540 +TEST_PREFETCH(x15,x0,prefetch.w,0x540) + +inst_3: +// rs1==x4, rs1_val == 18446744073709551613, +// opcode: prefetch.w ; op1:x4; dest:x10; op1val:0xfffffffffffffffd; immval:-0x100 +TEST_PREFETCH(x15,x4,prefetch.w,-0x100) + +inst_4: +// rs1==x9, rs1_val == 18446744073709551611, imm_val == 1024 +// opcode: prefetch.w ; op1:x9; dest:x10; op1val:0xfffffffffffffffb; immval:0x400 +TEST_PREFETCH(x15,x9,prefetch.w,0x400) + +inst_5: +// rs1==x28, rs1_val == 18446744073709551607, +// opcode: prefetch.w ; op1:x28; dest:x10; op1val:0xfffffffffffffff7; immval:0x120 +TEST_PREFETCH(x15,x28,prefetch.w,0x120) + +inst_6: +// rs1==x3, rs1_val == 18446744073709551599, +// opcode: prefetch.w ; op1:x3; dest:x10; op1val:0xffffffffffffffef; immval:0x120 +TEST_PREFETCH(x15,x3,prefetch.w,0x120) + +inst_7: +// rs1==x6, rs1_val == 18446744073709551583, imm_val == 256 +// opcode: prefetch.w ; op1:x6; dest:x10; op1val:0xffffffffffffffdf; immval:0x100 +TEST_PREFETCH(x15,x6,prefetch.w,0x100) + +inst_8: +// rs1==x12, rs1_val == 18446744073709551551, +// opcode: prefetch.w ; op1:x12; dest:x10; op1val:0xffffffffffffffbf; immval:0x20 +TEST_PREFETCH(x15,x12,prefetch.w,0x20) + +inst_9: +// rs1==x17, rs1_val == 18446744073709551487, +// opcode: prefetch.w ; op1:x17; dest:x10; op1val:0xffffffffffffff7f; immval:0x60 +TEST_PREFETCH(x15,x17,prefetch.w,0x60) + +inst_10: +// rs1==x5, rs1_val == 18446744073709551359, +// opcode: prefetch.w ; op1:x5; dest:x10; op1val:0xfffffffffffffeff; immval:0x120 +TEST_PREFETCH(x15,x5,prefetch.w,0x120) + +inst_11: +// rs1==x2, rs1_val == 18446744073709551103, +// opcode: prefetch.w ; op1:x2; dest:x10; op1val:0xfffffffffffffdff; immval:0x20 +TEST_PREFETCH(x15,x2,prefetch.w,0x20) + +inst_12: +// rs1==x27, rs1_val == 18446744073709550591, +// opcode: prefetch.w ; op1:x27; dest:x10; op1val:0xfffffffffffffbff; immval:-0xe0 +TEST_PREFETCH(x15,x27,prefetch.w,-0xe0) + +inst_13: +// rs1==x13, rs1_val == 18446744073709549567, imm_val == 2016 +// opcode: prefetch.w ; op1:x13; dest:x10; op1val:0xfffffffffffff7ff; immval:0x7e0 +TEST_PREFETCH(x15,x13,prefetch.w,0x7e0) + +inst_14: +// rs1==x1, rs1_val == 18446744073709547519, +// opcode: prefetch.w ; op1:x1; dest:x10; op1val:0xffffffffffffefff; immval:0xe0 +TEST_PREFETCH(x15,x1,prefetch.w,0xe0) + +inst_15: +// rs1==x29, rs1_val == 18446744073709543423, imm_val == -64 +// opcode: prefetch.w ; op1:x29; dest:x10; op1val:0xffffffffffffdfff; immval:-0x40 +TEST_PREFETCH(x15,x29,prefetch.w,-0x40) + +inst_16: +// rs1==x8, rs1_val == 18446744073709535231, +// opcode: prefetch.w ; op1:x8; dest:x10; op1val:0xffffffffffffbfff; immval:0x120 +TEST_PREFETCH(x15,x8,prefetch.w,0x120) + +inst_17: +// rs1==x25, rs1_val == 18446744073709518847, imm_val == 512 +// opcode: prefetch.w ; op1:x25; dest:x10; op1val:0xffffffffffff7fff; immval:0x200 +TEST_PREFETCH(x15,x25,prefetch.w,0x200) + +inst_18: +// rs1==x11, rs1_val == 18446744073709486079, +// opcode: prefetch.w ; op1:x11; dest:x10; op1val:0xfffffffffffeffff; immval:0x0 +TEST_PREFETCH(x15,x11,prefetch.w,0x0) + +inst_19: +// rs1==x14, rs1_val == 18446744073709420543, +// opcode: prefetch.w ; op1:x14; dest:x10; op1val:0xfffffffffffdffff; immval:0x20 +TEST_PREFETCH(x15,x14,prefetch.w,0x20) + +inst_20: +// rs1==x21, rs1_val == 18446744073709289471, +// opcode: prefetch.w ; op1:x21; dest:x10; op1val:0xfffffffffffbffff; immval:0xe0 +TEST_PREFETCH(x15,x21,prefetch.w,0xe0) + +inst_21: +// rs1==x16, rs1_val == 18446744073709027327, +// opcode: prefetch.w ; op1:x16; dest:x10; op1val:0xfffffffffff7ffff; immval:0x400 +TEST_PREFETCH(x15,x16,prefetch.w,0x400) + +inst_22: +// rs1==x19, rs1_val == 18446744073708503039, +// opcode: prefetch.w ; op1:x19; dest:x10; op1val:0xffffffffffefffff; immval:0x120 +TEST_PREFETCH(x15,x19,prefetch.w,0x120) + +inst_23: +// rs1==x24, rs1_val == 18446744073705357311, +// opcode: prefetch.w ; op1:x24; dest:x10; op1val:0xffffffffffbfffff; immval:0x3e0 +TEST_PREFETCH(x15,x24,prefetch.w,0x3e0) + +inst_24: +// rs1==x23, rs1_val == 18446744073701163007, +// opcode: prefetch.w ; op1:x23; dest:x10; op1val:0xffffffffff7fffff; immval:0x120 +TEST_PREFETCH(x15,x23,prefetch.w,0x120) + +inst_25: +// rs1==x18, rs1_val == 18446744073692774399, +// opcode: prefetch.w ; op1:x18; dest:x10; op1val:0xfffffffffeffffff; immval:0x3e0 +TEST_PREFETCH(x15,x18,prefetch.w,0x3e0) + +inst_26: +// rs1==x20, rs1_val == 18446744073675997183, +// opcode: prefetch.w ; op1:x20; dest:x10; op1val:0xfffffffffdffffff; immval:-0x20 +TEST_PREFETCH(x15,x20,prefetch.w,-0x20) +RVTEST_SIGBASE(x1,signature_x1_0) + +inst_27: +// rs1==x15, rs1_val == 18446744073642442751, +// opcode: prefetch.w ; op1:x15; dest:x10; op1val:0xfffffffffbffffff; immval:0x3e0 +TEST_PREFETCH(x1,x15,prefetch.w,0x3e0) + +inst_28: +// rs1==x26, rs1_val == 18446744073575333887, imm_val == -160 +// opcode: prefetch.w ; op1:x26; dest:x10; op1val:0xfffffffff7ffffff; immval:-0xa0 +TEST_PREFETCH(x1,x26,prefetch.w,-0xa0) + +inst_29: +// rs1==x31, rs1_val == 18446744073441116159, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffffefffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_30: +// rs1==x22, rs1_val == 18446744073172680703, +// opcode: prefetch.w ; op1:x22; dest:x10; op1val:0xffffffffdfffffff; immval:0xa0 +TEST_PREFETCH(x1,x22,prefetch.w,0xa0) + +inst_31: +// rs1==x10, rs1_val == 18446744072635809791, +// opcode: prefetch.w ; op1:x10; dest:x10; op1val:0xffffffffbfffffff; immval:0x20 +TEST_PREFETCH(x1,x10,prefetch.w,0x20) + +inst_32: +// rs1_val == 18446744071562067967, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffff7fffffff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_33: +// rs1_val == 18446744069414584319, imm_val == -288 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffffeffffffff; immval:-0x120 +TEST_PREFETCH(x1,x31,prefetch.w,-0x120) + +inst_34: +// rs1_val == 18446744065119617023, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffffdffffffff; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.w,0x400) + +inst_35: +// rs1_val == 18446744056529682431, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffffbffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_36: +// rs1_val == 18446744039349813247, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffff7ffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x3e0) + +inst_37: +// rs1_val == 18446744004990074879, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffefffffffff; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.w,0x400) + +inst_38: +// rs1_val == 18446743936270598143, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffdfffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,0xe0) + +inst_39: +// rs1_val == 18446743798831644671, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffbfffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x3e0) + +inst_40: +// rs1_val == 18446743523953737727, imm_val == 64 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffff7fffffffff; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.w,0x40) + +inst_41: +// rs1_val == 18446742974197923839, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffeffffffffff; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.w,-0x100) + +inst_42: +// rs1_val == 18446741874686296063, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffdffffffffff; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.w,-0x40) + +inst_43: +// rs1_val == 18446739675663040511, imm_val == 128 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffbffffffffff; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.w,0x80) + +inst_44: +// rs1_val == 18446735277616529407, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffff7ffffffffff; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,0xe0) + +inst_45: +// rs1_val == 18446726481523507199, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffefffffffffff; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.w,0x540) + +inst_46: +// rs1_val == 18446708889337462783, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffdfffffffffff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_47: +// rs1_val == 18446673704965373951, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffbfffffffffff; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_48: +// rs1_val == 18446603336221196287, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffff7fffffffffff; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.w,0x20) + +inst_49: +// rs1_val == 18446462598732840959, imm_val == -1376 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffeffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_50: +// rs1_val == 18446181123756130303, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffdffffffffffff; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_51: +// rs1_val == 18445618173802708991, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffbffffffffffff; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,0xc0) + +inst_52: +// rs1_val == 18444492273895866367, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfff7ffffffffffff; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_53: +// rs1_val == 18442240474082181119, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffefffffffffffff; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_54: +// rs1_val == 18437736874454810623, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffdfffffffffffff; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.w,-0x140) + +inst_55: +// rs1_val == 18428729675200069631, imm_val == -2048 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffbfffffffffffff; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.w,-0x800) + +inst_56: +// rs1_val == 18410715276690587647, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xff7fffffffffffff; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xa0) + +inst_57: +// rs1_val == 18374686479671623679, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfeffffffffffffff; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_58: +// rs1_val == 18302628885633695743, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfdffffffffffffff; immval:-0x140 +TEST_PREFETCH(x1,x31,prefetch.w,-0x140) + +inst_59: +// rs1_val == 18158513697557839871, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfbffffffffffffff; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.w,-0x40) + +inst_60: +// rs1_val == 17870283321406128127, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xf7ffffffffffffff; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_61: +// rs1_val == 17293822569102704639, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xefffffffffffffff; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x3e0) + +inst_62: +// rs1_val == 16140901064495857663, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xdfffffffffffffff; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_63: +// rs1_val == 13835058055282163711, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xbfffffffffffffff; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.w,0x120) + +inst_64: +// rs1_val == 9223372036854775807, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x7fffffffffffffff; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.w,0x60) + +inst_65: +// imm_val == -96, rs1_val == 536870912 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20000000; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.w,-0x60) + +inst_66: +// imm_val == -544, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffefffffffffff; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.w,-0x220) + +inst_67: +// imm_val == -1056, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x12; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.w,-0x420) + +inst_68: +// rs1_val == 1, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_69: +// rs1_val == 2, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.w,-0x60) + +inst_70: +// rs1_val == 4, rs1_val < imm_val and rs1_val != 0 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.w,0x200) + +inst_71: +// rs1_val == 8, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.w,0x40) + +inst_72: +// rs1_val == 9007199254740992, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_73: +// rs1_val == 18014398509481984, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40000000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.w,0x80) + +inst_74: +// rs1_val == 36028797018963968, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80000000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.w,0x80) + +inst_75: +// rs1_val == 72057594037927936, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100000000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_76: +// rs1_val == 144115188075855872, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200000000000000; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.w,0x400) + +inst_77: +// rs1_val == 288230376151711744, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400000000000000; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.w,-0x220) + +inst_78: +// rs1_val == 576460752303423488, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800000000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xc0) + +inst_79: +// rs1_val == 1152921504606846976, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000000000000000; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,0xe0) + +inst_80: +// rs1_val == 2305843009213693952, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2000000000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_81: +// rs1_val == 4611686018427387904, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000000000000000; immval:-0x60 +TEST_PREFETCH(x1,x31,prefetch.w,-0x60) + +inst_82: +// rs1_val == 9223372036854775808, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000000000000000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_83: +// rs1_val == 6148914691236517205, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x5555555555555555; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.w,-0x100) + +inst_84: +// rs1_val == 12297829382473034410, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xaaaaaaaaaaaaaaaa; immval:0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,0xe0) + +inst_85: +// rs1_val == (2**(xlen)-1), +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xffffffffffffffff; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.w,0x60) + +inst_86: +// rs1_val == 0, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x0; immval:0x3e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x3e0) + +inst_87: +// rs1_val == imm_val and rs1_val == 0, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x0; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_88: +// rs1_val == 16, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10; immval:0x7e0 +TEST_PREFETCH(x1,x31,prefetch.w,0x7e0) + +inst_89: +// rs1_val == 32, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xc0) + +inst_90: +// rs1_val == 64, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_91: +// rs1_val == 128, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.w,0x120) + +inst_92: +// rs1_val == 256, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.w,0x20) + +inst_93: +// rs1_val == 512, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.w,0x200) + +inst_94: +// rs1_val == 1024, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_95: +// rs1_val == 2048, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800; immval:-0x220 +TEST_PREFETCH(x1,x31,prefetch.w,-0x220) + +inst_96: +// rs1_val == 4096, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000; immval:-0x800 +TEST_PREFETCH(x1,x31,prefetch.w,-0x800) + +inst_97: +// rs1_val == 8192, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2000; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.w,0x540) + +inst_98: +// rs1_val == 16384, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_99: +// rs1_val == 32768, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_100: +// rs1_val == 65536, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_101: +// rs1_val == 131072, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_102: +// rs1_val == 262144, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40000; immval:0x40 +TEST_PREFETCH(x1,x31,prefetch.w,0x40) + +inst_103: +// rs1_val == 524288, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_104: +// rs1_val == 1048576, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.w,0x100) + +inst_105: +// rs1_val == 2097152, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_106: +// rs1_val == 4194304, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400000; immval:-0x40 +TEST_PREFETCH(x1,x31,prefetch.w,-0x40) + +inst_107: +// rs1_val == 8388608, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_108: +// rs1_val == 16777216, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_109: +// rs1_val == 33554432, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2000000; immval:0x60 +TEST_PREFETCH(x1,x31,prefetch.w,0x60) + +inst_110: +// rs1_val == 67108864, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000000; immval:-0x420 +TEST_PREFETCH(x1,x31,prefetch.w,-0x420) + +inst_111: +// rs1_val == 134217728, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_112: +// rs1_val == 268435456, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10000000; immval:-0x560 +TEST_PREFETCH(x1,x31,prefetch.w,-0x560) + +inst_113: +// rs1_val == 1073741824, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.w,0x100) + +inst_114: +// rs1_val == 2147483648, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80000000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.w,0xa0) + +inst_115: +// rs1_val == 4294967296, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100000000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.w,0x20) + +inst_116: +// rs1_val == 8589934592, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200000000; immval:-0x400 +TEST_PREFETCH(x1,x31,prefetch.w,-0x400) + +inst_117: +// rs1_val == 17179869184, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400000000; immval:0x400 +TEST_PREFETCH(x1,x31,prefetch.w,0x400) + +inst_118: +// rs1_val == 34359738368, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800000000; immval:0x20 +TEST_PREFETCH(x1,x31,prefetch.w,0x20) + +inst_119: +// rs1_val == 68719476736, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.w,0x200) + +inst_120: +// rs1_val == 274877906944, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000000000; immval:-0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xc0) + +inst_121: +// rs1_val == 549755813888, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_122: +// rs1_val == 1099511627776, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10000000000; immval:0x80 +TEST_PREFETCH(x1,x31,prefetch.w,0x80) + +inst_123: +// rs1_val == 2199023255552, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x20000000000; immval:0x120 +TEST_PREFETCH(x1,x31,prefetch.w,0x120) + +inst_124: +// rs1_val == 4398046511104, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x40000000000; immval:0x100 +TEST_PREFETCH(x1,x31,prefetch.w,0x100) + +inst_125: +// rs1_val == 8796093022208, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x80000000000; immval:-0xa0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xa0) + +inst_126: +// rs1_val == 17592186044416, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x100000000000; immval:0x0 +TEST_PREFETCH(x1,x31,prefetch.w,0x0) + +inst_127: +// rs1_val == 35184372088832, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x200000000000; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.w,-0x100) + +inst_128: +// rs1_val == 70368744177664, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x400000000000; immval:-0x20 +TEST_PREFETCH(x1,x31,prefetch.w,-0x20) + +inst_129: +// rs1_val == 140737488355328, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x800000000000; immval:-0x100 +TEST_PREFETCH(x1,x31,prefetch.w,-0x100) + +inst_130: +// rs1_val == 281474976710656, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x1000000000000; immval:0x200 +TEST_PREFETCH(x1,x31,prefetch.w,0x200) + +inst_131: +// rs1_val == 562949953421312, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x2000000000000; immval:-0x80 +TEST_PREFETCH(x1,x31,prefetch.w,-0x80) + +inst_132: +// rs1_val == 1125899906842624, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x4000000000000; immval:0xa0 +TEST_PREFETCH(x1,x31,prefetch.w,0xa0) + +inst_133: +// rs1_val == 2251799813685248, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x8000000000000; immval:0xc0 +TEST_PREFETCH(x1,x31,prefetch.w,0xc0) + +inst_134: +// rs1_val == 4503599627370496, +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0x10000000000000; immval:-0xe0 +TEST_PREFETCH(x1,x31,prefetch.w,-0xe0) + +inst_135: +// rs1_val == 18446744073709551614, imm_val == 1344 +// opcode: prefetch.w ; op1:x31; dest:x10; op1val:0xfffffffffffffffe; immval:0x540 +TEST_PREFETCH(x1,x31,prefetch.w,0x540) +#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 +rvtest_sig_begin: +sig_begin_canary: +CANARY; + + + +signature_x15_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x15_1: + .fill 27*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_0: + .fill 109*((XLEN/8)/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