From 2466ef1264e93dd0b50b0ae10634aa31e4eb03e5 Mon Sep 17 00:00:00 2001 From: Abdul Wadood Date: Thu, 3 Aug 2023 04:11:50 +0500 Subject: [PATCH 1/4] Add 32-bit arch-tests of Atomic Ext. Signed-off-by: Abdul Wadood --- riscv-test-suite/rv32i_m/A/src/amoadd.w-01.S | 436 ++++++++++++++++++ riscv-test-suite/rv32i_m/A/src/amoand.w-01.S | 436 ++++++++++++++++++ riscv-test-suite/rv32i_m/A/src/amomax.w-01.S | 436 ++++++++++++++++++ riscv-test-suite/rv32i_m/A/src/amomaxu.w-01.S | 436 ++++++++++++++++++ riscv-test-suite/rv32i_m/A/src/amomin.w-01.S | 436 ++++++++++++++++++ riscv-test-suite/rv32i_m/A/src/amominu.w-01.S | 436 ++++++++++++++++++ riscv-test-suite/rv32i_m/A/src/amoor.w-01.S | 436 ++++++++++++++++++ riscv-test-suite/rv32i_m/A/src/amoswap.w-01.S | 436 ++++++++++++++++++ riscv-test-suite/rv32i_m/A/src/amoxor.w-01.S | 436 ++++++++++++++++++ 9 files changed, 3924 insertions(+) create mode 100644 riscv-test-suite/rv32i_m/A/src/amoadd.w-01.S create mode 100644 riscv-test-suite/rv32i_m/A/src/amoand.w-01.S create mode 100644 riscv-test-suite/rv32i_m/A/src/amomax.w-01.S create mode 100644 riscv-test-suite/rv32i_m/A/src/amomaxu.w-01.S create mode 100644 riscv-test-suite/rv32i_m/A/src/amomin.w-01.S create mode 100644 riscv-test-suite/rv32i_m/A/src/amominu.w-01.S create mode 100644 riscv-test-suite/rv32i_m/A/src/amoor.w-01.S create mode 100644 riscv-test-suite/rv32i_m/A/src/amoswap.w-01.S create mode 100644 riscv-test-suite/rv32i_m/A/src/amoxor.w-01.S diff --git a/riscv-test-suite/rv32i_m/A/src/amoadd.w-01.S b/riscv-test-suite/rv32i_m/A/src/amoadd.w-01.S new file mode 100644 index 000000000..feb72d84f --- /dev/null +++ b/riscv-test-suite/rv32i_m/A/src/amoadd.w-01.S @@ -0,0 +1,436 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 02:38:24 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv32ia.cgf \ + \ +// -- xlen 32 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoadd.w instruction of the RISC-V RV32A extension for the amoadd.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV32IA") + +.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.*A.*);def TEST_CASE_1=True;",amoadd.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x31, rs2==x29, rd==x30, rs2_val == (-2**(xlen-1)), rs2_val == -2147483648 +// opcode: amoadd.w ; op1:x31; op2:x29; dest:x30; op1val:0xf7ffffff; op2val:-0x80000000 +TEST_AMO_OP(amoadd.w, x30, x31, x29, 0xf7ffffff, -0x80000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x31, rd==x31, rs2_val == (2**(xlen-1)-1), rs2_val == 2147483647 +// opcode: amoadd.w ; op1:x30; op2:x31; dest:x31; op1val:0xf7ffffff; op2val:0x7fffffff +TEST_AMO_OP(amoadd.w, x31, x30, x31, 0xf7ffffff, 0x7fffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 == rd != rs2, rs1==x29, rs2==x30, rd==x29, rs2_val == 0, +// opcode: amoadd.w ; op1:x29; op2:x30; dest:x29; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoadd.w, x29, x29, x30, 0xf7ffffff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoadd.w ; op1:x28; op2:x26; dest:x27; op1val:0xf7ffffff; op2val:0x1 +TEST_AMO_OP(amoadd.w, x27, x28, x26, 0xf7ffffff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 1431655765, +// opcode: amoadd.w ; op1:x27; op2:x28; dest:x26; op1val:0xf7ffffff; op2val:0x55555555 +TEST_AMO_OP(amoadd.w, x26, x27, x28, 0xf7ffffff, 0x55555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -1431655766, +// opcode: amoadd.w ; op1:x26; op2:x27; dest:x28; op1val:0xf7ffffff; op2val:-0x55555556 +TEST_AMO_OP(amoadd.w, x28, x26, x27, 0xf7ffffff, -0x55555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoadd.w ; op1:x25; op2:x23; dest:x24; op1val:0xf7ffffff; op2val:0x2 +TEST_AMO_OP(amoadd.w, x24, x25, x23, 0xf7ffffff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoadd.w ; op1:x24; op2:x25; dest:x23; op1val:0xf7ffffff; op2val:-0x2 +TEST_AMO_OP(amoadd.w, x23, x24, x25, 0xf7ffffff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoadd.w ; op1:x23; op2:x24; dest:x25; op1val:0xf7ffffff; op2val:-0x3 +TEST_AMO_OP(amoadd.w, x25, x23, x24, 0xf7ffffff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoadd.w ; op1:x22; op2:x20; dest:x21; op1val:0xf7ffffff; op2val:-0x5 +TEST_AMO_OP(amoadd.w, x21, x22, x20, 0xf7ffffff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoadd.w ; op1:x21; op2:x22; dest:x20; op1val:0xf7ffffff; op2val:-0x9 +TEST_AMO_OP(amoadd.w, x20, x21, x22, 0xf7ffffff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoadd.w ; op1:x20; op2:x21; dest:x22; op1val:0xf7ffffff; op2val:-0x11 +TEST_AMO_OP(amoadd.w, x22, x20, x21, 0xf7ffffff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoadd.w ; op1:x19; op2:x17; dest:x18; op1val:0xf7ffffff; op2val:-0x21 +TEST_AMO_OP(amoadd.w, x18, x19, x17, 0xf7ffffff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoadd.w ; op1:x18; op2:x19; dest:x17; op1val:0xf7ffffff; op2val:-0x41 +TEST_AMO_OP(amoadd.w, x17, x18, x19, 0xf7ffffff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoadd.w ; op1:x17; op2:x18; dest:x19; op1val:0xf7ffffff; op2val:-0x81 +TEST_AMO_OP(amoadd.w, x19, x17, x18, 0xf7ffffff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoadd.w ; op1:x16; op2:x14; dest:x15; op1val:0xf7ffffff; op2val:-0x101 +TEST_AMO_OP(amoadd.w, x15, x16, x14, 0xf7ffffff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoadd.w ; op1:x15; op2:x16; dest:x14; op1val:0xf7ffffff; op2val:-0x201 +TEST_AMO_OP(amoadd.w, x14, x15, x16, 0xf7ffffff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoadd.w ; op1:x14; op2:x15; dest:x16; op1val:0xf7ffffff; op2val:-0x401 +TEST_AMO_OP(amoadd.w, x16, x14, x15, 0xf7ffffff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoadd.w ; op1:x13; op2:x11; dest:x12; op1val:0xf7ffffff; op2val:-0x801 +TEST_AMO_OP(amoadd.w, x12, x13, x11, 0xf7ffffff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoadd.w ; op1:x12; op2:x13; dest:x11; op1val:0xf7ffffff; op2val:-0x1001 +TEST_AMO_OP(amoadd.w, x11, x12, x13, 0xf7ffffff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoadd.w ; op1:x11; op2:x12; dest:x13; op1val:0xf7ffffff; op2val:-0x2001 +TEST_AMO_OP(amoadd.w, x13, x11, x12, 0xf7ffffff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoadd.w ; op1:x10; op2:x8; dest:x9; op1val:0xf7ffffff; op2val:-0x4001 +TEST_AMO_OP(amoadd.w, x9, x10, x8, 0xf7ffffff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoadd.w ; op1:x9; op2:x10; dest:x8; op1val:0xf7ffffff; op2val:-0x8001 +TEST_AMO_OP(amoadd.w, x8, x9, x10, 0xf7ffffff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoadd.w ; op1:x8; op2:x9; dest:x10; op1val:0xf7ffffff; op2val:-0x10001 +TEST_AMO_OP(amoadd.w, x10, x8, x9, 0xf7ffffff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoadd.w ; op1:x7; op2:x5; dest:x6; op1val:0xf7ffffff; op2val:-0x20001 +TEST_AMO_OP(amoadd.w, x6, x7, x5, 0xf7ffffff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoadd.w ; op1:x6; op2:x7; dest:x5; op1val:0xf7ffffff; op2val:-0x40001 +TEST_AMO_OP(amoadd.w, x5, x6, x7, 0xf7ffffff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoadd.w ; op1:x5; op2:x6; dest:x7; op1val:0xf7ffffff; op2val:-0x80001 +TEST_AMO_OP(amoadd.w, x7, x5, x6, 0xf7ffffff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoadd.w ; op1:x4; op2:x2; dest:x3; op1val:0xf7ffffff; op2val:-0x100001 +TEST_AMO_OP(amoadd.w, x3, x4, x2, 0xf7ffffff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoadd.w ; op1:x3; op2:x4; dest:x2; op1val:0xf7ffffff; op2val:-0x200001 +TEST_AMO_OP(amoadd.w, x2, x3, x4, 0xf7ffffff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoadd.w ; op1:x2; op2:x3; dest:x4; op1val:0xf7ffffff; op2val:-0x400001 +TEST_AMO_OP(amoadd.w, x4, x2, x3, 0xf7ffffff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoadd.w ; op1:x1; op2:x30; dest:x31; op1val:0xf7ffffff; op2val:-0x800001 +TEST_AMO_OP(amoadd.w, x31, x1, x30, 0xf7ffffff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoadd.w ; op1:x30; op2:x1; dest:x31; op1val:0xf7ffffff; op2val:-0x1000001 +TEST_AMO_OP(amoadd.w, x31, x30, x1, 0xf7ffffff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoadd.w ; op1:x30; op2:x0; dest:x31; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoadd.w, x31, x30, x0, 0xf7ffffff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoadd.w ; op1:x31; op2:x30; dest:x1; op1val:0xf7ffffff; op2val:-0x4000001 +TEST_AMO_OP(amoadd.w, x1, x31, x30, 0xf7ffffff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoadd.w ; op1:x31; op2:x30; dest:x0; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoadd.w, x0, x31, x30, 0xf7ffffff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x10000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == 134217728, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x8000000, x8, 22*XLEN/8) + +inst_37: +// rs2_val == 268435456, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x10000000, x8, 24*XLEN/8) + +inst_38: +// rs2_val == 536870912, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x20000000, x8, 26*XLEN/8) + +inst_39: +// rs2_val == 1073741824, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x40000000, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -536870913, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x20000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, -0x20000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -1073741825, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x40000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, -0x40000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == 4, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x4, x8, 34*XLEN/8) + +inst_43: +// rs2_val == 8, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x8, x8, 36*XLEN/8) + +inst_44: +// rs2_val == 16, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x10, x8, 38*XLEN/8) + +inst_45: +// rs2_val == 32, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x20, x8, 40*XLEN/8) + +inst_46: +// rs2_val == 64, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x40, x8, 42*XLEN/8) + +inst_47: +// rs2_val == 128, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x80, x8, 44*XLEN/8) + +inst_48: +// rs2_val == 256, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x100, x8, 46*XLEN/8) + +inst_49: +// rs2_val == 512, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x200, x8, 48*XLEN/8) + +inst_50: +// rs2_val == 1024, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x400, x8, 50*XLEN/8) + +inst_51: +// rs2_val == 2048, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x800, x8, 52*XLEN/8) + +inst_52: +// rs2_val == 4096, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x1000, x8, 54*XLEN/8) + +inst_53: +// rs2_val == 8192, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x2000, x8, 56*XLEN/8) + +inst_54: +// rs2_val == 16384, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x4000, x8, 58*XLEN/8) + +inst_55: +// rs2_val == 32768, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x8000, x8, 60*XLEN/8) + +inst_56: +// rs2_val == 65536, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x10000, x8, 62*XLEN/8) + +inst_57: +// rs2_val == 131072, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x20000, x8, 64*XLEN/8) + +inst_58: +// rs2_val == 262144, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x40000, x8, 66*XLEN/8) + +inst_59: +// rs2_val == 524288, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x80000, x8, 68*XLEN/8) + +inst_60: +// rs2_val == 1048576, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x100000, x8, 70*XLEN/8) + +inst_61: +// rs2_val == 2097152, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x200000, x8, 72*XLEN/8) + +inst_62: +// rs2_val == 4194304, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x400000, x8, 74*XLEN/8) + +inst_63: +// rs2_val == 8388608, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x800000, x8, 76*XLEN/8) + +inst_64: +// rs2_val == 16777216, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x1000000, x8, 78*XLEN/8) + +inst_65: +// rs2_val == 33554432, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x2000000, x8, 80*XLEN/8) + +inst_66: +// rs2_val == 67108864, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, 0x4000000, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -33554433, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x2000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, -0x2000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == -134217729, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xf7ffffff, -0x8000001, x8, 86*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 88*((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/rv32i_m/A/src/amoand.w-01.S b/riscv-test-suite/rv32i_m/A/src/amoand.w-01.S new file mode 100644 index 000000000..d48be3713 --- /dev/null +++ b/riscv-test-suite/rv32i_m/A/src/amoand.w-01.S @@ -0,0 +1,436 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 02:38:24 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv32ia.cgf \ + \ +// -- xlen 32 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoand.w instruction of the RISC-V RV32A extension for the amoand.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV32IA") + +.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.*A.*);def TEST_CASE_1=True;",amoand.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x31, rs2==x29, rd==x30, rs2_val == (-2**(xlen-1)), rs2_val == -2147483648 +// opcode: amoand.w ; op1:x31; op2:x29; dest:x30; op1val:0xf7ffffff; op2val:-0x80000000 +TEST_AMO_OP(amoand.w, x30, x31, x29, 0xf7ffffff, -0x80000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x31, rd==x31, rs2_val == (2**(xlen-1)-1), rs2_val == 2147483647 +// opcode: amoand.w ; op1:x30; op2:x31; dest:x31; op1val:0xf7ffffff; op2val:0x7fffffff +TEST_AMO_OP(amoand.w, x31, x30, x31, 0xf7ffffff, 0x7fffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 == rd != rs2, rs1==x29, rs2==x30, rd==x29, rs2_val == 0, +// opcode: amoand.w ; op1:x29; op2:x30; dest:x29; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoand.w, x29, x29, x30, 0xf7ffffff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoand.w ; op1:x28; op2:x26; dest:x27; op1val:0xf7ffffff; op2val:0x1 +TEST_AMO_OP(amoand.w, x27, x28, x26, 0xf7ffffff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 1431655765, +// opcode: amoand.w ; op1:x27; op2:x28; dest:x26; op1val:0xf7ffffff; op2val:0x55555555 +TEST_AMO_OP(amoand.w, x26, x27, x28, 0xf7ffffff, 0x55555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -1431655766, +// opcode: amoand.w ; op1:x26; op2:x27; dest:x28; op1val:0xf7ffffff; op2val:-0x55555556 +TEST_AMO_OP(amoand.w, x28, x26, x27, 0xf7ffffff, -0x55555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoand.w ; op1:x25; op2:x23; dest:x24; op1val:0xf7ffffff; op2val:0x2 +TEST_AMO_OP(amoand.w, x24, x25, x23, 0xf7ffffff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoand.w ; op1:x24; op2:x25; dest:x23; op1val:0xf7ffffff; op2val:-0x2 +TEST_AMO_OP(amoand.w, x23, x24, x25, 0xf7ffffff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoand.w ; op1:x23; op2:x24; dest:x25; op1val:0xf7ffffff; op2val:-0x3 +TEST_AMO_OP(amoand.w, x25, x23, x24, 0xf7ffffff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoand.w ; op1:x22; op2:x20; dest:x21; op1val:0xf7ffffff; op2val:-0x5 +TEST_AMO_OP(amoand.w, x21, x22, x20, 0xf7ffffff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoand.w ; op1:x21; op2:x22; dest:x20; op1val:0xf7ffffff; op2val:-0x9 +TEST_AMO_OP(amoand.w, x20, x21, x22, 0xf7ffffff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoand.w ; op1:x20; op2:x21; dest:x22; op1val:0xf7ffffff; op2val:-0x11 +TEST_AMO_OP(amoand.w, x22, x20, x21, 0xf7ffffff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoand.w ; op1:x19; op2:x17; dest:x18; op1val:0xf7ffffff; op2val:-0x21 +TEST_AMO_OP(amoand.w, x18, x19, x17, 0xf7ffffff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoand.w ; op1:x18; op2:x19; dest:x17; op1val:0xf7ffffff; op2val:-0x41 +TEST_AMO_OP(amoand.w, x17, x18, x19, 0xf7ffffff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoand.w ; op1:x17; op2:x18; dest:x19; op1val:0xf7ffffff; op2val:-0x81 +TEST_AMO_OP(amoand.w, x19, x17, x18, 0xf7ffffff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoand.w ; op1:x16; op2:x14; dest:x15; op1val:0xf7ffffff; op2val:-0x101 +TEST_AMO_OP(amoand.w, x15, x16, x14, 0xf7ffffff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoand.w ; op1:x15; op2:x16; dest:x14; op1val:0xf7ffffff; op2val:-0x201 +TEST_AMO_OP(amoand.w, x14, x15, x16, 0xf7ffffff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoand.w ; op1:x14; op2:x15; dest:x16; op1val:0xf7ffffff; op2val:-0x401 +TEST_AMO_OP(amoand.w, x16, x14, x15, 0xf7ffffff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoand.w ; op1:x13; op2:x11; dest:x12; op1val:0xf7ffffff; op2val:-0x801 +TEST_AMO_OP(amoand.w, x12, x13, x11, 0xf7ffffff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoand.w ; op1:x12; op2:x13; dest:x11; op1val:0xf7ffffff; op2val:-0x1001 +TEST_AMO_OP(amoand.w, x11, x12, x13, 0xf7ffffff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoand.w ; op1:x11; op2:x12; dest:x13; op1val:0xf7ffffff; op2val:-0x2001 +TEST_AMO_OP(amoand.w, x13, x11, x12, 0xf7ffffff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoand.w ; op1:x10; op2:x8; dest:x9; op1val:0xf7ffffff; op2val:-0x4001 +TEST_AMO_OP(amoand.w, x9, x10, x8, 0xf7ffffff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoand.w ; op1:x9; op2:x10; dest:x8; op1val:0xf7ffffff; op2val:-0x8001 +TEST_AMO_OP(amoand.w, x8, x9, x10, 0xf7ffffff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoand.w ; op1:x8; op2:x9; dest:x10; op1val:0xf7ffffff; op2val:-0x10001 +TEST_AMO_OP(amoand.w, x10, x8, x9, 0xf7ffffff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoand.w ; op1:x7; op2:x5; dest:x6; op1val:0xf7ffffff; op2val:-0x20001 +TEST_AMO_OP(amoand.w, x6, x7, x5, 0xf7ffffff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoand.w ; op1:x6; op2:x7; dest:x5; op1val:0xf7ffffff; op2val:-0x40001 +TEST_AMO_OP(amoand.w, x5, x6, x7, 0xf7ffffff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoand.w ; op1:x5; op2:x6; dest:x7; op1val:0xf7ffffff; op2val:-0x80001 +TEST_AMO_OP(amoand.w, x7, x5, x6, 0xf7ffffff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoand.w ; op1:x4; op2:x2; dest:x3; op1val:0xf7ffffff; op2val:-0x100001 +TEST_AMO_OP(amoand.w, x3, x4, x2, 0xf7ffffff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoand.w ; op1:x3; op2:x4; dest:x2; op1val:0xf7ffffff; op2val:-0x200001 +TEST_AMO_OP(amoand.w, x2, x3, x4, 0xf7ffffff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoand.w ; op1:x2; op2:x3; dest:x4; op1val:0xf7ffffff; op2val:-0x400001 +TEST_AMO_OP(amoand.w, x4, x2, x3, 0xf7ffffff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoand.w ; op1:x1; op2:x30; dest:x31; op1val:0xf7ffffff; op2val:-0x800001 +TEST_AMO_OP(amoand.w, x31, x1, x30, 0xf7ffffff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoand.w ; op1:x30; op2:x1; dest:x31; op1val:0xf7ffffff; op2val:-0x1000001 +TEST_AMO_OP(amoand.w, x31, x30, x1, 0xf7ffffff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoand.w ; op1:x30; op2:x0; dest:x31; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoand.w, x31, x30, x0, 0xf7ffffff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoand.w ; op1:x31; op2:x30; dest:x1; op1val:0xf7ffffff; op2val:-0x4000001 +TEST_AMO_OP(amoand.w, x1, x31, x30, 0xf7ffffff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoand.w ; op1:x31; op2:x30; dest:x0; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoand.w, x0, x31, x30, 0xf7ffffff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x10000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == 134217728, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x8000000, x8, 22*XLEN/8) + +inst_37: +// rs2_val == 268435456, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x10000000, x8, 24*XLEN/8) + +inst_38: +// rs2_val == 536870912, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x20000000, x8, 26*XLEN/8) + +inst_39: +// rs2_val == 1073741824, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x40000000, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -536870913, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x20000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, -0x20000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -1073741825, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x40000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, -0x40000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == 4, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x4, x8, 34*XLEN/8) + +inst_43: +// rs2_val == 8, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x8, x8, 36*XLEN/8) + +inst_44: +// rs2_val == 16, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x10, x8, 38*XLEN/8) + +inst_45: +// rs2_val == 32, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x20, x8, 40*XLEN/8) + +inst_46: +// rs2_val == 64, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x40, x8, 42*XLEN/8) + +inst_47: +// rs2_val == 128, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x80, x8, 44*XLEN/8) + +inst_48: +// rs2_val == 256, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x100, x8, 46*XLEN/8) + +inst_49: +// rs2_val == 512, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x200, x8, 48*XLEN/8) + +inst_50: +// rs2_val == 1024, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x400, x8, 50*XLEN/8) + +inst_51: +// rs2_val == 2048, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x800, x8, 52*XLEN/8) + +inst_52: +// rs2_val == 4096, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x1000, x8, 54*XLEN/8) + +inst_53: +// rs2_val == 8192, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x2000, x8, 56*XLEN/8) + +inst_54: +// rs2_val == 16384, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x4000, x8, 58*XLEN/8) + +inst_55: +// rs2_val == 32768, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x8000, x8, 60*XLEN/8) + +inst_56: +// rs2_val == 65536, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x10000, x8, 62*XLEN/8) + +inst_57: +// rs2_val == 131072, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x20000, x8, 64*XLEN/8) + +inst_58: +// rs2_val == 262144, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x40000, x8, 66*XLEN/8) + +inst_59: +// rs2_val == 524288, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x80000, x8, 68*XLEN/8) + +inst_60: +// rs2_val == 1048576, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x100000, x8, 70*XLEN/8) + +inst_61: +// rs2_val == 2097152, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x200000, x8, 72*XLEN/8) + +inst_62: +// rs2_val == 4194304, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x400000, x8, 74*XLEN/8) + +inst_63: +// rs2_val == 8388608, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x800000, x8, 76*XLEN/8) + +inst_64: +// rs2_val == 16777216, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x1000000, x8, 78*XLEN/8) + +inst_65: +// rs2_val == 33554432, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x2000000, x8, 80*XLEN/8) + +inst_66: +// rs2_val == 67108864, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, 0x4000000, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -33554433, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x2000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, -0x2000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == -134217729, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xf7ffffff, -0x8000001, x8, 86*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 88*((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/rv32i_m/A/src/amomax.w-01.S b/riscv-test-suite/rv32i_m/A/src/amomax.w-01.S new file mode 100644 index 000000000..3c8342544 --- /dev/null +++ b/riscv-test-suite/rv32i_m/A/src/amomax.w-01.S @@ -0,0 +1,436 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 02:38:24 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv32ia.cgf \ + \ +// -- xlen 32 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amomax.w instruction of the RISC-V RV32A extension for the amomax.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV32IA") + +.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.*A.*);def TEST_CASE_1=True;",amomax.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x31, rs2==x29, rd==x30, rs2_val == (-2**(xlen-1)), rs2_val == -2147483648 +// opcode: amomax.w ; op1:x31; op2:x29; dest:x30; op1val:0xf7ffffff; op2val:-0x80000000 +TEST_AMO_OP(amomax.w, x30, x31, x29, 0xf7ffffff, -0x80000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x31, rd==x31, rs2_val == (2**(xlen-1)-1), rs2_val == 2147483647 +// opcode: amomax.w ; op1:x30; op2:x31; dest:x31; op1val:0xf7ffffff; op2val:0x7fffffff +TEST_AMO_OP(amomax.w, x31, x30, x31, 0xf7ffffff, 0x7fffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 == rd != rs2, rs1==x29, rs2==x30, rd==x29, rs2_val == 0, +// opcode: amomax.w ; op1:x29; op2:x30; dest:x29; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amomax.w, x29, x29, x30, 0xf7ffffff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amomax.w ; op1:x28; op2:x26; dest:x27; op1val:0xf7ffffff; op2val:0x1 +TEST_AMO_OP(amomax.w, x27, x28, x26, 0xf7ffffff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 1431655765, +// opcode: amomax.w ; op1:x27; op2:x28; dest:x26; op1val:0xf7ffffff; op2val:0x55555555 +TEST_AMO_OP(amomax.w, x26, x27, x28, 0xf7ffffff, 0x55555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -1431655766, +// opcode: amomax.w ; op1:x26; op2:x27; dest:x28; op1val:0xf7ffffff; op2val:-0x55555556 +TEST_AMO_OP(amomax.w, x28, x26, x27, 0xf7ffffff, -0x55555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amomax.w ; op1:x25; op2:x23; dest:x24; op1val:0xf7ffffff; op2val:0x2 +TEST_AMO_OP(amomax.w, x24, x25, x23, 0xf7ffffff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amomax.w ; op1:x24; op2:x25; dest:x23; op1val:0xf7ffffff; op2val:-0x2 +TEST_AMO_OP(amomax.w, x23, x24, x25, 0xf7ffffff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amomax.w ; op1:x23; op2:x24; dest:x25; op1val:0xf7ffffff; op2val:-0x3 +TEST_AMO_OP(amomax.w, x25, x23, x24, 0xf7ffffff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amomax.w ; op1:x22; op2:x20; dest:x21; op1val:0xf7ffffff; op2val:-0x5 +TEST_AMO_OP(amomax.w, x21, x22, x20, 0xf7ffffff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amomax.w ; op1:x21; op2:x22; dest:x20; op1val:0xf7ffffff; op2val:-0x9 +TEST_AMO_OP(amomax.w, x20, x21, x22, 0xf7ffffff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amomax.w ; op1:x20; op2:x21; dest:x22; op1val:0xf7ffffff; op2val:-0x11 +TEST_AMO_OP(amomax.w, x22, x20, x21, 0xf7ffffff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amomax.w ; op1:x19; op2:x17; dest:x18; op1val:0xf7ffffff; op2val:-0x21 +TEST_AMO_OP(amomax.w, x18, x19, x17, 0xf7ffffff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amomax.w ; op1:x18; op2:x19; dest:x17; op1val:0xf7ffffff; op2val:-0x41 +TEST_AMO_OP(amomax.w, x17, x18, x19, 0xf7ffffff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amomax.w ; op1:x17; op2:x18; dest:x19; op1val:0xf7ffffff; op2val:-0x81 +TEST_AMO_OP(amomax.w, x19, x17, x18, 0xf7ffffff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amomax.w ; op1:x16; op2:x14; dest:x15; op1val:0xf7ffffff; op2val:-0x101 +TEST_AMO_OP(amomax.w, x15, x16, x14, 0xf7ffffff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amomax.w ; op1:x15; op2:x16; dest:x14; op1val:0xf7ffffff; op2val:-0x201 +TEST_AMO_OP(amomax.w, x14, x15, x16, 0xf7ffffff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amomax.w ; op1:x14; op2:x15; dest:x16; op1val:0xf7ffffff; op2val:-0x401 +TEST_AMO_OP(amomax.w, x16, x14, x15, 0xf7ffffff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amomax.w ; op1:x13; op2:x11; dest:x12; op1val:0xf7ffffff; op2val:-0x801 +TEST_AMO_OP(amomax.w, x12, x13, x11, 0xf7ffffff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amomax.w ; op1:x12; op2:x13; dest:x11; op1val:0xf7ffffff; op2val:-0x1001 +TEST_AMO_OP(amomax.w, x11, x12, x13, 0xf7ffffff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amomax.w ; op1:x11; op2:x12; dest:x13; op1val:0xf7ffffff; op2val:-0x2001 +TEST_AMO_OP(amomax.w, x13, x11, x12, 0xf7ffffff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amomax.w ; op1:x10; op2:x8; dest:x9; op1val:0xf7ffffff; op2val:-0x4001 +TEST_AMO_OP(amomax.w, x9, x10, x8, 0xf7ffffff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amomax.w ; op1:x9; op2:x10; dest:x8; op1val:0xf7ffffff; op2val:-0x8001 +TEST_AMO_OP(amomax.w, x8, x9, x10, 0xf7ffffff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amomax.w ; op1:x8; op2:x9; dest:x10; op1val:0xf7ffffff; op2val:-0x10001 +TEST_AMO_OP(amomax.w, x10, x8, x9, 0xf7ffffff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amomax.w ; op1:x7; op2:x5; dest:x6; op1val:0xf7ffffff; op2val:-0x20001 +TEST_AMO_OP(amomax.w, x6, x7, x5, 0xf7ffffff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amomax.w ; op1:x6; op2:x7; dest:x5; op1val:0xf7ffffff; op2val:-0x40001 +TEST_AMO_OP(amomax.w, x5, x6, x7, 0xf7ffffff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amomax.w ; op1:x5; op2:x6; dest:x7; op1val:0xf7ffffff; op2val:-0x80001 +TEST_AMO_OP(amomax.w, x7, x5, x6, 0xf7ffffff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amomax.w ; op1:x4; op2:x2; dest:x3; op1val:0xf7ffffff; op2val:-0x100001 +TEST_AMO_OP(amomax.w, x3, x4, x2, 0xf7ffffff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amomax.w ; op1:x3; op2:x4; dest:x2; op1val:0xf7ffffff; op2val:-0x200001 +TEST_AMO_OP(amomax.w, x2, x3, x4, 0xf7ffffff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amomax.w ; op1:x2; op2:x3; dest:x4; op1val:0xf7ffffff; op2val:-0x400001 +TEST_AMO_OP(amomax.w, x4, x2, x3, 0xf7ffffff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amomax.w ; op1:x1; op2:x30; dest:x31; op1val:0xf7ffffff; op2val:-0x800001 +TEST_AMO_OP(amomax.w, x31, x1, x30, 0xf7ffffff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amomax.w ; op1:x30; op2:x1; dest:x31; op1val:0xf7ffffff; op2val:-0x1000001 +TEST_AMO_OP(amomax.w, x31, x30, x1, 0xf7ffffff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amomax.w ; op1:x30; op2:x0; dest:x31; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amomax.w, x31, x30, x0, 0xf7ffffff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amomax.w ; op1:x31; op2:x30; dest:x1; op1val:0xf7ffffff; op2val:-0x4000001 +TEST_AMO_OP(amomax.w, x1, x31, x30, 0xf7ffffff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amomax.w ; op1:x31; op2:x30; dest:x0; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amomax.w, x0, x31, x30, 0xf7ffffff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x10000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == 134217728, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x8000000, x8, 22*XLEN/8) + +inst_37: +// rs2_val == 268435456, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x10000000, x8, 24*XLEN/8) + +inst_38: +// rs2_val == 536870912, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x20000000, x8, 26*XLEN/8) + +inst_39: +// rs2_val == 1073741824, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x40000000, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -536870913, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x20000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, -0x20000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -1073741825, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x40000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, -0x40000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == 4, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x4, x8, 34*XLEN/8) + +inst_43: +// rs2_val == 8, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x8, x8, 36*XLEN/8) + +inst_44: +// rs2_val == 16, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x10, x8, 38*XLEN/8) + +inst_45: +// rs2_val == 32, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x20, x8, 40*XLEN/8) + +inst_46: +// rs2_val == 64, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x40, x8, 42*XLEN/8) + +inst_47: +// rs2_val == 128, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x80, x8, 44*XLEN/8) + +inst_48: +// rs2_val == 256, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x100, x8, 46*XLEN/8) + +inst_49: +// rs2_val == 512, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x200, x8, 48*XLEN/8) + +inst_50: +// rs2_val == 1024, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x400, x8, 50*XLEN/8) + +inst_51: +// rs2_val == 2048, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x800, x8, 52*XLEN/8) + +inst_52: +// rs2_val == 4096, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x1000, x8, 54*XLEN/8) + +inst_53: +// rs2_val == 8192, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x2000, x8, 56*XLEN/8) + +inst_54: +// rs2_val == 16384, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x4000, x8, 58*XLEN/8) + +inst_55: +// rs2_val == 32768, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x8000, x8, 60*XLEN/8) + +inst_56: +// rs2_val == 65536, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x10000, x8, 62*XLEN/8) + +inst_57: +// rs2_val == 131072, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x20000, x8, 64*XLEN/8) + +inst_58: +// rs2_val == 262144, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x40000, x8, 66*XLEN/8) + +inst_59: +// rs2_val == 524288, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x80000, x8, 68*XLEN/8) + +inst_60: +// rs2_val == 1048576, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x100000, x8, 70*XLEN/8) + +inst_61: +// rs2_val == 2097152, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x200000, x8, 72*XLEN/8) + +inst_62: +// rs2_val == 4194304, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x400000, x8, 74*XLEN/8) + +inst_63: +// rs2_val == 8388608, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x800000, x8, 76*XLEN/8) + +inst_64: +// rs2_val == 16777216, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x1000000, x8, 78*XLEN/8) + +inst_65: +// rs2_val == 33554432, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x2000000, x8, 80*XLEN/8) + +inst_66: +// rs2_val == 67108864, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, 0x4000000, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -33554433, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x2000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, -0x2000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == -134217729, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xf7ffffff, -0x8000001, x8, 86*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 88*((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/rv32i_m/A/src/amomaxu.w-01.S b/riscv-test-suite/rv32i_m/A/src/amomaxu.w-01.S new file mode 100644 index 000000000..35514140e --- /dev/null +++ b/riscv-test-suite/rv32i_m/A/src/amomaxu.w-01.S @@ -0,0 +1,436 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 02:38:24 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv32ia.cgf \ + \ +// -- xlen 32 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amomaxu.w instruction of the RISC-V RV32A extension for the amomaxu.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV32IA") + +.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.*A.*);def TEST_CASE_1=True;",amomaxu.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x31, rs2==x29, rd==x30, rs2_val == (-2**(xlen-1)), rs2_val == -2147483648 +// opcode: amomaxu.w ; op1:x31; op2:x29; dest:x30; op1val:0xf7ffffff; op2val:-0x80000000 +TEST_AMO_OP(amomaxu.w, x30, x31, x29, 0xf7ffffff, -0x80000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x31, rd==x31, rs2_val == (2**(xlen-1)-1), rs2_val == 2147483647 +// opcode: amomaxu.w ; op1:x30; op2:x31; dest:x31; op1val:0xf7ffffff; op2val:0x7fffffff +TEST_AMO_OP(amomaxu.w, x31, x30, x31, 0xf7ffffff, 0x7fffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 == rd != rs2, rs1==x29, rs2==x30, rd==x29, rs2_val == 0, +// opcode: amomaxu.w ; op1:x29; op2:x30; dest:x29; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amomaxu.w, x29, x29, x30, 0xf7ffffff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amomaxu.w ; op1:x28; op2:x26; dest:x27; op1val:0xf7ffffff; op2val:0x1 +TEST_AMO_OP(amomaxu.w, x27, x28, x26, 0xf7ffffff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 1431655765, +// opcode: amomaxu.w ; op1:x27; op2:x28; dest:x26; op1val:0xf7ffffff; op2val:0x55555555 +TEST_AMO_OP(amomaxu.w, x26, x27, x28, 0xf7ffffff, 0x55555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -1431655766, +// opcode: amomaxu.w ; op1:x26; op2:x27; dest:x28; op1val:0xf7ffffff; op2val:-0x55555556 +TEST_AMO_OP(amomaxu.w, x28, x26, x27, 0xf7ffffff, -0x55555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amomaxu.w ; op1:x25; op2:x23; dest:x24; op1val:0xf7ffffff; op2val:0x2 +TEST_AMO_OP(amomaxu.w, x24, x25, x23, 0xf7ffffff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amomaxu.w ; op1:x24; op2:x25; dest:x23; op1val:0xf7ffffff; op2val:-0x2 +TEST_AMO_OP(amomaxu.w, x23, x24, x25, 0xf7ffffff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amomaxu.w ; op1:x23; op2:x24; dest:x25; op1val:0xf7ffffff; op2val:-0x3 +TEST_AMO_OP(amomaxu.w, x25, x23, x24, 0xf7ffffff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amomaxu.w ; op1:x22; op2:x20; dest:x21; op1val:0xf7ffffff; op2val:-0x5 +TEST_AMO_OP(amomaxu.w, x21, x22, x20, 0xf7ffffff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amomaxu.w ; op1:x21; op2:x22; dest:x20; op1val:0xf7ffffff; op2val:-0x9 +TEST_AMO_OP(amomaxu.w, x20, x21, x22, 0xf7ffffff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amomaxu.w ; op1:x20; op2:x21; dest:x22; op1val:0xf7ffffff; op2val:-0x11 +TEST_AMO_OP(amomaxu.w, x22, x20, x21, 0xf7ffffff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amomaxu.w ; op1:x19; op2:x17; dest:x18; op1val:0xf7ffffff; op2val:-0x21 +TEST_AMO_OP(amomaxu.w, x18, x19, x17, 0xf7ffffff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amomaxu.w ; op1:x18; op2:x19; dest:x17; op1val:0xf7ffffff; op2val:-0x41 +TEST_AMO_OP(amomaxu.w, x17, x18, x19, 0xf7ffffff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amomaxu.w ; op1:x17; op2:x18; dest:x19; op1val:0xf7ffffff; op2val:-0x81 +TEST_AMO_OP(amomaxu.w, x19, x17, x18, 0xf7ffffff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amomaxu.w ; op1:x16; op2:x14; dest:x15; op1val:0xf7ffffff; op2val:-0x101 +TEST_AMO_OP(amomaxu.w, x15, x16, x14, 0xf7ffffff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amomaxu.w ; op1:x15; op2:x16; dest:x14; op1val:0xf7ffffff; op2val:-0x201 +TEST_AMO_OP(amomaxu.w, x14, x15, x16, 0xf7ffffff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amomaxu.w ; op1:x14; op2:x15; dest:x16; op1val:0xf7ffffff; op2val:-0x401 +TEST_AMO_OP(amomaxu.w, x16, x14, x15, 0xf7ffffff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amomaxu.w ; op1:x13; op2:x11; dest:x12; op1val:0xf7ffffff; op2val:-0x801 +TEST_AMO_OP(amomaxu.w, x12, x13, x11, 0xf7ffffff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amomaxu.w ; op1:x12; op2:x13; dest:x11; op1val:0xf7ffffff; op2val:-0x1001 +TEST_AMO_OP(amomaxu.w, x11, x12, x13, 0xf7ffffff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amomaxu.w ; op1:x11; op2:x12; dest:x13; op1val:0xf7ffffff; op2val:-0x2001 +TEST_AMO_OP(amomaxu.w, x13, x11, x12, 0xf7ffffff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amomaxu.w ; op1:x10; op2:x8; dest:x9; op1val:0xf7ffffff; op2val:-0x4001 +TEST_AMO_OP(amomaxu.w, x9, x10, x8, 0xf7ffffff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amomaxu.w ; op1:x9; op2:x10; dest:x8; op1val:0xf7ffffff; op2val:-0x8001 +TEST_AMO_OP(amomaxu.w, x8, x9, x10, 0xf7ffffff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amomaxu.w ; op1:x8; op2:x9; dest:x10; op1val:0xf7ffffff; op2val:-0x10001 +TEST_AMO_OP(amomaxu.w, x10, x8, x9, 0xf7ffffff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amomaxu.w ; op1:x7; op2:x5; dest:x6; op1val:0xf7ffffff; op2val:-0x20001 +TEST_AMO_OP(amomaxu.w, x6, x7, x5, 0xf7ffffff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amomaxu.w ; op1:x6; op2:x7; dest:x5; op1val:0xf7ffffff; op2val:-0x40001 +TEST_AMO_OP(amomaxu.w, x5, x6, x7, 0xf7ffffff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amomaxu.w ; op1:x5; op2:x6; dest:x7; op1val:0xf7ffffff; op2val:-0x80001 +TEST_AMO_OP(amomaxu.w, x7, x5, x6, 0xf7ffffff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amomaxu.w ; op1:x4; op2:x2; dest:x3; op1val:0xf7ffffff; op2val:-0x100001 +TEST_AMO_OP(amomaxu.w, x3, x4, x2, 0xf7ffffff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amomaxu.w ; op1:x3; op2:x4; dest:x2; op1val:0xf7ffffff; op2val:-0x200001 +TEST_AMO_OP(amomaxu.w, x2, x3, x4, 0xf7ffffff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amomaxu.w ; op1:x2; op2:x3; dest:x4; op1val:0xf7ffffff; op2val:-0x400001 +TEST_AMO_OP(amomaxu.w, x4, x2, x3, 0xf7ffffff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amomaxu.w ; op1:x1; op2:x30; dest:x31; op1val:0xf7ffffff; op2val:-0x800001 +TEST_AMO_OP(amomaxu.w, x31, x1, x30, 0xf7ffffff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amomaxu.w ; op1:x30; op2:x1; dest:x31; op1val:0xf7ffffff; op2val:-0x1000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x1, 0xf7ffffff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amomaxu.w ; op1:x30; op2:x0; dest:x31; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amomaxu.w, x31, x30, x0, 0xf7ffffff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amomaxu.w ; op1:x31; op2:x30; dest:x1; op1val:0xf7ffffff; op2val:-0x4000001 +TEST_AMO_OP(amomaxu.w, x1, x31, x30, 0xf7ffffff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amomaxu.w ; op1:x31; op2:x30; dest:x0; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amomaxu.w, x0, x31, x30, 0xf7ffffff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x10000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == 134217728, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x8000000, x8, 22*XLEN/8) + +inst_37: +// rs2_val == 268435456, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x10000000, x8, 24*XLEN/8) + +inst_38: +// rs2_val == 536870912, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x20000000, x8, 26*XLEN/8) + +inst_39: +// rs2_val == 1073741824, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x40000000, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -536870913, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x20000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, -0x20000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -1073741825, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x40000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, -0x40000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == 4, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x4, x8, 34*XLEN/8) + +inst_43: +// rs2_val == 8, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x8, x8, 36*XLEN/8) + +inst_44: +// rs2_val == 16, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x10, x8, 38*XLEN/8) + +inst_45: +// rs2_val == 32, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x20, x8, 40*XLEN/8) + +inst_46: +// rs2_val == 64, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x40, x8, 42*XLEN/8) + +inst_47: +// rs2_val == 128, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x80, x8, 44*XLEN/8) + +inst_48: +// rs2_val == 256, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x100, x8, 46*XLEN/8) + +inst_49: +// rs2_val == 512, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x200, x8, 48*XLEN/8) + +inst_50: +// rs2_val == 1024, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x400, x8, 50*XLEN/8) + +inst_51: +// rs2_val == 2048, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x800, x8, 52*XLEN/8) + +inst_52: +// rs2_val == 4096, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x1000, x8, 54*XLEN/8) + +inst_53: +// rs2_val == 8192, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x2000, x8, 56*XLEN/8) + +inst_54: +// rs2_val == 16384, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x4000, x8, 58*XLEN/8) + +inst_55: +// rs2_val == 32768, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x8000, x8, 60*XLEN/8) + +inst_56: +// rs2_val == 65536, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x10000, x8, 62*XLEN/8) + +inst_57: +// rs2_val == 131072, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x20000, x8, 64*XLEN/8) + +inst_58: +// rs2_val == 262144, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x40000, x8, 66*XLEN/8) + +inst_59: +// rs2_val == 524288, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x80000, x8, 68*XLEN/8) + +inst_60: +// rs2_val == 1048576, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x100000, x8, 70*XLEN/8) + +inst_61: +// rs2_val == 2097152, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x200000, x8, 72*XLEN/8) + +inst_62: +// rs2_val == 4194304, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x400000, x8, 74*XLEN/8) + +inst_63: +// rs2_val == 8388608, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x800000, x8, 76*XLEN/8) + +inst_64: +// rs2_val == 16777216, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x1000000, x8, 78*XLEN/8) + +inst_65: +// rs2_val == 33554432, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x2000000, x8, 80*XLEN/8) + +inst_66: +// rs2_val == 67108864, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, 0x4000000, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -33554433, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x2000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, -0x2000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == -134217729, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xf7ffffff, -0x8000001, x8, 86*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 88*((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/rv32i_m/A/src/amomin.w-01.S b/riscv-test-suite/rv32i_m/A/src/amomin.w-01.S new file mode 100644 index 000000000..29127630b --- /dev/null +++ b/riscv-test-suite/rv32i_m/A/src/amomin.w-01.S @@ -0,0 +1,436 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 02:38:24 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv32ia.cgf \ + \ +// -- xlen 32 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amomin.w instruction of the RISC-V RV32A extension for the amomin.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV32IA") + +.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.*A.*);def TEST_CASE_1=True;",amomin.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x31, rs2==x29, rd==x30, rs2_val == (-2**(xlen-1)), rs2_val == -2147483648 +// opcode: amomin.w ; op1:x31; op2:x29; dest:x30; op1val:0xf7ffffff; op2val:-0x80000000 +TEST_AMO_OP(amomin.w, x30, x31, x29, 0xf7ffffff, -0x80000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x31, rd==x31, rs2_val == (2**(xlen-1)-1), rs2_val == 2147483647 +// opcode: amomin.w ; op1:x30; op2:x31; dest:x31; op1val:0xf7ffffff; op2val:0x7fffffff +TEST_AMO_OP(amomin.w, x31, x30, x31, 0xf7ffffff, 0x7fffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 == rd != rs2, rs1==x29, rs2==x30, rd==x29, rs2_val == 0, +// opcode: amomin.w ; op1:x29; op2:x30; dest:x29; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amomin.w, x29, x29, x30, 0xf7ffffff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amomin.w ; op1:x28; op2:x26; dest:x27; op1val:0xf7ffffff; op2val:0x1 +TEST_AMO_OP(amomin.w, x27, x28, x26, 0xf7ffffff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 1431655765, +// opcode: amomin.w ; op1:x27; op2:x28; dest:x26; op1val:0xf7ffffff; op2val:0x55555555 +TEST_AMO_OP(amomin.w, x26, x27, x28, 0xf7ffffff, 0x55555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -1431655766, +// opcode: amomin.w ; op1:x26; op2:x27; dest:x28; op1val:0xf7ffffff; op2val:-0x55555556 +TEST_AMO_OP(amomin.w, x28, x26, x27, 0xf7ffffff, -0x55555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amomin.w ; op1:x25; op2:x23; dest:x24; op1val:0xf7ffffff; op2val:0x2 +TEST_AMO_OP(amomin.w, x24, x25, x23, 0xf7ffffff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amomin.w ; op1:x24; op2:x25; dest:x23; op1val:0xf7ffffff; op2val:-0x2 +TEST_AMO_OP(amomin.w, x23, x24, x25, 0xf7ffffff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amomin.w ; op1:x23; op2:x24; dest:x25; op1val:0xf7ffffff; op2val:-0x3 +TEST_AMO_OP(amomin.w, x25, x23, x24, 0xf7ffffff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amomin.w ; op1:x22; op2:x20; dest:x21; op1val:0xf7ffffff; op2val:-0x5 +TEST_AMO_OP(amomin.w, x21, x22, x20, 0xf7ffffff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amomin.w ; op1:x21; op2:x22; dest:x20; op1val:0xf7ffffff; op2val:-0x9 +TEST_AMO_OP(amomin.w, x20, x21, x22, 0xf7ffffff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amomin.w ; op1:x20; op2:x21; dest:x22; op1val:0xf7ffffff; op2val:-0x11 +TEST_AMO_OP(amomin.w, x22, x20, x21, 0xf7ffffff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amomin.w ; op1:x19; op2:x17; dest:x18; op1val:0xf7ffffff; op2val:-0x21 +TEST_AMO_OP(amomin.w, x18, x19, x17, 0xf7ffffff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amomin.w ; op1:x18; op2:x19; dest:x17; op1val:0xf7ffffff; op2val:-0x41 +TEST_AMO_OP(amomin.w, x17, x18, x19, 0xf7ffffff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amomin.w ; op1:x17; op2:x18; dest:x19; op1val:0xf7ffffff; op2val:-0x81 +TEST_AMO_OP(amomin.w, x19, x17, x18, 0xf7ffffff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amomin.w ; op1:x16; op2:x14; dest:x15; op1val:0xf7ffffff; op2val:-0x101 +TEST_AMO_OP(amomin.w, x15, x16, x14, 0xf7ffffff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amomin.w ; op1:x15; op2:x16; dest:x14; op1val:0xf7ffffff; op2val:-0x201 +TEST_AMO_OP(amomin.w, x14, x15, x16, 0xf7ffffff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amomin.w ; op1:x14; op2:x15; dest:x16; op1val:0xf7ffffff; op2val:-0x401 +TEST_AMO_OP(amomin.w, x16, x14, x15, 0xf7ffffff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amomin.w ; op1:x13; op2:x11; dest:x12; op1val:0xf7ffffff; op2val:-0x801 +TEST_AMO_OP(amomin.w, x12, x13, x11, 0xf7ffffff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amomin.w ; op1:x12; op2:x13; dest:x11; op1val:0xf7ffffff; op2val:-0x1001 +TEST_AMO_OP(amomin.w, x11, x12, x13, 0xf7ffffff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amomin.w ; op1:x11; op2:x12; dest:x13; op1val:0xf7ffffff; op2val:-0x2001 +TEST_AMO_OP(amomin.w, x13, x11, x12, 0xf7ffffff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amomin.w ; op1:x10; op2:x8; dest:x9; op1val:0xf7ffffff; op2val:-0x4001 +TEST_AMO_OP(amomin.w, x9, x10, x8, 0xf7ffffff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amomin.w ; op1:x9; op2:x10; dest:x8; op1val:0xf7ffffff; op2val:-0x8001 +TEST_AMO_OP(amomin.w, x8, x9, x10, 0xf7ffffff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amomin.w ; op1:x8; op2:x9; dest:x10; op1val:0xf7ffffff; op2val:-0x10001 +TEST_AMO_OP(amomin.w, x10, x8, x9, 0xf7ffffff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amomin.w ; op1:x7; op2:x5; dest:x6; op1val:0xf7ffffff; op2val:-0x20001 +TEST_AMO_OP(amomin.w, x6, x7, x5, 0xf7ffffff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amomin.w ; op1:x6; op2:x7; dest:x5; op1val:0xf7ffffff; op2val:-0x40001 +TEST_AMO_OP(amomin.w, x5, x6, x7, 0xf7ffffff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amomin.w ; op1:x5; op2:x6; dest:x7; op1val:0xf7ffffff; op2val:-0x80001 +TEST_AMO_OP(amomin.w, x7, x5, x6, 0xf7ffffff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amomin.w ; op1:x4; op2:x2; dest:x3; op1val:0xf7ffffff; op2val:-0x100001 +TEST_AMO_OP(amomin.w, x3, x4, x2, 0xf7ffffff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amomin.w ; op1:x3; op2:x4; dest:x2; op1val:0xf7ffffff; op2val:-0x200001 +TEST_AMO_OP(amomin.w, x2, x3, x4, 0xf7ffffff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amomin.w ; op1:x2; op2:x3; dest:x4; op1val:0xf7ffffff; op2val:-0x400001 +TEST_AMO_OP(amomin.w, x4, x2, x3, 0xf7ffffff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amomin.w ; op1:x1; op2:x30; dest:x31; op1val:0xf7ffffff; op2val:-0x800001 +TEST_AMO_OP(amomin.w, x31, x1, x30, 0xf7ffffff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amomin.w ; op1:x30; op2:x1; dest:x31; op1val:0xf7ffffff; op2val:-0x1000001 +TEST_AMO_OP(amomin.w, x31, x30, x1, 0xf7ffffff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amomin.w ; op1:x30; op2:x0; dest:x31; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amomin.w, x31, x30, x0, 0xf7ffffff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amomin.w ; op1:x31; op2:x30; dest:x1; op1val:0xf7ffffff; op2val:-0x4000001 +TEST_AMO_OP(amomin.w, x1, x31, x30, 0xf7ffffff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amomin.w ; op1:x31; op2:x30; dest:x0; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amomin.w, x0, x31, x30, 0xf7ffffff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x10000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == 134217728, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x8000000, x8, 22*XLEN/8) + +inst_37: +// rs2_val == 268435456, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x10000000, x8, 24*XLEN/8) + +inst_38: +// rs2_val == 536870912, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x20000000, x8, 26*XLEN/8) + +inst_39: +// rs2_val == 1073741824, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x40000000, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -536870913, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x20000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, -0x20000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -1073741825, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x40000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, -0x40000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == 4, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x4, x8, 34*XLEN/8) + +inst_43: +// rs2_val == 8, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x8, x8, 36*XLEN/8) + +inst_44: +// rs2_val == 16, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x10, x8, 38*XLEN/8) + +inst_45: +// rs2_val == 32, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x20, x8, 40*XLEN/8) + +inst_46: +// rs2_val == 64, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x40, x8, 42*XLEN/8) + +inst_47: +// rs2_val == 128, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x80, x8, 44*XLEN/8) + +inst_48: +// rs2_val == 256, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x100, x8, 46*XLEN/8) + +inst_49: +// rs2_val == 512, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x200, x8, 48*XLEN/8) + +inst_50: +// rs2_val == 1024, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x400, x8, 50*XLEN/8) + +inst_51: +// rs2_val == 2048, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x800, x8, 52*XLEN/8) + +inst_52: +// rs2_val == 4096, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x1000, x8, 54*XLEN/8) + +inst_53: +// rs2_val == 8192, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x2000, x8, 56*XLEN/8) + +inst_54: +// rs2_val == 16384, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x4000, x8, 58*XLEN/8) + +inst_55: +// rs2_val == 32768, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x8000, x8, 60*XLEN/8) + +inst_56: +// rs2_val == 65536, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x10000, x8, 62*XLEN/8) + +inst_57: +// rs2_val == 131072, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x20000, x8, 64*XLEN/8) + +inst_58: +// rs2_val == 262144, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x40000, x8, 66*XLEN/8) + +inst_59: +// rs2_val == 524288, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x80000, x8, 68*XLEN/8) + +inst_60: +// rs2_val == 1048576, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x100000, x8, 70*XLEN/8) + +inst_61: +// rs2_val == 2097152, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x200000, x8, 72*XLEN/8) + +inst_62: +// rs2_val == 4194304, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x400000, x8, 74*XLEN/8) + +inst_63: +// rs2_val == 8388608, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x800000, x8, 76*XLEN/8) + +inst_64: +// rs2_val == 16777216, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x1000000, x8, 78*XLEN/8) + +inst_65: +// rs2_val == 33554432, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x2000000, x8, 80*XLEN/8) + +inst_66: +// rs2_val == 67108864, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, 0x4000000, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -33554433, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x2000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, -0x2000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == -134217729, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xf7ffffff, -0x8000001, x8, 86*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 88*((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/rv32i_m/A/src/amominu.w-01.S b/riscv-test-suite/rv32i_m/A/src/amominu.w-01.S new file mode 100644 index 000000000..5bd7dcf3b --- /dev/null +++ b/riscv-test-suite/rv32i_m/A/src/amominu.w-01.S @@ -0,0 +1,436 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 02:38:24 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv32ia.cgf \ + \ +// -- xlen 32 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amominu.w instruction of the RISC-V RV32A extension for the amominu.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV32IA") + +.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.*A.*);def TEST_CASE_1=True;",amominu.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x31, rs2==x29, rd==x30, rs2_val == (-2**(xlen-1)), rs2_val == -2147483648 +// opcode: amominu.w ; op1:x31; op2:x29; dest:x30; op1val:0xf7ffffff; op2val:-0x80000000 +TEST_AMO_OP(amominu.w, x30, x31, x29, 0xf7ffffff, -0x80000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x31, rd==x31, rs2_val == (2**(xlen-1)-1), rs2_val == 2147483647 +// opcode: amominu.w ; op1:x30; op2:x31; dest:x31; op1val:0xf7ffffff; op2val:0x7fffffff +TEST_AMO_OP(amominu.w, x31, x30, x31, 0xf7ffffff, 0x7fffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 == rd != rs2, rs1==x29, rs2==x30, rd==x29, rs2_val == 0, +// opcode: amominu.w ; op1:x29; op2:x30; dest:x29; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amominu.w, x29, x29, x30, 0xf7ffffff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amominu.w ; op1:x28; op2:x26; dest:x27; op1val:0xf7ffffff; op2val:0x1 +TEST_AMO_OP(amominu.w, x27, x28, x26, 0xf7ffffff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 1431655765, +// opcode: amominu.w ; op1:x27; op2:x28; dest:x26; op1val:0xf7ffffff; op2val:0x55555555 +TEST_AMO_OP(amominu.w, x26, x27, x28, 0xf7ffffff, 0x55555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -1431655766, +// opcode: amominu.w ; op1:x26; op2:x27; dest:x28; op1val:0xf7ffffff; op2val:-0x55555556 +TEST_AMO_OP(amominu.w, x28, x26, x27, 0xf7ffffff, -0x55555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amominu.w ; op1:x25; op2:x23; dest:x24; op1val:0xf7ffffff; op2val:0x2 +TEST_AMO_OP(amominu.w, x24, x25, x23, 0xf7ffffff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amominu.w ; op1:x24; op2:x25; dest:x23; op1val:0xf7ffffff; op2val:-0x2 +TEST_AMO_OP(amominu.w, x23, x24, x25, 0xf7ffffff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amominu.w ; op1:x23; op2:x24; dest:x25; op1val:0xf7ffffff; op2val:-0x3 +TEST_AMO_OP(amominu.w, x25, x23, x24, 0xf7ffffff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amominu.w ; op1:x22; op2:x20; dest:x21; op1val:0xf7ffffff; op2val:-0x5 +TEST_AMO_OP(amominu.w, x21, x22, x20, 0xf7ffffff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amominu.w ; op1:x21; op2:x22; dest:x20; op1val:0xf7ffffff; op2val:-0x9 +TEST_AMO_OP(amominu.w, x20, x21, x22, 0xf7ffffff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amominu.w ; op1:x20; op2:x21; dest:x22; op1val:0xf7ffffff; op2val:-0x11 +TEST_AMO_OP(amominu.w, x22, x20, x21, 0xf7ffffff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amominu.w ; op1:x19; op2:x17; dest:x18; op1val:0xf7ffffff; op2val:-0x21 +TEST_AMO_OP(amominu.w, x18, x19, x17, 0xf7ffffff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amominu.w ; op1:x18; op2:x19; dest:x17; op1val:0xf7ffffff; op2val:-0x41 +TEST_AMO_OP(amominu.w, x17, x18, x19, 0xf7ffffff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amominu.w ; op1:x17; op2:x18; dest:x19; op1val:0xf7ffffff; op2val:-0x81 +TEST_AMO_OP(amominu.w, x19, x17, x18, 0xf7ffffff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amominu.w ; op1:x16; op2:x14; dest:x15; op1val:0xf7ffffff; op2val:-0x101 +TEST_AMO_OP(amominu.w, x15, x16, x14, 0xf7ffffff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amominu.w ; op1:x15; op2:x16; dest:x14; op1val:0xf7ffffff; op2val:-0x201 +TEST_AMO_OP(amominu.w, x14, x15, x16, 0xf7ffffff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amominu.w ; op1:x14; op2:x15; dest:x16; op1val:0xf7ffffff; op2val:-0x401 +TEST_AMO_OP(amominu.w, x16, x14, x15, 0xf7ffffff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amominu.w ; op1:x13; op2:x11; dest:x12; op1val:0xf7ffffff; op2val:-0x801 +TEST_AMO_OP(amominu.w, x12, x13, x11, 0xf7ffffff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amominu.w ; op1:x12; op2:x13; dest:x11; op1val:0xf7ffffff; op2val:-0x1001 +TEST_AMO_OP(amominu.w, x11, x12, x13, 0xf7ffffff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amominu.w ; op1:x11; op2:x12; dest:x13; op1val:0xf7ffffff; op2val:-0x2001 +TEST_AMO_OP(amominu.w, x13, x11, x12, 0xf7ffffff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amominu.w ; op1:x10; op2:x8; dest:x9; op1val:0xf7ffffff; op2val:-0x4001 +TEST_AMO_OP(amominu.w, x9, x10, x8, 0xf7ffffff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amominu.w ; op1:x9; op2:x10; dest:x8; op1val:0xf7ffffff; op2val:-0x8001 +TEST_AMO_OP(amominu.w, x8, x9, x10, 0xf7ffffff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amominu.w ; op1:x8; op2:x9; dest:x10; op1val:0xf7ffffff; op2val:-0x10001 +TEST_AMO_OP(amominu.w, x10, x8, x9, 0xf7ffffff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amominu.w ; op1:x7; op2:x5; dest:x6; op1val:0xf7ffffff; op2val:-0x20001 +TEST_AMO_OP(amominu.w, x6, x7, x5, 0xf7ffffff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amominu.w ; op1:x6; op2:x7; dest:x5; op1val:0xf7ffffff; op2val:-0x40001 +TEST_AMO_OP(amominu.w, x5, x6, x7, 0xf7ffffff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amominu.w ; op1:x5; op2:x6; dest:x7; op1val:0xf7ffffff; op2val:-0x80001 +TEST_AMO_OP(amominu.w, x7, x5, x6, 0xf7ffffff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amominu.w ; op1:x4; op2:x2; dest:x3; op1val:0xf7ffffff; op2val:-0x100001 +TEST_AMO_OP(amominu.w, x3, x4, x2, 0xf7ffffff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amominu.w ; op1:x3; op2:x4; dest:x2; op1val:0xf7ffffff; op2val:-0x200001 +TEST_AMO_OP(amominu.w, x2, x3, x4, 0xf7ffffff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amominu.w ; op1:x2; op2:x3; dest:x4; op1val:0xf7ffffff; op2val:-0x400001 +TEST_AMO_OP(amominu.w, x4, x2, x3, 0xf7ffffff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amominu.w ; op1:x1; op2:x30; dest:x31; op1val:0xf7ffffff; op2val:-0x800001 +TEST_AMO_OP(amominu.w, x31, x1, x30, 0xf7ffffff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amominu.w ; op1:x30; op2:x1; dest:x31; op1val:0xf7ffffff; op2val:-0x1000001 +TEST_AMO_OP(amominu.w, x31, x30, x1, 0xf7ffffff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amominu.w ; op1:x30; op2:x0; dest:x31; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amominu.w, x31, x30, x0, 0xf7ffffff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amominu.w ; op1:x31; op2:x30; dest:x1; op1val:0xf7ffffff; op2val:-0x4000001 +TEST_AMO_OP(amominu.w, x1, x31, x30, 0xf7ffffff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amominu.w ; op1:x31; op2:x30; dest:x0; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amominu.w, x0, x31, x30, 0xf7ffffff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x10000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == 134217728, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x8000000, x8, 22*XLEN/8) + +inst_37: +// rs2_val == 268435456, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x10000000, x8, 24*XLEN/8) + +inst_38: +// rs2_val == 536870912, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x20000000, x8, 26*XLEN/8) + +inst_39: +// rs2_val == 1073741824, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x40000000, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -536870913, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x20000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, -0x20000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -1073741825, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x40000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, -0x40000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == 4, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x4, x8, 34*XLEN/8) + +inst_43: +// rs2_val == 8, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x8, x8, 36*XLEN/8) + +inst_44: +// rs2_val == 16, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x10, x8, 38*XLEN/8) + +inst_45: +// rs2_val == 32, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x20, x8, 40*XLEN/8) + +inst_46: +// rs2_val == 64, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x40, x8, 42*XLEN/8) + +inst_47: +// rs2_val == 128, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x80, x8, 44*XLEN/8) + +inst_48: +// rs2_val == 256, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x100, x8, 46*XLEN/8) + +inst_49: +// rs2_val == 512, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x200, x8, 48*XLEN/8) + +inst_50: +// rs2_val == 1024, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x400, x8, 50*XLEN/8) + +inst_51: +// rs2_val == 2048, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x800, x8, 52*XLEN/8) + +inst_52: +// rs2_val == 4096, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x1000, x8, 54*XLEN/8) + +inst_53: +// rs2_val == 8192, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x2000, x8, 56*XLEN/8) + +inst_54: +// rs2_val == 16384, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x4000, x8, 58*XLEN/8) + +inst_55: +// rs2_val == 32768, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x8000, x8, 60*XLEN/8) + +inst_56: +// rs2_val == 65536, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x10000, x8, 62*XLEN/8) + +inst_57: +// rs2_val == 131072, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x20000, x8, 64*XLEN/8) + +inst_58: +// rs2_val == 262144, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x40000, x8, 66*XLEN/8) + +inst_59: +// rs2_val == 524288, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x80000, x8, 68*XLEN/8) + +inst_60: +// rs2_val == 1048576, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x100000, x8, 70*XLEN/8) + +inst_61: +// rs2_val == 2097152, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x200000, x8, 72*XLEN/8) + +inst_62: +// rs2_val == 4194304, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x400000, x8, 74*XLEN/8) + +inst_63: +// rs2_val == 8388608, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x800000, x8, 76*XLEN/8) + +inst_64: +// rs2_val == 16777216, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x1000000, x8, 78*XLEN/8) + +inst_65: +// rs2_val == 33554432, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x2000000, x8, 80*XLEN/8) + +inst_66: +// rs2_val == 67108864, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, 0x4000000, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -33554433, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x2000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, -0x2000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == -134217729, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xf7ffffff, -0x8000001, x8, 86*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 88*((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/rv32i_m/A/src/amoor.w-01.S b/riscv-test-suite/rv32i_m/A/src/amoor.w-01.S new file mode 100644 index 000000000..1faeebfc3 --- /dev/null +++ b/riscv-test-suite/rv32i_m/A/src/amoor.w-01.S @@ -0,0 +1,436 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 02:38:24 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv32ia.cgf \ + \ +// -- xlen 32 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoor.w instruction of the RISC-V RV32A extension for the amoor.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV32IA") + +.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.*A.*);def TEST_CASE_1=True;",amoor.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x31, rs2==x29, rd==x30, rs2_val == (-2**(xlen-1)), rs2_val == -2147483648 +// opcode: amoor.w ; op1:x31; op2:x29; dest:x30; op1val:0xf7ffffff; op2val:-0x80000000 +TEST_AMO_OP(amoor.w, x30, x31, x29, 0xf7ffffff, -0x80000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x31, rd==x31, rs2_val == (2**(xlen-1)-1), rs2_val == 2147483647 +// opcode: amoor.w ; op1:x30; op2:x31; dest:x31; op1val:0xf7ffffff; op2val:0x7fffffff +TEST_AMO_OP(amoor.w, x31, x30, x31, 0xf7ffffff, 0x7fffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 == rd != rs2, rs1==x29, rs2==x30, rd==x29, rs2_val == 0, +// opcode: amoor.w ; op1:x29; op2:x30; dest:x29; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoor.w, x29, x29, x30, 0xf7ffffff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoor.w ; op1:x28; op2:x26; dest:x27; op1val:0xf7ffffff; op2val:0x1 +TEST_AMO_OP(amoor.w, x27, x28, x26, 0xf7ffffff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 1431655765, +// opcode: amoor.w ; op1:x27; op2:x28; dest:x26; op1val:0xf7ffffff; op2val:0x55555555 +TEST_AMO_OP(amoor.w, x26, x27, x28, 0xf7ffffff, 0x55555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -1431655766, +// opcode: amoor.w ; op1:x26; op2:x27; dest:x28; op1val:0xf7ffffff; op2val:-0x55555556 +TEST_AMO_OP(amoor.w, x28, x26, x27, 0xf7ffffff, -0x55555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoor.w ; op1:x25; op2:x23; dest:x24; op1val:0xf7ffffff; op2val:0x2 +TEST_AMO_OP(amoor.w, x24, x25, x23, 0xf7ffffff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoor.w ; op1:x24; op2:x25; dest:x23; op1val:0xf7ffffff; op2val:-0x2 +TEST_AMO_OP(amoor.w, x23, x24, x25, 0xf7ffffff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoor.w ; op1:x23; op2:x24; dest:x25; op1val:0xf7ffffff; op2val:-0x3 +TEST_AMO_OP(amoor.w, x25, x23, x24, 0xf7ffffff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoor.w ; op1:x22; op2:x20; dest:x21; op1val:0xf7ffffff; op2val:-0x5 +TEST_AMO_OP(amoor.w, x21, x22, x20, 0xf7ffffff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoor.w ; op1:x21; op2:x22; dest:x20; op1val:0xf7ffffff; op2val:-0x9 +TEST_AMO_OP(amoor.w, x20, x21, x22, 0xf7ffffff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoor.w ; op1:x20; op2:x21; dest:x22; op1val:0xf7ffffff; op2val:-0x11 +TEST_AMO_OP(amoor.w, x22, x20, x21, 0xf7ffffff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoor.w ; op1:x19; op2:x17; dest:x18; op1val:0xf7ffffff; op2val:-0x21 +TEST_AMO_OP(amoor.w, x18, x19, x17, 0xf7ffffff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoor.w ; op1:x18; op2:x19; dest:x17; op1val:0xf7ffffff; op2val:-0x41 +TEST_AMO_OP(amoor.w, x17, x18, x19, 0xf7ffffff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoor.w ; op1:x17; op2:x18; dest:x19; op1val:0xf7ffffff; op2val:-0x81 +TEST_AMO_OP(amoor.w, x19, x17, x18, 0xf7ffffff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoor.w ; op1:x16; op2:x14; dest:x15; op1val:0xf7ffffff; op2val:-0x101 +TEST_AMO_OP(amoor.w, x15, x16, x14, 0xf7ffffff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoor.w ; op1:x15; op2:x16; dest:x14; op1val:0xf7ffffff; op2val:-0x201 +TEST_AMO_OP(amoor.w, x14, x15, x16, 0xf7ffffff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoor.w ; op1:x14; op2:x15; dest:x16; op1val:0xf7ffffff; op2val:-0x401 +TEST_AMO_OP(amoor.w, x16, x14, x15, 0xf7ffffff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoor.w ; op1:x13; op2:x11; dest:x12; op1val:0xf7ffffff; op2val:-0x801 +TEST_AMO_OP(amoor.w, x12, x13, x11, 0xf7ffffff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoor.w ; op1:x12; op2:x13; dest:x11; op1val:0xf7ffffff; op2val:-0x1001 +TEST_AMO_OP(amoor.w, x11, x12, x13, 0xf7ffffff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoor.w ; op1:x11; op2:x12; dest:x13; op1val:0xf7ffffff; op2val:-0x2001 +TEST_AMO_OP(amoor.w, x13, x11, x12, 0xf7ffffff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoor.w ; op1:x10; op2:x8; dest:x9; op1val:0xf7ffffff; op2val:-0x4001 +TEST_AMO_OP(amoor.w, x9, x10, x8, 0xf7ffffff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoor.w ; op1:x9; op2:x10; dest:x8; op1val:0xf7ffffff; op2val:-0x8001 +TEST_AMO_OP(amoor.w, x8, x9, x10, 0xf7ffffff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoor.w ; op1:x8; op2:x9; dest:x10; op1val:0xf7ffffff; op2val:-0x10001 +TEST_AMO_OP(amoor.w, x10, x8, x9, 0xf7ffffff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoor.w ; op1:x7; op2:x5; dest:x6; op1val:0xf7ffffff; op2val:-0x20001 +TEST_AMO_OP(amoor.w, x6, x7, x5, 0xf7ffffff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoor.w ; op1:x6; op2:x7; dest:x5; op1val:0xf7ffffff; op2val:-0x40001 +TEST_AMO_OP(amoor.w, x5, x6, x7, 0xf7ffffff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoor.w ; op1:x5; op2:x6; dest:x7; op1val:0xf7ffffff; op2val:-0x80001 +TEST_AMO_OP(amoor.w, x7, x5, x6, 0xf7ffffff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoor.w ; op1:x4; op2:x2; dest:x3; op1val:0xf7ffffff; op2val:-0x100001 +TEST_AMO_OP(amoor.w, x3, x4, x2, 0xf7ffffff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoor.w ; op1:x3; op2:x4; dest:x2; op1val:0xf7ffffff; op2val:-0x200001 +TEST_AMO_OP(amoor.w, x2, x3, x4, 0xf7ffffff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoor.w ; op1:x2; op2:x3; dest:x4; op1val:0xf7ffffff; op2val:-0x400001 +TEST_AMO_OP(amoor.w, x4, x2, x3, 0xf7ffffff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoor.w ; op1:x1; op2:x30; dest:x31; op1val:0xf7ffffff; op2val:-0x800001 +TEST_AMO_OP(amoor.w, x31, x1, x30, 0xf7ffffff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoor.w ; op1:x30; op2:x1; dest:x31; op1val:0xf7ffffff; op2val:-0x1000001 +TEST_AMO_OP(amoor.w, x31, x30, x1, 0xf7ffffff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoor.w ; op1:x30; op2:x0; dest:x31; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoor.w, x31, x30, x0, 0xf7ffffff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoor.w ; op1:x31; op2:x30; dest:x1; op1val:0xf7ffffff; op2val:-0x4000001 +TEST_AMO_OP(amoor.w, x1, x31, x30, 0xf7ffffff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoor.w ; op1:x31; op2:x30; dest:x0; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoor.w, x0, x31, x30, 0xf7ffffff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x10000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == 134217728, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x8000000, x8, 22*XLEN/8) + +inst_37: +// rs2_val == 268435456, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x10000000, x8, 24*XLEN/8) + +inst_38: +// rs2_val == 536870912, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x20000000, x8, 26*XLEN/8) + +inst_39: +// rs2_val == 1073741824, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x40000000, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -536870913, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x20000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, -0x20000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -1073741825, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x40000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, -0x40000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == 4, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x4, x8, 34*XLEN/8) + +inst_43: +// rs2_val == 8, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x8, x8, 36*XLEN/8) + +inst_44: +// rs2_val == 16, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x10, x8, 38*XLEN/8) + +inst_45: +// rs2_val == 32, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x20, x8, 40*XLEN/8) + +inst_46: +// rs2_val == 64, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x40, x8, 42*XLEN/8) + +inst_47: +// rs2_val == 128, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x80, x8, 44*XLEN/8) + +inst_48: +// rs2_val == 256, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x100, x8, 46*XLEN/8) + +inst_49: +// rs2_val == 512, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x200, x8, 48*XLEN/8) + +inst_50: +// rs2_val == 1024, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x400, x8, 50*XLEN/8) + +inst_51: +// rs2_val == 2048, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x800, x8, 52*XLEN/8) + +inst_52: +// rs2_val == 4096, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x1000, x8, 54*XLEN/8) + +inst_53: +// rs2_val == 8192, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x2000, x8, 56*XLEN/8) + +inst_54: +// rs2_val == 16384, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x4000, x8, 58*XLEN/8) + +inst_55: +// rs2_val == 32768, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x8000, x8, 60*XLEN/8) + +inst_56: +// rs2_val == 65536, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x10000, x8, 62*XLEN/8) + +inst_57: +// rs2_val == 131072, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x20000, x8, 64*XLEN/8) + +inst_58: +// rs2_val == 262144, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x40000, x8, 66*XLEN/8) + +inst_59: +// rs2_val == 524288, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x80000, x8, 68*XLEN/8) + +inst_60: +// rs2_val == 1048576, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x100000, x8, 70*XLEN/8) + +inst_61: +// rs2_val == 2097152, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x200000, x8, 72*XLEN/8) + +inst_62: +// rs2_val == 4194304, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x400000, x8, 74*XLEN/8) + +inst_63: +// rs2_val == 8388608, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x800000, x8, 76*XLEN/8) + +inst_64: +// rs2_val == 16777216, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x1000000, x8, 78*XLEN/8) + +inst_65: +// rs2_val == 33554432, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x2000000, x8, 80*XLEN/8) + +inst_66: +// rs2_val == 67108864, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, 0x4000000, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -33554433, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x2000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, -0x2000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == -134217729, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xf7ffffff, -0x8000001, x8, 86*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 88*((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/rv32i_m/A/src/amoswap.w-01.S b/riscv-test-suite/rv32i_m/A/src/amoswap.w-01.S new file mode 100644 index 000000000..91f789f93 --- /dev/null +++ b/riscv-test-suite/rv32i_m/A/src/amoswap.w-01.S @@ -0,0 +1,436 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 02:38:24 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv32ia.cgf \ + \ +// -- xlen 32 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoswap.w instruction of the RISC-V RV32A extension for the amoswap.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV32IA") + +.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.*A.*);def TEST_CASE_1=True;",amoswap.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x31, rs2==x29, rd==x30, rs2_val == (-2**(xlen-1)), rs2_val == -2147483648 +// opcode: amoswap.w ; op1:x31; op2:x29; dest:x30; op1val:0xf7ffffff; op2val:-0x80000000 +TEST_AMO_OP(amoswap.w, x30, x31, x29, 0xf7ffffff, -0x80000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x31, rd==x31, rs2_val == (2**(xlen-1)-1), rs2_val == 2147483647 +// opcode: amoswap.w ; op1:x30; op2:x31; dest:x31; op1val:0xf7ffffff; op2val:0x7fffffff +TEST_AMO_OP(amoswap.w, x31, x30, x31, 0xf7ffffff, 0x7fffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 == rd != rs2, rs1==x29, rs2==x30, rd==x29, rs2_val == 0, +// opcode: amoswap.w ; op1:x29; op2:x30; dest:x29; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoswap.w, x29, x29, x30, 0xf7ffffff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoswap.w ; op1:x28; op2:x26; dest:x27; op1val:0xf7ffffff; op2val:0x1 +TEST_AMO_OP(amoswap.w, x27, x28, x26, 0xf7ffffff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 1431655765, +// opcode: amoswap.w ; op1:x27; op2:x28; dest:x26; op1val:0xf7ffffff; op2val:0x55555555 +TEST_AMO_OP(amoswap.w, x26, x27, x28, 0xf7ffffff, 0x55555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -1431655766, +// opcode: amoswap.w ; op1:x26; op2:x27; dest:x28; op1val:0xf7ffffff; op2val:-0x55555556 +TEST_AMO_OP(amoswap.w, x28, x26, x27, 0xf7ffffff, -0x55555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoswap.w ; op1:x25; op2:x23; dest:x24; op1val:0xf7ffffff; op2val:0x2 +TEST_AMO_OP(amoswap.w, x24, x25, x23, 0xf7ffffff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoswap.w ; op1:x24; op2:x25; dest:x23; op1val:0xf7ffffff; op2val:-0x2 +TEST_AMO_OP(amoswap.w, x23, x24, x25, 0xf7ffffff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoswap.w ; op1:x23; op2:x24; dest:x25; op1val:0xf7ffffff; op2val:-0x3 +TEST_AMO_OP(amoswap.w, x25, x23, x24, 0xf7ffffff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoswap.w ; op1:x22; op2:x20; dest:x21; op1val:0xf7ffffff; op2val:-0x5 +TEST_AMO_OP(amoswap.w, x21, x22, x20, 0xf7ffffff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoswap.w ; op1:x21; op2:x22; dest:x20; op1val:0xf7ffffff; op2val:-0x9 +TEST_AMO_OP(amoswap.w, x20, x21, x22, 0xf7ffffff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoswap.w ; op1:x20; op2:x21; dest:x22; op1val:0xf7ffffff; op2val:-0x11 +TEST_AMO_OP(amoswap.w, x22, x20, x21, 0xf7ffffff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoswap.w ; op1:x19; op2:x17; dest:x18; op1val:0xf7ffffff; op2val:-0x21 +TEST_AMO_OP(amoswap.w, x18, x19, x17, 0xf7ffffff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoswap.w ; op1:x18; op2:x19; dest:x17; op1val:0xf7ffffff; op2val:-0x41 +TEST_AMO_OP(amoswap.w, x17, x18, x19, 0xf7ffffff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoswap.w ; op1:x17; op2:x18; dest:x19; op1val:0xf7ffffff; op2val:-0x81 +TEST_AMO_OP(amoswap.w, x19, x17, x18, 0xf7ffffff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoswap.w ; op1:x16; op2:x14; dest:x15; op1val:0xf7ffffff; op2val:-0x101 +TEST_AMO_OP(amoswap.w, x15, x16, x14, 0xf7ffffff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoswap.w ; op1:x15; op2:x16; dest:x14; op1val:0xf7ffffff; op2val:-0x201 +TEST_AMO_OP(amoswap.w, x14, x15, x16, 0xf7ffffff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoswap.w ; op1:x14; op2:x15; dest:x16; op1val:0xf7ffffff; op2val:-0x401 +TEST_AMO_OP(amoswap.w, x16, x14, x15, 0xf7ffffff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoswap.w ; op1:x13; op2:x11; dest:x12; op1val:0xf7ffffff; op2val:-0x801 +TEST_AMO_OP(amoswap.w, x12, x13, x11, 0xf7ffffff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoswap.w ; op1:x12; op2:x13; dest:x11; op1val:0xf7ffffff; op2val:-0x1001 +TEST_AMO_OP(amoswap.w, x11, x12, x13, 0xf7ffffff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoswap.w ; op1:x11; op2:x12; dest:x13; op1val:0xf7ffffff; op2val:-0x2001 +TEST_AMO_OP(amoswap.w, x13, x11, x12, 0xf7ffffff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoswap.w ; op1:x10; op2:x8; dest:x9; op1val:0xf7ffffff; op2val:-0x4001 +TEST_AMO_OP(amoswap.w, x9, x10, x8, 0xf7ffffff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoswap.w ; op1:x9; op2:x10; dest:x8; op1val:0xf7ffffff; op2val:-0x8001 +TEST_AMO_OP(amoswap.w, x8, x9, x10, 0xf7ffffff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoswap.w ; op1:x8; op2:x9; dest:x10; op1val:0xf7ffffff; op2val:-0x10001 +TEST_AMO_OP(amoswap.w, x10, x8, x9, 0xf7ffffff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoswap.w ; op1:x7; op2:x5; dest:x6; op1val:0xf7ffffff; op2val:-0x20001 +TEST_AMO_OP(amoswap.w, x6, x7, x5, 0xf7ffffff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoswap.w ; op1:x6; op2:x7; dest:x5; op1val:0xf7ffffff; op2val:-0x40001 +TEST_AMO_OP(amoswap.w, x5, x6, x7, 0xf7ffffff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoswap.w ; op1:x5; op2:x6; dest:x7; op1val:0xf7ffffff; op2val:-0x80001 +TEST_AMO_OP(amoswap.w, x7, x5, x6, 0xf7ffffff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoswap.w ; op1:x4; op2:x2; dest:x3; op1val:0xf7ffffff; op2val:-0x100001 +TEST_AMO_OP(amoswap.w, x3, x4, x2, 0xf7ffffff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoswap.w ; op1:x3; op2:x4; dest:x2; op1val:0xf7ffffff; op2val:-0x200001 +TEST_AMO_OP(amoswap.w, x2, x3, x4, 0xf7ffffff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoswap.w ; op1:x2; op2:x3; dest:x4; op1val:0xf7ffffff; op2val:-0x400001 +TEST_AMO_OP(amoswap.w, x4, x2, x3, 0xf7ffffff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoswap.w ; op1:x1; op2:x30; dest:x31; op1val:0xf7ffffff; op2val:-0x800001 +TEST_AMO_OP(amoswap.w, x31, x1, x30, 0xf7ffffff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoswap.w ; op1:x30; op2:x1; dest:x31; op1val:0xf7ffffff; op2val:-0x1000001 +TEST_AMO_OP(amoswap.w, x31, x30, x1, 0xf7ffffff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoswap.w ; op1:x30; op2:x0; dest:x31; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoswap.w, x31, x30, x0, 0xf7ffffff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoswap.w ; op1:x31; op2:x30; dest:x1; op1val:0xf7ffffff; op2val:-0x4000001 +TEST_AMO_OP(amoswap.w, x1, x31, x30, 0xf7ffffff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoswap.w ; op1:x31; op2:x30; dest:x0; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoswap.w, x0, x31, x30, 0xf7ffffff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x10000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == 134217728, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x8000000, x8, 22*XLEN/8) + +inst_37: +// rs2_val == 268435456, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x10000000, x8, 24*XLEN/8) + +inst_38: +// rs2_val == 536870912, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x20000000, x8, 26*XLEN/8) + +inst_39: +// rs2_val == 1073741824, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x40000000, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -536870913, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x20000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, -0x20000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -1073741825, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x40000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, -0x40000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == 4, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x4, x8, 34*XLEN/8) + +inst_43: +// rs2_val == 8, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x8, x8, 36*XLEN/8) + +inst_44: +// rs2_val == 16, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x10, x8, 38*XLEN/8) + +inst_45: +// rs2_val == 32, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x20, x8, 40*XLEN/8) + +inst_46: +// rs2_val == 64, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x40, x8, 42*XLEN/8) + +inst_47: +// rs2_val == 128, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x80, x8, 44*XLEN/8) + +inst_48: +// rs2_val == 256, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x100, x8, 46*XLEN/8) + +inst_49: +// rs2_val == 512, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x200, x8, 48*XLEN/8) + +inst_50: +// rs2_val == 1024, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x400, x8, 50*XLEN/8) + +inst_51: +// rs2_val == 2048, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x800, x8, 52*XLEN/8) + +inst_52: +// rs2_val == 4096, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x1000, x8, 54*XLEN/8) + +inst_53: +// rs2_val == 8192, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x2000, x8, 56*XLEN/8) + +inst_54: +// rs2_val == 16384, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x4000, x8, 58*XLEN/8) + +inst_55: +// rs2_val == 32768, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x8000, x8, 60*XLEN/8) + +inst_56: +// rs2_val == 65536, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x10000, x8, 62*XLEN/8) + +inst_57: +// rs2_val == 131072, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x20000, x8, 64*XLEN/8) + +inst_58: +// rs2_val == 262144, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x40000, x8, 66*XLEN/8) + +inst_59: +// rs2_val == 524288, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x80000, x8, 68*XLEN/8) + +inst_60: +// rs2_val == 1048576, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x100000, x8, 70*XLEN/8) + +inst_61: +// rs2_val == 2097152, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x200000, x8, 72*XLEN/8) + +inst_62: +// rs2_val == 4194304, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x400000, x8, 74*XLEN/8) + +inst_63: +// rs2_val == 8388608, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x800000, x8, 76*XLEN/8) + +inst_64: +// rs2_val == 16777216, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x1000000, x8, 78*XLEN/8) + +inst_65: +// rs2_val == 33554432, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x2000000, x8, 80*XLEN/8) + +inst_66: +// rs2_val == 67108864, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, 0x4000000, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -33554433, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x2000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, -0x2000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == -134217729, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xf7ffffff, -0x8000001, x8, 86*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 88*((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/rv32i_m/A/src/amoxor.w-01.S b/riscv-test-suite/rv32i_m/A/src/amoxor.w-01.S new file mode 100644 index 000000000..e06d94ce2 --- /dev/null +++ b/riscv-test-suite/rv32i_m/A/src/amoxor.w-01.S @@ -0,0 +1,436 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 02:38:24 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv32ia.cgf \ + \ +// -- xlen 32 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoxor.w instruction of the RISC-V RV32A extension for the amoxor.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV32IA") + +.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.*A.*);def TEST_CASE_1=True;",amoxor.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x31, rs2==x29, rd==x30, rs2_val == (-2**(xlen-1)), rs2_val == -2147483648 +// opcode: amoxor.w ; op1:x31; op2:x29; dest:x30; op1val:0xf7ffffff; op2val:-0x80000000 +TEST_AMO_OP(amoxor.w, x30, x31, x29, 0xf7ffffff, -0x80000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x31, rd==x31, rs2_val == (2**(xlen-1)-1), rs2_val == 2147483647 +// opcode: amoxor.w ; op1:x30; op2:x31; dest:x31; op1val:0xf7ffffff; op2val:0x7fffffff +TEST_AMO_OP(amoxor.w, x31, x30, x31, 0xf7ffffff, 0x7fffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 == rd != rs2, rs1==x29, rs2==x30, rd==x29, rs2_val == 0, +// opcode: amoxor.w ; op1:x29; op2:x30; dest:x29; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoxor.w, x29, x29, x30, 0xf7ffffff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoxor.w ; op1:x28; op2:x26; dest:x27; op1val:0xf7ffffff; op2val:0x1 +TEST_AMO_OP(amoxor.w, x27, x28, x26, 0xf7ffffff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 1431655765, +// opcode: amoxor.w ; op1:x27; op2:x28; dest:x26; op1val:0xf7ffffff; op2val:0x55555555 +TEST_AMO_OP(amoxor.w, x26, x27, x28, 0xf7ffffff, 0x55555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -1431655766, +// opcode: amoxor.w ; op1:x26; op2:x27; dest:x28; op1val:0xf7ffffff; op2val:-0x55555556 +TEST_AMO_OP(amoxor.w, x28, x26, x27, 0xf7ffffff, -0x55555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoxor.w ; op1:x25; op2:x23; dest:x24; op1val:0xf7ffffff; op2val:0x2 +TEST_AMO_OP(amoxor.w, x24, x25, x23, 0xf7ffffff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoxor.w ; op1:x24; op2:x25; dest:x23; op1val:0xf7ffffff; op2val:-0x2 +TEST_AMO_OP(amoxor.w, x23, x24, x25, 0xf7ffffff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoxor.w ; op1:x23; op2:x24; dest:x25; op1val:0xf7ffffff; op2val:-0x3 +TEST_AMO_OP(amoxor.w, x25, x23, x24, 0xf7ffffff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoxor.w ; op1:x22; op2:x20; dest:x21; op1val:0xf7ffffff; op2val:-0x5 +TEST_AMO_OP(amoxor.w, x21, x22, x20, 0xf7ffffff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoxor.w ; op1:x21; op2:x22; dest:x20; op1val:0xf7ffffff; op2val:-0x9 +TEST_AMO_OP(amoxor.w, x20, x21, x22, 0xf7ffffff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoxor.w ; op1:x20; op2:x21; dest:x22; op1val:0xf7ffffff; op2val:-0x11 +TEST_AMO_OP(amoxor.w, x22, x20, x21, 0xf7ffffff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoxor.w ; op1:x19; op2:x17; dest:x18; op1val:0xf7ffffff; op2val:-0x21 +TEST_AMO_OP(amoxor.w, x18, x19, x17, 0xf7ffffff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoxor.w ; op1:x18; op2:x19; dest:x17; op1val:0xf7ffffff; op2val:-0x41 +TEST_AMO_OP(amoxor.w, x17, x18, x19, 0xf7ffffff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoxor.w ; op1:x17; op2:x18; dest:x19; op1val:0xf7ffffff; op2val:-0x81 +TEST_AMO_OP(amoxor.w, x19, x17, x18, 0xf7ffffff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoxor.w ; op1:x16; op2:x14; dest:x15; op1val:0xf7ffffff; op2val:-0x101 +TEST_AMO_OP(amoxor.w, x15, x16, x14, 0xf7ffffff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoxor.w ; op1:x15; op2:x16; dest:x14; op1val:0xf7ffffff; op2val:-0x201 +TEST_AMO_OP(amoxor.w, x14, x15, x16, 0xf7ffffff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoxor.w ; op1:x14; op2:x15; dest:x16; op1val:0xf7ffffff; op2val:-0x401 +TEST_AMO_OP(amoxor.w, x16, x14, x15, 0xf7ffffff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoxor.w ; op1:x13; op2:x11; dest:x12; op1val:0xf7ffffff; op2val:-0x801 +TEST_AMO_OP(amoxor.w, x12, x13, x11, 0xf7ffffff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoxor.w ; op1:x12; op2:x13; dest:x11; op1val:0xf7ffffff; op2val:-0x1001 +TEST_AMO_OP(amoxor.w, x11, x12, x13, 0xf7ffffff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoxor.w ; op1:x11; op2:x12; dest:x13; op1val:0xf7ffffff; op2val:-0x2001 +TEST_AMO_OP(amoxor.w, x13, x11, x12, 0xf7ffffff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoxor.w ; op1:x10; op2:x8; dest:x9; op1val:0xf7ffffff; op2val:-0x4001 +TEST_AMO_OP(amoxor.w, x9, x10, x8, 0xf7ffffff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoxor.w ; op1:x9; op2:x10; dest:x8; op1val:0xf7ffffff; op2val:-0x8001 +TEST_AMO_OP(amoxor.w, x8, x9, x10, 0xf7ffffff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoxor.w ; op1:x8; op2:x9; dest:x10; op1val:0xf7ffffff; op2val:-0x10001 +TEST_AMO_OP(amoxor.w, x10, x8, x9, 0xf7ffffff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoxor.w ; op1:x7; op2:x5; dest:x6; op1val:0xf7ffffff; op2val:-0x20001 +TEST_AMO_OP(amoxor.w, x6, x7, x5, 0xf7ffffff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoxor.w ; op1:x6; op2:x7; dest:x5; op1val:0xf7ffffff; op2val:-0x40001 +TEST_AMO_OP(amoxor.w, x5, x6, x7, 0xf7ffffff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoxor.w ; op1:x5; op2:x6; dest:x7; op1val:0xf7ffffff; op2val:-0x80001 +TEST_AMO_OP(amoxor.w, x7, x5, x6, 0xf7ffffff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoxor.w ; op1:x4; op2:x2; dest:x3; op1val:0xf7ffffff; op2val:-0x100001 +TEST_AMO_OP(amoxor.w, x3, x4, x2, 0xf7ffffff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoxor.w ; op1:x3; op2:x4; dest:x2; op1val:0xf7ffffff; op2val:-0x200001 +TEST_AMO_OP(amoxor.w, x2, x3, x4, 0xf7ffffff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoxor.w ; op1:x2; op2:x3; dest:x4; op1val:0xf7ffffff; op2val:-0x400001 +TEST_AMO_OP(amoxor.w, x4, x2, x3, 0xf7ffffff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoxor.w ; op1:x1; op2:x30; dest:x31; op1val:0xf7ffffff; op2val:-0x800001 +TEST_AMO_OP(amoxor.w, x31, x1, x30, 0xf7ffffff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoxor.w ; op1:x30; op2:x1; dest:x31; op1val:0xf7ffffff; op2val:-0x1000001 +TEST_AMO_OP(amoxor.w, x31, x30, x1, 0xf7ffffff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoxor.w ; op1:x30; op2:x0; dest:x31; op1val:0xf7ffffff; op2val:0x0 +TEST_AMO_OP(amoxor.w, x31, x30, x0, 0xf7ffffff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoxor.w ; op1:x31; op2:x30; dest:x1; op1val:0xf7ffffff; op2val:-0x4000001 +TEST_AMO_OP(amoxor.w, x1, x31, x30, 0xf7ffffff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoxor.w ; op1:x31; op2:x30; dest:x0; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoxor.w, x0, x31, x30, 0xf7ffffff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x10000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == 134217728, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x8000000, x8, 22*XLEN/8) + +inst_37: +// rs2_val == 268435456, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x10000000, x8, 24*XLEN/8) + +inst_38: +// rs2_val == 536870912, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x20000000, x8, 26*XLEN/8) + +inst_39: +// rs2_val == 1073741824, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x40000000, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -536870913, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x20000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, -0x20000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -1073741825, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x40000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, -0x40000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == 4, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x4, x8, 34*XLEN/8) + +inst_43: +// rs2_val == 8, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x8, x8, 36*XLEN/8) + +inst_44: +// rs2_val == 16, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x10, x8, 38*XLEN/8) + +inst_45: +// rs2_val == 32, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x20, x8, 40*XLEN/8) + +inst_46: +// rs2_val == 64, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x40, x8, 42*XLEN/8) + +inst_47: +// rs2_val == 128, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x80, x8, 44*XLEN/8) + +inst_48: +// rs2_val == 256, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x100, x8, 46*XLEN/8) + +inst_49: +// rs2_val == 512, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x200, x8, 48*XLEN/8) + +inst_50: +// rs2_val == 1024, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x400, x8, 50*XLEN/8) + +inst_51: +// rs2_val == 2048, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x800, x8, 52*XLEN/8) + +inst_52: +// rs2_val == 4096, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x1000, x8, 54*XLEN/8) + +inst_53: +// rs2_val == 8192, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x2000, x8, 56*XLEN/8) + +inst_54: +// rs2_val == 16384, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x4000, x8, 58*XLEN/8) + +inst_55: +// rs2_val == 32768, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x8000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x8000, x8, 60*XLEN/8) + +inst_56: +// rs2_val == 65536, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x10000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x10000, x8, 62*XLEN/8) + +inst_57: +// rs2_val == 131072, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x20000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x20000, x8, 64*XLEN/8) + +inst_58: +// rs2_val == 262144, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x40000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x40000, x8, 66*XLEN/8) + +inst_59: +// rs2_val == 524288, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x80000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x80000, x8, 68*XLEN/8) + +inst_60: +// rs2_val == 1048576, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x100000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x100000, x8, 70*XLEN/8) + +inst_61: +// rs2_val == 2097152, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x200000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x200000, x8, 72*XLEN/8) + +inst_62: +// rs2_val == 4194304, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x400000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x400000, x8, 74*XLEN/8) + +inst_63: +// rs2_val == 8388608, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x800000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x800000, x8, 76*XLEN/8) + +inst_64: +// rs2_val == 16777216, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x1000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x1000000, x8, 78*XLEN/8) + +inst_65: +// rs2_val == 33554432, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x2000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x2000000, x8, 80*XLEN/8) + +inst_66: +// rs2_val == 67108864, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:0x4000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, 0x4000000, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -33554433, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x2000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, -0x2000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == -134217729, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xf7ffffff; op2val:-0x8000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xf7ffffff, -0x8000001, x8, 86*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 88*((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 From 42929090edb6f1cdfaaa44b0a18ce76322a7abe6 Mon Sep 17 00:00:00 2001 From: Abdul Wadood Date: Thu, 3 Aug 2023 04:12:11 +0500 Subject: [PATCH 2/4] Add 64-bit arch-tests of Atomic Ext. Signed-off-by: Abdul Wadood --- riscv-test-suite/rv64i_m/A/src/amoadd.d-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amoadd.w-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amoand.d-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amoand.w-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amomax.d-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amomax.w-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amomaxu.d-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amomaxu.w-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amomin.d-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amomin.w-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amominu.d-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amominu.w-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amoor.d-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amoor.w-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amoswap.d-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amoswap.w-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amoxor.d-01.S | 756 ++++++++++++++++++ riscv-test-suite/rv64i_m/A/src/amoxor.w-01.S | 756 ++++++++++++++++++ 18 files changed, 13608 insertions(+) create mode 100644 riscv-test-suite/rv64i_m/A/src/amoadd.d-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amoadd.w-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amoand.d-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amoand.w-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amomax.d-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amomax.w-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amomaxu.d-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amomaxu.w-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amomin.d-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amomin.w-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amominu.d-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amominu.w-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amoor.d-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amoor.w-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amoswap.d-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amoswap.w-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amoxor.d-01.S create mode 100644 riscv-test-suite/rv64i_m/A/src/amoxor.w-01.S diff --git a/riscv-test-suite/rv64i_m/A/src/amoadd.d-01.S b/riscv-test-suite/rv64i_m/A/src/amoadd.d-01.S new file mode 100644 index 000000000..6a38bccda --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoadd.d-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoadd.d instruction of the RISC-V RV64A extension for the amoadd.d covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoadd.d) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoadd.d ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoadd.d, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoadd.d, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoadd.d ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoadd.d, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoadd.d ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoadd.d, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoadd.d ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoadd.d, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoadd.d ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoadd.d, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoadd.d ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoadd.d, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoadd.d ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoadd.d, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoadd.d ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoadd.d, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoadd.d ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoadd.d, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoadd.d ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoadd.d, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoadd.d ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoadd.d, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoadd.d ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoadd.d, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoadd.d ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoadd.d, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoadd.d ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoadd.d, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoadd.d ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoadd.d, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoadd.d ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoadd.d, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoadd.d ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoadd.d, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoadd.d ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoadd.d, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoadd.d ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoadd.d, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoadd.d ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoadd.d, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoadd.d ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoadd.d, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoadd.d ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoadd.d, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoadd.d ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoadd.d, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoadd.d ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoadd.d, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoadd.d ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoadd.d, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoadd.d ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoadd.d, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoadd.d ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoadd.d, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoadd.d ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoadd.d, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoadd.d ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoadd.d, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoadd.d ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoadd.d, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoadd.d ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoadd.d, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoadd.d ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoadd.d, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoadd.d ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoadd.d, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoadd.d ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoadd.d, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoadd.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoadd.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amoadd.w-01.S b/riscv-test-suite/rv64i_m/A/src/amoadd.w-01.S new file mode 100644 index 000000000..733ba5a13 --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoadd.w-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoadd.w instruction of the RISC-V RV64A extension for the amoadd.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoadd.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoadd.w ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoadd.w, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoadd.w, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoadd.w ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoadd.w, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoadd.w ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoadd.w, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoadd.w ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoadd.w, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoadd.w ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoadd.w, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoadd.w ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoadd.w, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoadd.w ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoadd.w, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoadd.w ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoadd.w, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoadd.w ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoadd.w, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoadd.w ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoadd.w, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoadd.w ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoadd.w, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoadd.w ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoadd.w, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoadd.w ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoadd.w, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoadd.w ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoadd.w, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoadd.w ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoadd.w, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoadd.w ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoadd.w, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoadd.w ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoadd.w, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoadd.w ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoadd.w, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoadd.w ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoadd.w, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoadd.w ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoadd.w, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoadd.w ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoadd.w, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoadd.w ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoadd.w, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoadd.w ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoadd.w, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoadd.w ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoadd.w, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoadd.w ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoadd.w, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoadd.w ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoadd.w, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoadd.w ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoadd.w, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoadd.w ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoadd.w, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoadd.w ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoadd.w, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoadd.w ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoadd.w, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoadd.w ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoadd.w, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoadd.w ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoadd.w, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoadd.w ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoadd.w, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoadd.w ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoadd.w, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoadd.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoadd.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amoand.d-01.S b/riscv-test-suite/rv64i_m/A/src/amoand.d-01.S new file mode 100644 index 000000000..c8259f834 --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoand.d-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoand.d instruction of the RISC-V RV64A extension for the amoand.d covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoand.d) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoand.d ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoand.d, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoand.d ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoand.d, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoand.d ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoand.d, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoand.d ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoand.d, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoand.d ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoand.d, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoand.d ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoand.d, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoand.d ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoand.d, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoand.d ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoand.d, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoand.d ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoand.d, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoand.d ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoand.d, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoand.d ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoand.d, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoand.d ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoand.d, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoand.d ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoand.d, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoand.d ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoand.d, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoand.d ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoand.d, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoand.d ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoand.d, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoand.d ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoand.d, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoand.d ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoand.d, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoand.d ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoand.d, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoand.d ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoand.d, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoand.d ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoand.d, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoand.d ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoand.d, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoand.d ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoand.d, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoand.d ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoand.d, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoand.d ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoand.d, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoand.d ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoand.d, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoand.d ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoand.d, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoand.d ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoand.d, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoand.d ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoand.d, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoand.d ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoand.d, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoand.d ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoand.d, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoand.d ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoand.d, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoand.d ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoand.d, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoand.d ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoand.d, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoand.d ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoand.d, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoand.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoand.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amoand.w-01.S b/riscv-test-suite/rv64i_m/A/src/amoand.w-01.S new file mode 100644 index 000000000..1e7e269ef --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoand.w-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoand.w instruction of the RISC-V RV64A extension for the amoand.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoand.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoand.w ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoand.w, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoand.w ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoand.w, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoand.w ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoand.w, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoand.w ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoand.w, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoand.w ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoand.w, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoand.w ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoand.w, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoand.w ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoand.w, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoand.w ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoand.w, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoand.w ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoand.w, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoand.w ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoand.w, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoand.w ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoand.w, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoand.w ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoand.w, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoand.w ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoand.w, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoand.w ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoand.w, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoand.w ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoand.w, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoand.w ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoand.w, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoand.w ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoand.w, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoand.w ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoand.w, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoand.w ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoand.w, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoand.w ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoand.w, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoand.w ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoand.w, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoand.w ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoand.w, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoand.w ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoand.w, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoand.w ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoand.w, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoand.w ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoand.w, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoand.w ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoand.w, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoand.w ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoand.w, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoand.w ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoand.w, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoand.w ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoand.w, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoand.w ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoand.w, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoand.w ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoand.w, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoand.w ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoand.w, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoand.w ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoand.w, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoand.w ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoand.w, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoand.w ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoand.w, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoand.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoand.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amomax.d-01.S b/riscv-test-suite/rv64i_m/A/src/amomax.d-01.S new file mode 100644 index 000000000..993b0a619 --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amomax.d-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amomax.d instruction of the RISC-V RV64A extension for the amomax.d covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amomax.d) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amomax.d ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amomax.d, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amomax.d ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amomax.d, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amomax.d ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomax.d, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amomax.d ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amomax.d, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amomax.d ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amomax.d, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amomax.d ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amomax.d, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amomax.d ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amomax.d, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amomax.d ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amomax.d, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amomax.d ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amomax.d, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amomax.d ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amomax.d, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amomax.d ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amomax.d, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amomax.d ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amomax.d, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amomax.d ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amomax.d, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amomax.d ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amomax.d, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amomax.d ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amomax.d, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amomax.d ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amomax.d, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amomax.d ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amomax.d, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amomax.d ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amomax.d, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amomax.d ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amomax.d, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amomax.d ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amomax.d, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amomax.d ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amomax.d, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amomax.d ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amomax.d, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amomax.d ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amomax.d, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amomax.d ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amomax.d, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amomax.d ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amomax.d, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amomax.d ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amomax.d, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amomax.d ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amomax.d, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amomax.d ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amomax.d, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amomax.d ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amomax.d, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amomax.d ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amomax.d, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amomax.d ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amomax.d, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amomax.d ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amomax.d, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amomax.d ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomax.d, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amomax.d ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amomax.d, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amomax.d ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomax.d, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amomax.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomax.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amomax.w-01.S b/riscv-test-suite/rv64i_m/A/src/amomax.w-01.S new file mode 100644 index 000000000..505e3e95e --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amomax.w-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amomax.w instruction of the RISC-V RV64A extension for the amomax.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amomax.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amomax.w ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amomax.w, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amomax.w ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amomax.w, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amomax.w ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomax.w, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amomax.w ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amomax.w, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amomax.w ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amomax.w, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amomax.w ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amomax.w, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amomax.w ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amomax.w, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amomax.w ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amomax.w, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amomax.w ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amomax.w, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amomax.w ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amomax.w, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amomax.w ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amomax.w, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amomax.w ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amomax.w, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amomax.w ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amomax.w, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amomax.w ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amomax.w, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amomax.w ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amomax.w, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amomax.w ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amomax.w, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amomax.w ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amomax.w, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amomax.w ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amomax.w, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amomax.w ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amomax.w, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amomax.w ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amomax.w, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amomax.w ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amomax.w, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amomax.w ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amomax.w, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amomax.w ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amomax.w, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amomax.w ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amomax.w, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amomax.w ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amomax.w, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amomax.w ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amomax.w, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amomax.w ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amomax.w, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amomax.w ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amomax.w, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amomax.w ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amomax.w, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amomax.w ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amomax.w, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amomax.w ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amomax.w, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amomax.w ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amomax.w, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amomax.w ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomax.w, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amomax.w ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amomax.w, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amomax.w ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomax.w, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amomax.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomax.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amomaxu.d-01.S b/riscv-test-suite/rv64i_m/A/src/amomaxu.d-01.S new file mode 100644 index 000000000..25c7f629e --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amomaxu.d-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amomaxu.d instruction of the RISC-V RV64A extension for the amomaxu.d covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amomaxu.d) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amomaxu.d ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amomaxu.d, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amomaxu.d, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amomaxu.d ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomaxu.d, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amomaxu.d ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amomaxu.d, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amomaxu.d ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amomaxu.d, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amomaxu.d ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amomaxu.d, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amomaxu.d ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amomaxu.d, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amomaxu.d ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amomaxu.d, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amomaxu.d ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amomaxu.d, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amomaxu.d ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amomaxu.d, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amomaxu.d ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amomaxu.d, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amomaxu.d ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amomaxu.d, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amomaxu.d ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amomaxu.d, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amomaxu.d ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amomaxu.d, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amomaxu.d ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amomaxu.d, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amomaxu.d ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amomaxu.d, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amomaxu.d ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amomaxu.d, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amomaxu.d ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amomaxu.d, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amomaxu.d ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amomaxu.d, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amomaxu.d ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amomaxu.d, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amomaxu.d ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amomaxu.d, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amomaxu.d ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amomaxu.d, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amomaxu.d ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amomaxu.d, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amomaxu.d ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amomaxu.d, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amomaxu.d ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amomaxu.d, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amomaxu.d ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amomaxu.d, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amomaxu.d ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amomaxu.d, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amomaxu.d ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amomaxu.d, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amomaxu.d ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amomaxu.d, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amomaxu.d ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amomaxu.d, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amomaxu.d ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amomaxu.d, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amomaxu.d ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amomaxu.d ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomaxu.d, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amomaxu.d ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amomaxu.d, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amomaxu.d ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomaxu.d, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amomaxu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomaxu.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amomaxu.w-01.S b/riscv-test-suite/rv64i_m/A/src/amomaxu.w-01.S new file mode 100644 index 000000000..0e0eb5da0 --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amomaxu.w-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amomaxu.w instruction of the RISC-V RV64A extension for the amomaxu.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amomaxu.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amomaxu.w ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amomaxu.w, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amomaxu.w, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amomaxu.w ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomaxu.w, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amomaxu.w ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amomaxu.w, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amomaxu.w ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amomaxu.w, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amomaxu.w ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amomaxu.w, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amomaxu.w ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amomaxu.w, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amomaxu.w ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amomaxu.w, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amomaxu.w ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amomaxu.w, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amomaxu.w ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amomaxu.w, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amomaxu.w ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amomaxu.w, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amomaxu.w ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amomaxu.w, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amomaxu.w ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amomaxu.w, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amomaxu.w ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amomaxu.w, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amomaxu.w ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amomaxu.w, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amomaxu.w ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amomaxu.w, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amomaxu.w ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amomaxu.w, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amomaxu.w ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amomaxu.w, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amomaxu.w ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amomaxu.w, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amomaxu.w ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amomaxu.w, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amomaxu.w ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amomaxu.w, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amomaxu.w ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amomaxu.w, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amomaxu.w ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amomaxu.w, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amomaxu.w ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amomaxu.w, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amomaxu.w ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amomaxu.w, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amomaxu.w ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amomaxu.w, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amomaxu.w ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amomaxu.w, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amomaxu.w ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amomaxu.w, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amomaxu.w ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amomaxu.w, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amomaxu.w ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amomaxu.w, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amomaxu.w ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amomaxu.w, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amomaxu.w ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amomaxu.w ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomaxu.w, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amomaxu.w ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amomaxu.w, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amomaxu.w ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomaxu.w, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amomaxu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomaxu.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amomin.d-01.S b/riscv-test-suite/rv64i_m/A/src/amomin.d-01.S new file mode 100644 index 000000000..ab21d38b1 --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amomin.d-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amomin.d instruction of the RISC-V RV64A extension for the amomin.d covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amomin.d) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amomin.d ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amomin.d, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amomin.d ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amomin.d, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amomin.d ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomin.d, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amomin.d ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amomin.d, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amomin.d ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amomin.d, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amomin.d ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amomin.d, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amomin.d ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amomin.d, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amomin.d ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amomin.d, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amomin.d ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amomin.d, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amomin.d ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amomin.d, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amomin.d ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amomin.d, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amomin.d ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amomin.d, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amomin.d ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amomin.d, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amomin.d ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amomin.d, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amomin.d ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amomin.d, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amomin.d ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amomin.d, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amomin.d ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amomin.d, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amomin.d ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amomin.d, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amomin.d ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amomin.d, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amomin.d ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amomin.d, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amomin.d ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amomin.d, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amomin.d ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amomin.d, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amomin.d ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amomin.d, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amomin.d ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amomin.d, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amomin.d ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amomin.d, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amomin.d ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amomin.d, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amomin.d ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amomin.d, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amomin.d ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amomin.d, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amomin.d ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amomin.d, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amomin.d ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amomin.d, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amomin.d ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amomin.d, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amomin.d ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amomin.d, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amomin.d ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomin.d, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amomin.d ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amomin.d, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amomin.d ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomin.d, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amomin.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomin.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amomin.w-01.S b/riscv-test-suite/rv64i_m/A/src/amomin.w-01.S new file mode 100644 index 000000000..109098baa --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amomin.w-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amomin.w instruction of the RISC-V RV64A extension for the amomin.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amomin.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amomin.w ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amomin.w, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amomin.w ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amomin.w, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amomin.w ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomin.w, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amomin.w ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amomin.w, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amomin.w ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amomin.w, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amomin.w ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amomin.w, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amomin.w ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amomin.w, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amomin.w ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amomin.w, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amomin.w ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amomin.w, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amomin.w ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amomin.w, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amomin.w ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amomin.w, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amomin.w ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amomin.w, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amomin.w ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amomin.w, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amomin.w ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amomin.w, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amomin.w ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amomin.w, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amomin.w ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amomin.w, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amomin.w ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amomin.w, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amomin.w ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amomin.w, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amomin.w ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amomin.w, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amomin.w ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amomin.w, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amomin.w ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amomin.w, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amomin.w ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amomin.w, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amomin.w ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amomin.w, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amomin.w ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amomin.w, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amomin.w ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amomin.w, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amomin.w ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amomin.w, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amomin.w ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amomin.w, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amomin.w ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amomin.w, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amomin.w ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amomin.w, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amomin.w ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amomin.w, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amomin.w ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amomin.w, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amomin.w ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amomin.w, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amomin.w ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amomin.w, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amomin.w ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amomin.w, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amomin.w ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomin.w, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amomin.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amomin.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amominu.d-01.S b/riscv-test-suite/rv64i_m/A/src/amominu.d-01.S new file mode 100644 index 000000000..37ff51b3f --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amominu.d-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amominu.d instruction of the RISC-V RV64A extension for the amominu.d covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amominu.d) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amominu.d ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amominu.d, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amominu.d ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amominu.d, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amominu.d ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amominu.d, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amominu.d ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amominu.d, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amominu.d ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amominu.d, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amominu.d ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amominu.d, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amominu.d ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amominu.d, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amominu.d ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amominu.d, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amominu.d ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amominu.d, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amominu.d ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amominu.d, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amominu.d ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amominu.d, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amominu.d ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amominu.d, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amominu.d ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amominu.d, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amominu.d ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amominu.d, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amominu.d ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amominu.d, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amominu.d ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amominu.d, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amominu.d ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amominu.d, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amominu.d ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amominu.d, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amominu.d ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amominu.d, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amominu.d ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amominu.d, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amominu.d ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amominu.d, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amominu.d ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amominu.d, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amominu.d ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amominu.d, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amominu.d ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amominu.d, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amominu.d ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amominu.d, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amominu.d ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amominu.d, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amominu.d ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amominu.d, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amominu.d ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amominu.d, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amominu.d ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amominu.d, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amominu.d ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amominu.d, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amominu.d ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amominu.d, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amominu.d ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amominu.d, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amominu.d ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amominu.d, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amominu.d ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amominu.d, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amominu.d ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amominu.d, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amominu.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amominu.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amominu.w-01.S b/riscv-test-suite/rv64i_m/A/src/amominu.w-01.S new file mode 100644 index 000000000..589693479 --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amominu.w-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amominu.w instruction of the RISC-V RV64A extension for the amominu.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amominu.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amominu.w ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amominu.w, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amominu.w ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amominu.w, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amominu.w ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amominu.w, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amominu.w ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amominu.w, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amominu.w ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amominu.w, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amominu.w ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amominu.w, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amominu.w ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amominu.w, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amominu.w ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amominu.w, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amominu.w ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amominu.w, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amominu.w ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amominu.w, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amominu.w ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amominu.w, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amominu.w ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amominu.w, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amominu.w ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amominu.w, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amominu.w ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amominu.w, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amominu.w ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amominu.w, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amominu.w ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amominu.w, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amominu.w ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amominu.w, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amominu.w ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amominu.w, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amominu.w ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amominu.w, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amominu.w ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amominu.w, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amominu.w ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amominu.w, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amominu.w ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amominu.w, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amominu.w ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amominu.w, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amominu.w ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amominu.w, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amominu.w ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amominu.w, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amominu.w ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amominu.w, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amominu.w ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amominu.w, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amominu.w ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amominu.w, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amominu.w ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amominu.w, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amominu.w ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amominu.w, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amominu.w ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amominu.w, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amominu.w ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amominu.w, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amominu.w ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amominu.w, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amominu.w ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amominu.w, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amominu.w ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amominu.w, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amominu.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amominu.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amoor.d-01.S b/riscv-test-suite/rv64i_m/A/src/amoor.d-01.S new file mode 100644 index 000000000..832a1e368 --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoor.d-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoor.d instruction of the RISC-V RV64A extension for the amoor.d covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoor.d) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoor.d ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoor.d, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoor.d ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoor.d, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoor.d ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoor.d, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoor.d ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoor.d, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoor.d ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoor.d, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoor.d ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoor.d, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoor.d ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoor.d, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoor.d ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoor.d, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoor.d ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoor.d, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoor.d ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoor.d, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoor.d ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoor.d, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoor.d ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoor.d, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoor.d ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoor.d, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoor.d ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoor.d, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoor.d ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoor.d, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoor.d ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoor.d, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoor.d ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoor.d, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoor.d ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoor.d, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoor.d ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoor.d, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoor.d ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoor.d, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoor.d ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoor.d, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoor.d ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoor.d, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoor.d ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoor.d, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoor.d ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoor.d, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoor.d ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoor.d, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoor.d ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoor.d, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoor.d ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoor.d, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoor.d ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoor.d, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoor.d ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoor.d, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoor.d ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoor.d, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoor.d ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoor.d, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoor.d ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoor.d, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoor.d ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoor.d, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoor.d ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoor.d, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoor.d ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoor.d, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoor.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amoor.w-01.S b/riscv-test-suite/rv64i_m/A/src/amoor.w-01.S new file mode 100644 index 000000000..a915c98df --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoor.w-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoor.w instruction of the RISC-V RV64A extension for the amoor.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoor.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoor.w ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoor.w, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoor.w ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoor.w, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoor.w ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoor.w, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoor.w ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoor.w, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoor.w ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoor.w, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoor.w ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoor.w, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoor.w ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoor.w, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoor.w ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoor.w, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoor.w ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoor.w, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoor.w ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoor.w, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoor.w ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoor.w, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoor.w ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoor.w, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoor.w ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoor.w, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoor.w ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoor.w, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoor.w ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoor.w, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoor.w ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoor.w, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoor.w ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoor.w, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoor.w ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoor.w, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoor.w ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoor.w, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoor.w ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoor.w, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoor.w ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoor.w, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoor.w ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoor.w, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoor.w ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoor.w, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoor.w ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoor.w, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoor.w ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoor.w, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoor.w ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoor.w, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoor.w ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoor.w, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoor.w ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoor.w, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoor.w ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoor.w, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoor.w ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoor.w, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoor.w ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoor.w, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoor.w ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoor.w, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoor.w ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoor.w, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoor.w ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoor.w, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoor.w ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoor.w, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoor.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amoswap.d-01.S b/riscv-test-suite/rv64i_m/A/src/amoswap.d-01.S new file mode 100644 index 000000000..1828ecbef --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoswap.d-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoswap.d instruction of the RISC-V RV64A extension for the amoswap.d covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoswap.d) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoswap.d ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoswap.d, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoswap.d, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoswap.d ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoswap.d, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoswap.d ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoswap.d, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoswap.d ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoswap.d, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoswap.d ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoswap.d, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoswap.d ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoswap.d, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoswap.d ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoswap.d, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoswap.d ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoswap.d, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoswap.d ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoswap.d, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoswap.d ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoswap.d, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoswap.d ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoswap.d, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoswap.d ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoswap.d, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoswap.d ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoswap.d, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoswap.d ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoswap.d, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoswap.d ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoswap.d, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoswap.d ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoswap.d, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoswap.d ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoswap.d, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoswap.d ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoswap.d, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoswap.d ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoswap.d, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoswap.d ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoswap.d, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoswap.d ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoswap.d, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoswap.d ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoswap.d, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoswap.d ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoswap.d, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoswap.d ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoswap.d, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoswap.d ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoswap.d, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoswap.d ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoswap.d, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoswap.d ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoswap.d, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoswap.d ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoswap.d, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoswap.d ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoswap.d, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoswap.d ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoswap.d, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoswap.d ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoswap.d, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoswap.d ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoswap.d, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoswap.d ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoswap.d, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoswap.d ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoswap.d, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoswap.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoswap.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amoswap.w-01.S b/riscv-test-suite/rv64i_m/A/src/amoswap.w-01.S new file mode 100644 index 000000000..3ff72d03d --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoswap.w-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoswap.w instruction of the RISC-V RV64A extension for the amoswap.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoswap.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoswap.w ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoswap.w, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoswap.w, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoswap.w ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoswap.w, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoswap.w ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoswap.w, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoswap.w ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoswap.w, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoswap.w ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoswap.w, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoswap.w ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoswap.w, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoswap.w ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoswap.w, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoswap.w ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoswap.w, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoswap.w ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoswap.w, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoswap.w ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoswap.w, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoswap.w ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoswap.w, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoswap.w ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoswap.w, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoswap.w ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoswap.w, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoswap.w ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoswap.w, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoswap.w ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoswap.w, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoswap.w ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoswap.w, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoswap.w ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoswap.w, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoswap.w ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoswap.w, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoswap.w ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoswap.w, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoswap.w ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoswap.w, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoswap.w ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoswap.w, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoswap.w ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoswap.w, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoswap.w ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoswap.w, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoswap.w ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoswap.w, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoswap.w ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoswap.w, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoswap.w ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoswap.w, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoswap.w ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoswap.w, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoswap.w ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoswap.w, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoswap.w ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoswap.w, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoswap.w ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoswap.w, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoswap.w ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoswap.w, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoswap.w ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoswap.w, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoswap.w ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoswap.w, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoswap.w ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoswap.w, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoswap.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoswap.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amoxor.d-01.S b/riscv-test-suite/rv64i_m/A/src/amoxor.d-01.S new file mode 100644 index 000000000..ac794d853 --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoxor.d-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoxor.d instruction of the RISC-V RV64A extension for the amoxor.d covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoxor.d) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoxor.d ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoxor.d, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoxor.d, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoxor.d ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoxor.d, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoxor.d ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoxor.d, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoxor.d ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoxor.d, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoxor.d ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoxor.d, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoxor.d ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoxor.d, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoxor.d ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoxor.d, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoxor.d ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoxor.d, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoxor.d ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoxor.d, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoxor.d ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoxor.d, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoxor.d ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoxor.d, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoxor.d ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoxor.d, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoxor.d ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoxor.d, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoxor.d ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoxor.d, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoxor.d ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoxor.d, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoxor.d ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoxor.d, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoxor.d ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoxor.d, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoxor.d ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoxor.d, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoxor.d ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoxor.d, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoxor.d ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoxor.d, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoxor.d ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoxor.d, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoxor.d ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoxor.d, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoxor.d ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoxor.d, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoxor.d ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoxor.d, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoxor.d ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoxor.d, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoxor.d ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoxor.d, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoxor.d ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoxor.d, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoxor.d ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoxor.d, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoxor.d ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoxor.d, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoxor.d ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoxor.d, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoxor.d ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoxor.d, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoxor.d ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoxor.d, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoxor.d ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoxor.d, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoxor.d ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoxor.d, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoxor.d ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoxor.d, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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/A/src/amoxor.w-01.S b/riscv-test-suite/rv64i_m/A/src/amoxor.w-01.S new file mode 100644 index 000000000..be9cb60d7 --- /dev/null +++ b/riscv-test-suite/rv64i_m/A/src/amoxor.w-01.S @@ -0,0 +1,756 @@ + +// ----------- +// This file was generated by riscv_ctg (https://github.com/riscv-software-src/riscv-ctg) +// version : 0.11.0 +// timestamp : Wed Aug 2 21:16:09 2023 GMT +// usage : riscv_ctg \ +// -- cgf // --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/dataset.cgf \ +// --cgf /home/abd/abd-data/riscv-ctg/sample_cgfs/rv64ia.cgf \ + \ +// -- xlen 64 \ +// ----------- +// +// ----------- +// Copyright (c) 2020. RISC-V International. All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// ----------- +// +// This assembly file tests the amoxor.w instruction of the RISC-V RV64A extension for the amoxor.w covergroup. +// +#include "model_test.h" +#include "arch_test.h" +RVTEST_ISA("RV64IA") + +.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.*A.*);def TEST_CASE_1=True;",amoxor.w) + +RVTEST_SIGBASE(x1,signature_x1_1) + +inst_0: +// rs1 == rd != rs2, rs1==x31, rs2==x30, rd==x31, rs2_val == (-2**(xlen-1)), rs2_val == -9223372036854775808 +// opcode: amoxor.w ; op1:x31; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000000000 +TEST_AMO_OP(amoxor.w, x31, x31, x30, 0xfffffffffffffbff, -0x8000000000000000, x1, 0*XLEN/8) + +inst_1: +// rs2 == rd != rs1, rs1==x30, rs2==x29, rd==x29, rs2_val == (2**(xlen-1)-1), rs2_val == 9223372036854775807 +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x29; op1val:0xfffffffffffffbff; op2val:0x7fffffffffffffff +TEST_AMO_OP(amoxor.w, x29, x30, x29, 0xfffffffffffffbff, 0x7fffffffffffffff, x1, 2*XLEN/8) + +inst_2: +// rs1 != rs2 and rs1 != rd and rs2 != rd, rs1==x29, rs2==x31, rd==x30, rs2_val == 0, +// opcode: amoxor.w ; op1:x29; op2:x31; dest:x30; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoxor.w, x30, x29, x31, 0xfffffffffffffbff, 0x0, x1, 4*XLEN/8) + +inst_3: +// rs1==x28, rs2==x26, rd==x27, rs2_val == 1, +// opcode: amoxor.w ; op1:x28; op2:x26; dest:x27; op1val:0xfffffffffffffbff; op2val:0x1 +TEST_AMO_OP(amoxor.w, x27, x28, x26, 0xfffffffffffffbff, 0x1, x1, 6*XLEN/8) + +inst_4: +// rs1==x27, rs2==x28, rd==x26, rs2_val == 6148914691236517205, +// opcode: amoxor.w ; op1:x27; op2:x28; dest:x26; op1val:0xfffffffffffffbff; op2val:0x5555555555555555 +TEST_AMO_OP(amoxor.w, x26, x27, x28, 0xfffffffffffffbff, 0x5555555555555555, x1, 8*XLEN/8) + +inst_5: +// rs1==x26, rs2==x27, rd==x28, rs2_val == -6148914691236517206, +// opcode: amoxor.w ; op1:x26; op2:x27; dest:x28; op1val:0xfffffffffffffbff; op2val:-0x5555555555555556 +TEST_AMO_OP(amoxor.w, x28, x26, x27, 0xfffffffffffffbff, -0x5555555555555556, x1, 10*XLEN/8) + +inst_6: +// rs1==x25, rs2==x23, rd==x24, rs2_val == 2, +// opcode: amoxor.w ; op1:x25; op2:x23; dest:x24; op1val:0xfffffffffffffbff; op2val:0x2 +TEST_AMO_OP(amoxor.w, x24, x25, x23, 0xfffffffffffffbff, 0x2, x1, 12*XLEN/8) + +inst_7: +// rs1==x24, rs2==x25, rd==x23, rs2_val == -2, +// opcode: amoxor.w ; op1:x24; op2:x25; dest:x23; op1val:0xfffffffffffffbff; op2val:-0x2 +TEST_AMO_OP(amoxor.w, x23, x24, x25, 0xfffffffffffffbff, -0x2, x1, 14*XLEN/8) + +inst_8: +// rs1==x23, rs2==x24, rd==x25, rs2_val == -3, +// opcode: amoxor.w ; op1:x23; op2:x24; dest:x25; op1val:0xfffffffffffffbff; op2val:-0x3 +TEST_AMO_OP(amoxor.w, x25, x23, x24, 0xfffffffffffffbff, -0x3, x1, 16*XLEN/8) + +inst_9: +// rs1==x22, rs2==x20, rd==x21, rs2_val == -5, +// opcode: amoxor.w ; op1:x22; op2:x20; dest:x21; op1val:0xfffffffffffffbff; op2val:-0x5 +TEST_AMO_OP(amoxor.w, x21, x22, x20, 0xfffffffffffffbff, -0x5, x1, 18*XLEN/8) + +inst_10: +// rs1==x21, rs2==x22, rd==x20, rs2_val == -9, +// opcode: amoxor.w ; op1:x21; op2:x22; dest:x20; op1val:0xfffffffffffffbff; op2val:-0x9 +TEST_AMO_OP(amoxor.w, x20, x21, x22, 0xfffffffffffffbff, -0x9, x1, 20*XLEN/8) + +inst_11: +// rs1==x20, rs2==x21, rd==x22, rs2_val == -17, +// opcode: amoxor.w ; op1:x20; op2:x21; dest:x22; op1val:0xfffffffffffffbff; op2val:-0x11 +TEST_AMO_OP(amoxor.w, x22, x20, x21, 0xfffffffffffffbff, -0x11, x1, 22*XLEN/8) + +inst_12: +// rs1==x19, rs2==x17, rd==x18, rs2_val == -33, +// opcode: amoxor.w ; op1:x19; op2:x17; dest:x18; op1val:0xfffffffffffffbff; op2val:-0x21 +TEST_AMO_OP(amoxor.w, x18, x19, x17, 0xfffffffffffffbff, -0x21, x1, 24*XLEN/8) + +inst_13: +// rs1==x18, rs2==x19, rd==x17, rs2_val == -65, +// opcode: amoxor.w ; op1:x18; op2:x19; dest:x17; op1val:0xfffffffffffffbff; op2val:-0x41 +TEST_AMO_OP(amoxor.w, x17, x18, x19, 0xfffffffffffffbff, -0x41, x1, 26*XLEN/8) + +inst_14: +// rs1==x17, rs2==x18, rd==x19, rs2_val == -129, +// opcode: amoxor.w ; op1:x17; op2:x18; dest:x19; op1val:0xfffffffffffffbff; op2val:-0x81 +TEST_AMO_OP(amoxor.w, x19, x17, x18, 0xfffffffffffffbff, -0x81, x1, 28*XLEN/8) + +inst_15: +// rs1==x16, rs2==x14, rd==x15, rs2_val == -257, +// opcode: amoxor.w ; op1:x16; op2:x14; dest:x15; op1val:0xfffffffffffffbff; op2val:-0x101 +TEST_AMO_OP(amoxor.w, x15, x16, x14, 0xfffffffffffffbff, -0x101, x1, 30*XLEN/8) + +inst_16: +// rs1==x15, rs2==x16, rd==x14, rs2_val == -513, +// opcode: amoxor.w ; op1:x15; op2:x16; dest:x14; op1val:0xfffffffffffffbff; op2val:-0x201 +TEST_AMO_OP(amoxor.w, x14, x15, x16, 0xfffffffffffffbff, -0x201, x1, 32*XLEN/8) + +inst_17: +// rs1==x14, rs2==x15, rd==x16, rs2_val == -1025, +// opcode: amoxor.w ; op1:x14; op2:x15; dest:x16; op1val:0xfffffffffffffbff; op2val:-0x401 +TEST_AMO_OP(amoxor.w, x16, x14, x15, 0xfffffffffffffbff, -0x401, x1, 34*XLEN/8) + +inst_18: +// rs1==x13, rs2==x11, rd==x12, rs2_val == -2049, +// opcode: amoxor.w ; op1:x13; op2:x11; dest:x12; op1val:0xfffffffffffffbff; op2val:-0x801 +TEST_AMO_OP(amoxor.w, x12, x13, x11, 0xfffffffffffffbff, -0x801, x1, 36*XLEN/8) + +inst_19: +// rs1==x12, rs2==x13, rd==x11, rs2_val == -4097, +// opcode: amoxor.w ; op1:x12; op2:x13; dest:x11; op1val:0xfffffffffffffbff; op2val:-0x1001 +TEST_AMO_OP(amoxor.w, x11, x12, x13, 0xfffffffffffffbff, -0x1001, x1, 38*XLEN/8) + +inst_20: +// rs1==x11, rs2==x12, rd==x13, rs2_val == -8193, +// opcode: amoxor.w ; op1:x11; op2:x12; dest:x13; op1val:0xfffffffffffffbff; op2val:-0x2001 +TEST_AMO_OP(amoxor.w, x13, x11, x12, 0xfffffffffffffbff, -0x2001, x1, 40*XLEN/8) + +inst_21: +// rs1==x10, rs2==x8, rd==x9, rs2_val == -16385, +// opcode: amoxor.w ; op1:x10; op2:x8; dest:x9; op1val:0xfffffffffffffbff; op2val:-0x4001 +TEST_AMO_OP(amoxor.w, x9, x10, x8, 0xfffffffffffffbff, -0x4001, x1, 42*XLEN/8) + +inst_22: +// rs1==x9, rs2==x10, rd==x8, rs2_val == -32769, +// opcode: amoxor.w ; op1:x9; op2:x10; dest:x8; op1val:0xfffffffffffffbff; op2val:-0x8001 +TEST_AMO_OP(amoxor.w, x8, x9, x10, 0xfffffffffffffbff, -0x8001, x1, 44*XLEN/8) + +inst_23: +// rs1==x8, rs2==x9, rd==x10, rs2_val == -65537, +// opcode: amoxor.w ; op1:x8; op2:x9; dest:x10; op1val:0xfffffffffffffbff; op2val:-0x10001 +TEST_AMO_OP(amoxor.w, x10, x8, x9, 0xfffffffffffffbff, -0x10001, x1, 46*XLEN/8) + +inst_24: +// rs1==x7, rs2==x5, rd==x6, rs2_val == -131073, +// opcode: amoxor.w ; op1:x7; op2:x5; dest:x6; op1val:0xfffffffffffffbff; op2val:-0x20001 +TEST_AMO_OP(amoxor.w, x6, x7, x5, 0xfffffffffffffbff, -0x20001, x1, 48*XLEN/8) +RVTEST_SIGBASE(x8,signature_x8_0) + +inst_25: +// rs1==x6, rs2==x7, rd==x5, rs2_val == -262145, +// opcode: amoxor.w ; op1:x6; op2:x7; dest:x5; op1val:0xfffffffffffffbff; op2val:-0x40001 +TEST_AMO_OP(amoxor.w, x5, x6, x7, 0xfffffffffffffbff, -0x40001, x8, 0*XLEN/8) + +inst_26: +// rs1==x5, rs2==x6, rd==x7, rs2_val == -524289, +// opcode: amoxor.w ; op1:x5; op2:x6; dest:x7; op1val:0xfffffffffffffbff; op2val:-0x80001 +TEST_AMO_OP(amoxor.w, x7, x5, x6, 0xfffffffffffffbff, -0x80001, x8, 2*XLEN/8) + +inst_27: +// rs1==x4, rs2==x2, rd==x3, rs2_val == -1048577, +// opcode: amoxor.w ; op1:x4; op2:x2; dest:x3; op1val:0xfffffffffffffbff; op2val:-0x100001 +TEST_AMO_OP(amoxor.w, x3, x4, x2, 0xfffffffffffffbff, -0x100001, x8, 4*XLEN/8) + +inst_28: +// rs1==x3, rs2==x4, rd==x2, rs2_val == -2097153, +// opcode: amoxor.w ; op1:x3; op2:x4; dest:x2; op1val:0xfffffffffffffbff; op2val:-0x200001 +TEST_AMO_OP(amoxor.w, x2, x3, x4, 0xfffffffffffffbff, -0x200001, x8, 6*XLEN/8) + +inst_29: +// rs1==x2, rs2==x3, rd==x4, rs2_val == -4194305, +// opcode: amoxor.w ; op1:x2; op2:x3; dest:x4; op1val:0xfffffffffffffbff; op2val:-0x400001 +TEST_AMO_OP(amoxor.w, x4, x2, x3, 0xfffffffffffffbff, -0x400001, x8, 8*XLEN/8) + +inst_30: +// rs1==x1, rs2_val == -8388609, +// opcode: amoxor.w ; op1:x1; op2:x30; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800001 +TEST_AMO_OP(amoxor.w, x31, x1, x30, 0xfffffffffffffbff, -0x800001, x8, 10*XLEN/8) + +inst_31: +// rs2==x1, rs2_val == -16777217, +// opcode: amoxor.w ; op1:x30; op2:x1; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000001 +TEST_AMO_OP(amoxor.w, x31, x30, x1, 0xfffffffffffffbff, -0x1000001, x8, 12*XLEN/8) + +inst_32: +// rs2==x0, rs2_val == -33554433, +// opcode: amoxor.w ; op1:x30; op2:x0; dest:x31; op1val:0xfffffffffffffbff; op2val:0x0 +TEST_AMO_OP(amoxor.w, x31, x30, x0, 0xfffffffffffffbff, 0x0, x8, 14*XLEN/8) + +inst_33: +// rd==x1, rs2_val == -67108865, +// opcode: amoxor.w ; op1:x31; op2:x30; dest:x1; op1val:0xfffffffffffffbff; op2val:-0x4000001 +TEST_AMO_OP(amoxor.w, x1, x31, x30, 0xfffffffffffffbff, -0x4000001, x8, 16*XLEN/8) + +inst_34: +// rd==x0, rs2_val == -134217729, +// opcode: amoxor.w ; op1:x31; op2:x30; dest:x0; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoxor.w, x0, x31, x30, 0xfffffffffffffbff, -0x8000001, x8, 18*XLEN/8) + +inst_35: +// rs2_val == -268435457, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000001, x8, 20*XLEN/8) + +inst_36: +// rs2_val == -536870913, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000001, x8, 22*XLEN/8) + +inst_37: +// rs2_val == -1073741825, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000001, x8, 24*XLEN/8) + +inst_38: +// rs2_val == -2147483649, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000001, x8, 26*XLEN/8) + +inst_39: +// rs2_val == -4294967297, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000001, x8, 28*XLEN/8) + +inst_40: +// rs2_val == -8589934593, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000001, x8, 30*XLEN/8) + +inst_41: +// rs2_val == -17179869185, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000001, x8, 32*XLEN/8) + +inst_42: +// rs2_val == -34359738369, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000001, x8, 34*XLEN/8) + +inst_43: +// rs2_val == -68719476737, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000001, x8, 36*XLEN/8) + +inst_44: +// rs2_val == -137438953473, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000001, x8, 38*XLEN/8) + +inst_45: +// rs2_val == -274877906945, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000001, x8, 40*XLEN/8) + +inst_46: +// rs2_val == -549755813889, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000001, x8, 42*XLEN/8) + +inst_47: +// rs2_val == -1099511627777, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000001, x8, 44*XLEN/8) + +inst_48: +// rs2_val == -2199023255553, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000001, x8, 46*XLEN/8) + +inst_49: +// rs2_val == -4398046511105, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000001, x8, 48*XLEN/8) + +inst_50: +// rs2_val == -8796093022209, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000001, x8, 50*XLEN/8) + +inst_51: +// rs2_val == -17592186044417, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000001, x8, 52*XLEN/8) + +inst_52: +// rs2_val == -35184372088833, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000001, x8, 54*XLEN/8) + +inst_53: +// rs2_val == -70368744177665, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000001, x8, 56*XLEN/8) + +inst_54: +// rs2_val == -140737488355329, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000001, x8, 58*XLEN/8) + +inst_55: +// rs2_val == -281474976710657, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000001, x8, 60*XLEN/8) + +inst_56: +// rs2_val == -562949953421313, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000001, x8, 62*XLEN/8) + +inst_57: +// rs2_val == -1125899906842625, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000001, x8, 64*XLEN/8) + +inst_58: +// rs2_val == -2251799813685249, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000000000001, x8, 66*XLEN/8) + +inst_59: +// rs2_val == -4503599627370497, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x10000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x10000000000001, x8, 68*XLEN/8) + +inst_60: +// rs2_val == -9007199254740993, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x20000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x20000000000001, x8, 70*XLEN/8) + +inst_61: +// rs2_val == -18014398509481985, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x40000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x40000000000001, x8, 72*XLEN/8) + +inst_62: +// rs2_val == -36028797018963969, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x80000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x80000000000001, x8, 74*XLEN/8) + +inst_63: +// rs2_val == -72057594037927937, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x100000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x100000000000001, x8, 76*XLEN/8) + +inst_64: +// rs2_val == -144115188075855873, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x200000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x200000000000001, x8, 78*XLEN/8) + +inst_65: +// rs2_val == -288230376151711745, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x400000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x400000000000001, x8, 80*XLEN/8) + +inst_66: +// rs2_val == -576460752303423489, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x800000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x800000000000001, x8, 82*XLEN/8) + +inst_67: +// rs2_val == -1152921504606846977, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x1000000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x1000000000000001, x8, 84*XLEN/8) + +inst_68: +// rs2_val == 576460752303423488, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000000, x8, 86*XLEN/8) + +inst_69: +// rs2_val == 1152921504606846976, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000000, x8, 88*XLEN/8) + +inst_70: +// rs2_val == 2305843009213693952, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000000, x8, 90*XLEN/8) + +inst_71: +// rs2_val == 4611686018427387904, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000000, x8, 92*XLEN/8) + +inst_72: +// rs2_val == -2305843009213693953, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000000000000001, x8, 94*XLEN/8) + +inst_73: +// rs2_val == -4611686018427387905, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x4000000000000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x4000000000000001, x8, 96*XLEN/8) + +inst_74: +// rs2_val == 4, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4, x8, 98*XLEN/8) + +inst_75: +// rs2_val == 8, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8, x8, 100*XLEN/8) + +inst_76: +// rs2_val == 16, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10, x8, 102*XLEN/8) + +inst_77: +// rs2_val == 32, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20, x8, 104*XLEN/8) + +inst_78: +// rs2_val == 64, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40, x8, 106*XLEN/8) + +inst_79: +// rs2_val == 128, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80, x8, 108*XLEN/8) + +inst_80: +// rs2_val == 256, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100, x8, 110*XLEN/8) + +inst_81: +// rs2_val == 512, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200, x8, 112*XLEN/8) + +inst_82: +// rs2_val == 1024, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400, x8, 114*XLEN/8) + +inst_83: +// rs2_val == 2048, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800, x8, 116*XLEN/8) + +inst_84: +// rs2_val == 4096, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000, x8, 118*XLEN/8) + +inst_85: +// rs2_val == 8192, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000, x8, 120*XLEN/8) + +inst_86: +// rs2_val == 16384, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000, x8, 122*XLEN/8) + +inst_87: +// rs2_val == 32768, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000, x8, 124*XLEN/8) + +inst_88: +// rs2_val == 65536, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000, x8, 126*XLEN/8) + +inst_89: +// rs2_val == 131072, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000, x8, 128*XLEN/8) + +inst_90: +// rs2_val == 262144, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000, x8, 130*XLEN/8) + +inst_91: +// rs2_val == 524288, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000, x8, 132*XLEN/8) + +inst_92: +// rs2_val == 1048576, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000, x8, 134*XLEN/8) + +inst_93: +// rs2_val == 2097152, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000, x8, 136*XLEN/8) + +inst_94: +// rs2_val == 4194304, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000, x8, 138*XLEN/8) + +inst_95: +// rs2_val == 8388608, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000, x8, 140*XLEN/8) + +inst_96: +// rs2_val == 16777216, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000, x8, 142*XLEN/8) + +inst_97: +// rs2_val == 33554432, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000, x8, 144*XLEN/8) + +inst_98: +// rs2_val == 67108864, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000, x8, 146*XLEN/8) + +inst_99: +// rs2_val == 134217728, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000, x8, 148*XLEN/8) + +inst_100: +// rs2_val == 268435456, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000, x8, 150*XLEN/8) + +inst_101: +// rs2_val == 536870912, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000, x8, 152*XLEN/8) + +inst_102: +// rs2_val == 1073741824, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000, x8, 154*XLEN/8) + +inst_103: +// rs2_val == 2147483648, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000, x8, 156*XLEN/8) + +inst_104: +// rs2_val == 4294967296, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000, x8, 158*XLEN/8) + +inst_105: +// rs2_val == 8589934592, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000, x8, 160*XLEN/8) + +inst_106: +// rs2_val == 17179869184, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000, x8, 162*XLEN/8) + +inst_107: +// rs2_val == 34359738368, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000, x8, 164*XLEN/8) + +inst_108: +// rs2_val == 68719476736, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000, x8, 166*XLEN/8) + +inst_109: +// rs2_val == 137438953472, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000, x8, 168*XLEN/8) + +inst_110: +// rs2_val == 274877906944, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000, x8, 170*XLEN/8) + +inst_111: +// rs2_val == 549755813888, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000, x8, 172*XLEN/8) + +inst_112: +// rs2_val == 1099511627776, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000, x8, 174*XLEN/8) + +inst_113: +// rs2_val == 2199023255552, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000, x8, 176*XLEN/8) + +inst_114: +// rs2_val == 4398046511104, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000, x8, 178*XLEN/8) + +inst_115: +// rs2_val == 8796093022208, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000, x8, 180*XLEN/8) + +inst_116: +// rs2_val == 17592186044416, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000, x8, 182*XLEN/8) + +inst_117: +// rs2_val == 35184372088832, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000, x8, 184*XLEN/8) + +inst_118: +// rs2_val == 70368744177664, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000, x8, 186*XLEN/8) + +inst_119: +// rs2_val == 140737488355328, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x800000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x800000000000, x8, 188*XLEN/8) + +inst_120: +// rs2_val == 281474976710656, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x1000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x1000000000000, x8, 190*XLEN/8) + +inst_121: +// rs2_val == 562949953421312, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x2000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x2000000000000, x8, 192*XLEN/8) + +inst_122: +// rs2_val == 1125899906842624, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x4000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x4000000000000, x8, 194*XLEN/8) + +inst_123: +// rs2_val == 2251799813685248, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x8000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x8000000000000, x8, 196*XLEN/8) + +inst_124: +// rs2_val == 4503599627370496, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x10000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x10000000000000, x8, 198*XLEN/8) + +inst_125: +// rs2_val == 9007199254740992, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x20000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x20000000000000, x8, 200*XLEN/8) + +inst_126: +// rs2_val == 18014398509481984, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x40000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x40000000000000, x8, 202*XLEN/8) + +inst_127: +// rs2_val == 36028797018963968, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x80000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x80000000000000, x8, 204*XLEN/8) + +inst_128: +// rs2_val == 72057594037927936, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x100000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x100000000000000, x8, 206*XLEN/8) + +inst_129: +// rs2_val == 144115188075855872, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x200000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x200000000000000, x8, 208*XLEN/8) + +inst_130: +// rs2_val == 288230376151711744, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:0x400000000000000 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, 0x400000000000000, x8, 210*XLEN/8) + +inst_131: +// rs2_val == -33554433, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x2000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x2000001, x8, 212*XLEN/8) + +inst_132: +// rs2_val == -134217729, +// opcode: amoxor.w ; op1:x30; op2:x29; dest:x31; op1val:0xfffffffffffffbff; op2val:-0x8000001 +TEST_AMO_OP(amoxor.w, x31, x30, x29, 0xfffffffffffffbff, -0x8000001, x8, 214*XLEN/8) +#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_x1_0: + .fill 0*((XLEN/8)/4),4,0xdeadbeef + + +signature_x1_1: + .fill 50*((XLEN/8)/4),4,0xdeadbeef + + +signature_x8_0: + .fill 216*((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 From 2276c09e82503db9fedeef03fa398ebfb91020d7 Mon Sep 17 00:00:00 2001 From: Abdul Wadood Date: Thu, 3 Aug 2023 04:35:50 +0500 Subject: [PATCH 3/4] Update Changelog Signed-off-by: Abdul Wadood --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d682b8bb..96dcc2a41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## [3.7.1] - 2023-08-03 +- Add ACTs for Atomic Extension excluding Lr/Sc Instructions. +- Added Test macro for the execution of atomic instructions. + ## [3.7.0] - 2023-05-16 - Updated the LI macro - Make Trap handler compatible for RV32E From c4a7733a26223eb59ef83e7bc303b32f4d3a1e8d Mon Sep 17 00:00:00 2001 From: ahadali5000 Date: Mon, 4 Sep 2023 18:23:42 +0500 Subject: [PATCH 4/4] Added Test macro for AMO Ops --- riscv-test-suite/env/test_macros.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/riscv-test-suite/env/test_macros.h b/riscv-test-suite/env/test_macros.h index 6426d92f8..7d9c646e7 100644 --- a/riscv-test-suite/env/test_macros.h +++ b/riscv-test-suite/env/test_macros.h @@ -472,6 +472,18 @@ RVTEST_SIGUPD_F(swreg,destreg,flagreg) RVTEST_SIGUPD_FID(swreg,destreg,flagreg) ;\ RVMODEL_IO_ASSERT_GPR_EQ(testreg, destreg, correctval) +//Tests for atomic memory operation(AMO) instructions +#define TEST_AMO_OP(inst, destreg, origptr, reg2, origval, updval, sigptr, ...) ;\ + .if NARG(__VA_ARGS__) == 1 ;\ + .set offset,_ARG1(__VA_OPT__(__VA_ARGS__,0)) ;\ + .endif ;\ + LI(reg2, MASK_XLEN(origval)) ;\ + RVTEST_SIGUPD(sigptr, reg2) /*Write original AMO src */ ;\ + LI(reg2, MASK_XLEN(updval)) ;\ + addi origptr, sigptr, offset-REGWIDTH /* Calculate where orig AMO src is stored */ ;\ + inst destreg, reg2, (origptr) /*origval -> destreg; updated val -> (origptr) */ ;\ + RVTEST_SIGUPD(sigptr, destreg) /* write original AMO val */ + #define TEST_AUIPC(inst, destreg, correctval, imm, swreg, offset, testreg) ;\ TEST_CASE(testreg, destreg, correctval, swreg, offset, \ LA testreg, 1f ;\