From d4f33092406cbed65d98f4c342579f617ad8a99c Mon Sep 17 00:00:00 2001
From: Robert Norton
Date: Wed, 31 Jan 2018 10:54:48 +0000
Subject: add some elf files from riscv test suite and run them on riscv model.
---
test/riscv/run_tests.sh | 17 +-
test/riscv/tests/README | 27 +
test/riscv/tests/rv64ua-p-amoadd_d.dump | 153 +
test/riscv/tests/rv64ua-p-amoadd_d.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amoadd_w.dump | 124 +
test/riscv/tests/rv64ua-p-amoadd_w.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amoand_d.dump | 124 +
test/riscv/tests/rv64ua-p-amoand_d.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amoand_w.dump | 125 +
test/riscv/tests/rv64ua-p-amoand_w.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amomax_d.dump | 125 +
test/riscv/tests/rv64ua-p-amomax_d.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amomax_w.dump | 125 +
test/riscv/tests/rv64ua-p-amomax_w.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amomaxu_d.dump | 125 +
test/riscv/tests/rv64ua-p-amomaxu_d.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amomaxu_w.dump | 125 +
test/riscv/tests/rv64ua-p-amomaxu_w.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amomin_d.dump | 125 +
test/riscv/tests/rv64ua-p-amomin_d.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amomin_w.dump | 125 +
test/riscv/tests/rv64ua-p-amomin_w.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amominu_d.dump | 125 +
test/riscv/tests/rv64ua-p-amominu_d.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amominu_w.dump | 125 +
test/riscv/tests/rv64ua-p-amominu_w.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amoor_d.dump | 126 +
test/riscv/tests/rv64ua-p-amoor_d.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amoor_w.dump | 126 +
test/riscv/tests/rv64ua-p-amoor_w.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amoswap_d.dump | 124 +
test/riscv/tests/rv64ua-p-amoswap_d.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amoswap_w.dump | 125 +
test/riscv/tests/rv64ua-p-amoswap_w.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amoxor_d.dump | 155 +
test/riscv/tests/rv64ua-p-amoxor_d.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-amoxor_w.dump | 153 +
test/riscv/tests/rv64ua-p-amoxor_w.elf | Bin 0 -> 9504 bytes
test/riscv/tests/rv64ua-p-lrsc.dump | 178 ++
test/riscv/tests/rv64ua-p-lrsc.elf | Bin 0 -> 13576 bytes
test/riscv/tests/rv64uc-p-rvc.dump | 4878 ++++++++++++++++++++++++++++++
test/riscv/tests/rv64uc-p-rvc.elf | Bin 0 -> 18392 bytes
test/riscv/tests/rv64ui-p-add.dump | 506 ++++
test/riscv/tests/rv64ui-p-add.elf | Bin 0 -> 10432 bytes
test/riscv/tests/rv64ui-p-addi.dump | 312 ++
test/riscv/tests/rv64ui-p-addi.elf | Bin 0 -> 10016 bytes
test/riscv/tests/rv64ui-p-addiw.dump | 315 ++
test/riscv/tests/rv64ui-p-addiw.elf | Bin 0 -> 10016 bytes
test/riscv/tests/rv64ui-p-addw.dump | 479 +++
test/riscv/tests/rv64ui-p-addw.elf | Bin 0 -> 10432 bytes
test/riscv/tests/rv64ui-p-and.dump | 491 +++
test/riscv/tests/rv64ui-p-and.elf | Bin 0 -> 10080 bytes
test/riscv/tests/rv64ui-p-andi.dump | 265 ++
test/riscv/tests/rv64ui-p-andi.elf | Bin 0 -> 9664 bytes
test/riscv/tests/rv64ui-p-auipc.dump | 125 +
test/riscv/tests/rv64ui-p-auipc.elf | Bin 0 -> 9320 bytes
test/riscv/tests/rv64ui-p-beq.dump | 325 ++
test/riscv/tests/rv64ui-p-beq.elf | Bin 0 -> 9888 bytes
test/riscv/tests/rv64ui-p-bge.dump | 339 +++
test/riscv/tests/rv64ui-p-bge.elf | Bin 0 -> 9984 bytes
test/riscv/tests/rv64ui-p-bgeu.dump | 413 +++
test/riscv/tests/rv64ui-p-bgeu.elf | Bin 0 -> 9984 bytes
test/riscv/tests/rv64ui-p-blt.dump | 325 ++
test/riscv/tests/rv64ui-p-blt.elf | Bin 0 -> 9888 bytes
test/riscv/tests/rv64ui-p-bltu.dump | 371 +++
test/riscv/tests/rv64ui-p-bltu.elf | Bin 0 -> 9888 bytes
test/riscv/tests/rv64ui-p-bne.dump | 324 ++
test/riscv/tests/rv64ui-p-bne.elf | Bin 0 -> 9888 bytes
test/riscv/tests/rv64ui-p-fence_i.dump | 189 ++
test/riscv/tests/rv64ui-p-fence_i.elf | Bin 0 -> 13480 bytes
test/riscv/tests/rv64ui-p-jal.dump | 128 +
test/riscv/tests/rv64ui-p-jal.elf | Bin 0 -> 9384 bytes
test/riscv/tests/rv64ui-p-jalr.dump | 166 +
test/riscv/tests/rv64ui-p-jalr.elf | Bin 0 -> 9480 bytes
test/riscv/tests/rv64ui-p-lb.dump | 306 ++
test/riscv/tests/rv64ui-p-lb.elf | Bin 0 -> 14104 bytes
test/riscv/tests/rv64ui-p-lbu.dump | 306 ++
test/riscv/tests/rv64ui-p-lbu.elf | Bin 0 -> 14104 bytes
test/riscv/tests/rv64ui-p-ld.dump | 406 +++
test/riscv/tests/rv64ui-p-ld.elf | Bin 0 -> 14120 bytes
test/riscv/tests/rv64ui-p-lh.dump | 327 ++
test/riscv/tests/rv64ui-p-lh.elf | Bin 0 -> 14104 bytes
test/riscv/tests/rv64ui-p-lhu.dump | 322 ++
test/riscv/tests/rv64ui-p-lhu.elf | Bin 0 -> 14104 bytes
test/riscv/tests/rv64ui-p-lui.dump | 127 +
test/riscv/tests/rv64ui-p-lui.elf | Bin 0 -> 9408 bytes
test/riscv/tests/rv64ui-p-lw.dump | 319 ++
test/riscv/tests/rv64ui-p-lw.elf | Bin 0 -> 14104 bytes
test/riscv/tests/rv64ui-p-lwu.dump | 333 ++
test/riscv/tests/rv64ui-p-lwu.elf | Bin 0 -> 14104 bytes
test/riscv/tests/rv64ui-p-or.dump | 522 ++++
test/riscv/tests/rv64ui-p-or.elf | Bin 0 -> 10080 bytes
test/riscv/tests/rv64ui-p-ori.dump | 268 ++
test/riscv/tests/rv64ui-p-ori.elf | Bin 0 -> 9664 bytes
test/riscv/tests/rv64ui-p-sb.dump | 447 +++
test/riscv/tests/rv64ui-p-sb.elf | Bin 0 -> 14416 bytes
test/riscv/tests/rv64ui-p-sd.dump | 594 ++++
test/riscv/tests/rv64ui-p-sd.elf | Bin 0 -> 14480 bytes
test/riscv/tests/rv64ui-p-sh.dump | 480 +++
test/riscv/tests/rv64ui-p-sh.elf | Bin 0 -> 14432 bytes
test/riscv/tests/rv64ui-p-simple.dump | 110 +
test/riscv/tests/rv64ui-p-simple.elf | Bin 0 -> 9200 bytes
test/riscv/tests/rv64ui-p-sll.dump | 580 ++++
test/riscv/tests/rv64ui-p-sll.elf | Bin 0 -> 10688 bytes
test/riscv/tests/rv64ui-p-slli.dump | 354 +++
test/riscv/tests/rv64ui-p-slli.elf | Bin 0 -> 10112 bytes
test/riscv/tests/rv64ui-p-slliw.dump | 316 ++
test/riscv/tests/rv64ui-p-slliw.elf | Bin 0 -> 10016 bytes
test/riscv/tests/rv64ui-p-sllw.dump | 550 ++++
test/riscv/tests/rv64ui-p-sllw.elf | Bin 0 -> 10592 bytes
test/riscv/tests/rv64ui-p-slt.dump | 485 +++
test/riscv/tests/rv64ui-p-slt.elf | Bin 0 -> 10432 bytes
test/riscv/tests/rv64ui-p-slti.dump | 320 ++
test/riscv/tests/rv64ui-p-slti.elf | Bin 0 -> 10016 bytes
test/riscv/tests/rv64ui-p-sltiu.dump | 320 ++
test/riscv/tests/rv64ui-p-sltiu.elf | Bin 0 -> 10016 bytes
test/riscv/tests/rv64ui-p-sltu.dump | 500 +++
test/riscv/tests/rv64ui-p-sltu.elf | Bin 0 -> 10432 bytes
test/riscv/tests/rv64ui-p-sra.dump | 538 ++++
test/riscv/tests/rv64ui-p-sra.elf | Bin 0 -> 10592 bytes
test/riscv/tests/rv64ui-p-srai.dump | 333 ++
test/riscv/tests/rv64ui-p-srai.elf | Bin 0 -> 10016 bytes
test/riscv/tests/rv64ui-p-sraiw.dump | 359 +++
test/riscv/tests/rv64ui-p-sraiw.elf | Bin 0 -> 10080 bytes
test/riscv/tests/rv64ui-p-sraw.dump | 538 ++++
test/riscv/tests/rv64ui-p-sraw.elf | Bin 0 -> 10592 bytes
test/riscv/tests/rv64ui-p-srl.dump | 575 ++++
test/riscv/tests/rv64ui-p-srl.elf | Bin 0 -> 10592 bytes
test/riscv/tests/rv64ui-p-srli.dump | 350 +++
test/riscv/tests/rv64ui-p-srli.elf | Bin 0 -> 10016 bytes
test/riscv/tests/rv64ui-p-srliw.dump | 309 ++
test/riscv/tests/rv64ui-p-srliw.elf | Bin 0 -> 10016 bytes
test/riscv/tests/rv64ui-p-srlw.dump | 544 ++++
test/riscv/tests/rv64ui-p-srlw.elf | Bin 0 -> 10592 bytes
test/riscv/tests/rv64ui-p-sub.dump | 481 +++
test/riscv/tests/rv64ui-p-sub.elf | Bin 0 -> 10400 bytes
test/riscv/tests/rv64ui-p-subw.dump | 485 +++
test/riscv/tests/rv64ui-p-subw.elf | Bin 0 -> 10400 bytes
test/riscv/tests/rv64ui-p-sw.dump | 476 +++
test/riscv/tests/rv64ui-p-sw.elf | Bin 0 -> 14448 bytes
test/riscv/tests/rv64ui-p-xor.dump | 527 ++++
test/riscv/tests/rv64ui-p-xor.elf | Bin 0 -> 10080 bytes
test/riscv/tests/rv64ui-p-xori.dump | 238 ++
test/riscv/tests/rv64ui-p-xori.elf | Bin 0 -> 9664 bytes
test/riscv/tests/rv64um-p-div.dump | 195 ++
test/riscv/tests/rv64um-p-div.elf | Bin 0 -> 9536 bytes
test/riscv/tests/rv64um-p-divu.dump | 189 ++
test/riscv/tests/rv64um-p-divu.elf | Bin 0 -> 9536 bytes
test/riscv/tests/rv64um-p-divuw.dump | 197 ++
test/riscv/tests/rv64um-p-divuw.elf | Bin 0 -> 9536 bytes
test/riscv/tests/rv64um-p-divw.dump | 168 +
test/riscv/tests/rv64um-p-divw.elf | Bin 0 -> 9536 bytes
test/riscv/tests/rv64um-p-mul.dump | 474 +++
test/riscv/tests/rv64um-p-mul.elf | Bin 0 -> 10272 bytes
test/riscv/tests/rv64um-p-mulh.dump | 456 +++
test/riscv/tests/rv64um-p-mulh.elf | Bin 0 -> 10144 bytes
test/riscv/tests/rv64um-p-mulhsu.dump | 456 +++
test/riscv/tests/rv64um-p-mulhsu.elf | Bin 0 -> 10144 bytes
test/riscv/tests/rv64um-p-mulhu.dump | 492 +++
test/riscv/tests/rv64um-p-mulhu.elf | Bin 0 -> 10208 bytes
test/riscv/tests/rv64um-p-mulw.dump | 399 +++
test/riscv/tests/rv64um-p-mulw.elf | Bin 0 -> 10144 bytes
test/riscv/tests/rv64um-p-rem.dump | 196 ++
test/riscv/tests/rv64um-p-rem.elf | Bin 0 -> 9536 bytes
test/riscv/tests/rv64um-p-remu.dump | 195 ++
test/riscv/tests/rv64um-p-remu.elf | Bin 0 -> 9536 bytes
test/riscv/tests/rv64um-p-remuw.dump | 168 +
test/riscv/tests/rv64um-p-remuw.elf | Bin 0 -> 9536 bytes
test/riscv/tests/rv64um-p-remw.dump | 196 ++
test/riscv/tests/rv64um-p-remw.elf | Bin 0 -> 9568 bytes
170 files changed, 30330 insertions(+), 4 deletions(-)
create mode 100644 test/riscv/tests/README
create mode 100644 test/riscv/tests/rv64ua-p-amoadd_d.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoadd_d.elf
create mode 100644 test/riscv/tests/rv64ua-p-amoadd_w.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoadd_w.elf
create mode 100644 test/riscv/tests/rv64ua-p-amoand_d.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoand_d.elf
create mode 100644 test/riscv/tests/rv64ua-p-amoand_w.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoand_w.elf
create mode 100644 test/riscv/tests/rv64ua-p-amomax_d.dump
create mode 100755 test/riscv/tests/rv64ua-p-amomax_d.elf
create mode 100644 test/riscv/tests/rv64ua-p-amomax_w.dump
create mode 100755 test/riscv/tests/rv64ua-p-amomax_w.elf
create mode 100644 test/riscv/tests/rv64ua-p-amomaxu_d.dump
create mode 100755 test/riscv/tests/rv64ua-p-amomaxu_d.elf
create mode 100644 test/riscv/tests/rv64ua-p-amomaxu_w.dump
create mode 100755 test/riscv/tests/rv64ua-p-amomaxu_w.elf
create mode 100644 test/riscv/tests/rv64ua-p-amomin_d.dump
create mode 100755 test/riscv/tests/rv64ua-p-amomin_d.elf
create mode 100644 test/riscv/tests/rv64ua-p-amomin_w.dump
create mode 100755 test/riscv/tests/rv64ua-p-amomin_w.elf
create mode 100644 test/riscv/tests/rv64ua-p-amominu_d.dump
create mode 100755 test/riscv/tests/rv64ua-p-amominu_d.elf
create mode 100644 test/riscv/tests/rv64ua-p-amominu_w.dump
create mode 100755 test/riscv/tests/rv64ua-p-amominu_w.elf
create mode 100644 test/riscv/tests/rv64ua-p-amoor_d.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoor_d.elf
create mode 100644 test/riscv/tests/rv64ua-p-amoor_w.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoor_w.elf
create mode 100644 test/riscv/tests/rv64ua-p-amoswap_d.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoswap_d.elf
create mode 100644 test/riscv/tests/rv64ua-p-amoswap_w.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoswap_w.elf
create mode 100644 test/riscv/tests/rv64ua-p-amoxor_d.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoxor_d.elf
create mode 100644 test/riscv/tests/rv64ua-p-amoxor_w.dump
create mode 100755 test/riscv/tests/rv64ua-p-amoxor_w.elf
create mode 100644 test/riscv/tests/rv64ua-p-lrsc.dump
create mode 100755 test/riscv/tests/rv64ua-p-lrsc.elf
create mode 100644 test/riscv/tests/rv64uc-p-rvc.dump
create mode 100755 test/riscv/tests/rv64uc-p-rvc.elf
create mode 100644 test/riscv/tests/rv64ui-p-add.dump
create mode 100755 test/riscv/tests/rv64ui-p-add.elf
create mode 100644 test/riscv/tests/rv64ui-p-addi.dump
create mode 100755 test/riscv/tests/rv64ui-p-addi.elf
create mode 100644 test/riscv/tests/rv64ui-p-addiw.dump
create mode 100755 test/riscv/tests/rv64ui-p-addiw.elf
create mode 100644 test/riscv/tests/rv64ui-p-addw.dump
create mode 100755 test/riscv/tests/rv64ui-p-addw.elf
create mode 100644 test/riscv/tests/rv64ui-p-and.dump
create mode 100755 test/riscv/tests/rv64ui-p-and.elf
create mode 100644 test/riscv/tests/rv64ui-p-andi.dump
create mode 100755 test/riscv/tests/rv64ui-p-andi.elf
create mode 100644 test/riscv/tests/rv64ui-p-auipc.dump
create mode 100755 test/riscv/tests/rv64ui-p-auipc.elf
create mode 100644 test/riscv/tests/rv64ui-p-beq.dump
create mode 100755 test/riscv/tests/rv64ui-p-beq.elf
create mode 100644 test/riscv/tests/rv64ui-p-bge.dump
create mode 100755 test/riscv/tests/rv64ui-p-bge.elf
create mode 100644 test/riscv/tests/rv64ui-p-bgeu.dump
create mode 100755 test/riscv/tests/rv64ui-p-bgeu.elf
create mode 100644 test/riscv/tests/rv64ui-p-blt.dump
create mode 100755 test/riscv/tests/rv64ui-p-blt.elf
create mode 100644 test/riscv/tests/rv64ui-p-bltu.dump
create mode 100755 test/riscv/tests/rv64ui-p-bltu.elf
create mode 100644 test/riscv/tests/rv64ui-p-bne.dump
create mode 100755 test/riscv/tests/rv64ui-p-bne.elf
create mode 100644 test/riscv/tests/rv64ui-p-fence_i.dump
create mode 100755 test/riscv/tests/rv64ui-p-fence_i.elf
create mode 100644 test/riscv/tests/rv64ui-p-jal.dump
create mode 100755 test/riscv/tests/rv64ui-p-jal.elf
create mode 100644 test/riscv/tests/rv64ui-p-jalr.dump
create mode 100755 test/riscv/tests/rv64ui-p-jalr.elf
create mode 100644 test/riscv/tests/rv64ui-p-lb.dump
create mode 100755 test/riscv/tests/rv64ui-p-lb.elf
create mode 100644 test/riscv/tests/rv64ui-p-lbu.dump
create mode 100755 test/riscv/tests/rv64ui-p-lbu.elf
create mode 100644 test/riscv/tests/rv64ui-p-ld.dump
create mode 100755 test/riscv/tests/rv64ui-p-ld.elf
create mode 100644 test/riscv/tests/rv64ui-p-lh.dump
create mode 100755 test/riscv/tests/rv64ui-p-lh.elf
create mode 100644 test/riscv/tests/rv64ui-p-lhu.dump
create mode 100755 test/riscv/tests/rv64ui-p-lhu.elf
create mode 100644 test/riscv/tests/rv64ui-p-lui.dump
create mode 100755 test/riscv/tests/rv64ui-p-lui.elf
create mode 100644 test/riscv/tests/rv64ui-p-lw.dump
create mode 100755 test/riscv/tests/rv64ui-p-lw.elf
create mode 100644 test/riscv/tests/rv64ui-p-lwu.dump
create mode 100755 test/riscv/tests/rv64ui-p-lwu.elf
create mode 100644 test/riscv/tests/rv64ui-p-or.dump
create mode 100755 test/riscv/tests/rv64ui-p-or.elf
create mode 100644 test/riscv/tests/rv64ui-p-ori.dump
create mode 100755 test/riscv/tests/rv64ui-p-ori.elf
create mode 100644 test/riscv/tests/rv64ui-p-sb.dump
create mode 100755 test/riscv/tests/rv64ui-p-sb.elf
create mode 100644 test/riscv/tests/rv64ui-p-sd.dump
create mode 100755 test/riscv/tests/rv64ui-p-sd.elf
create mode 100644 test/riscv/tests/rv64ui-p-sh.dump
create mode 100755 test/riscv/tests/rv64ui-p-sh.elf
create mode 100644 test/riscv/tests/rv64ui-p-simple.dump
create mode 100755 test/riscv/tests/rv64ui-p-simple.elf
create mode 100644 test/riscv/tests/rv64ui-p-sll.dump
create mode 100755 test/riscv/tests/rv64ui-p-sll.elf
create mode 100644 test/riscv/tests/rv64ui-p-slli.dump
create mode 100755 test/riscv/tests/rv64ui-p-slli.elf
create mode 100644 test/riscv/tests/rv64ui-p-slliw.dump
create mode 100755 test/riscv/tests/rv64ui-p-slliw.elf
create mode 100644 test/riscv/tests/rv64ui-p-sllw.dump
create mode 100755 test/riscv/tests/rv64ui-p-sllw.elf
create mode 100644 test/riscv/tests/rv64ui-p-slt.dump
create mode 100755 test/riscv/tests/rv64ui-p-slt.elf
create mode 100644 test/riscv/tests/rv64ui-p-slti.dump
create mode 100755 test/riscv/tests/rv64ui-p-slti.elf
create mode 100644 test/riscv/tests/rv64ui-p-sltiu.dump
create mode 100755 test/riscv/tests/rv64ui-p-sltiu.elf
create mode 100644 test/riscv/tests/rv64ui-p-sltu.dump
create mode 100755 test/riscv/tests/rv64ui-p-sltu.elf
create mode 100644 test/riscv/tests/rv64ui-p-sra.dump
create mode 100755 test/riscv/tests/rv64ui-p-sra.elf
create mode 100644 test/riscv/tests/rv64ui-p-srai.dump
create mode 100755 test/riscv/tests/rv64ui-p-srai.elf
create mode 100644 test/riscv/tests/rv64ui-p-sraiw.dump
create mode 100755 test/riscv/tests/rv64ui-p-sraiw.elf
create mode 100644 test/riscv/tests/rv64ui-p-sraw.dump
create mode 100755 test/riscv/tests/rv64ui-p-sraw.elf
create mode 100644 test/riscv/tests/rv64ui-p-srl.dump
create mode 100755 test/riscv/tests/rv64ui-p-srl.elf
create mode 100644 test/riscv/tests/rv64ui-p-srli.dump
create mode 100755 test/riscv/tests/rv64ui-p-srli.elf
create mode 100644 test/riscv/tests/rv64ui-p-srliw.dump
create mode 100755 test/riscv/tests/rv64ui-p-srliw.elf
create mode 100644 test/riscv/tests/rv64ui-p-srlw.dump
create mode 100755 test/riscv/tests/rv64ui-p-srlw.elf
create mode 100644 test/riscv/tests/rv64ui-p-sub.dump
create mode 100755 test/riscv/tests/rv64ui-p-sub.elf
create mode 100644 test/riscv/tests/rv64ui-p-subw.dump
create mode 100755 test/riscv/tests/rv64ui-p-subw.elf
create mode 100644 test/riscv/tests/rv64ui-p-sw.dump
create mode 100755 test/riscv/tests/rv64ui-p-sw.elf
create mode 100644 test/riscv/tests/rv64ui-p-xor.dump
create mode 100755 test/riscv/tests/rv64ui-p-xor.elf
create mode 100644 test/riscv/tests/rv64ui-p-xori.dump
create mode 100755 test/riscv/tests/rv64ui-p-xori.elf
create mode 100644 test/riscv/tests/rv64um-p-div.dump
create mode 100755 test/riscv/tests/rv64um-p-div.elf
create mode 100644 test/riscv/tests/rv64um-p-divu.dump
create mode 100755 test/riscv/tests/rv64um-p-divu.elf
create mode 100644 test/riscv/tests/rv64um-p-divuw.dump
create mode 100755 test/riscv/tests/rv64um-p-divuw.elf
create mode 100644 test/riscv/tests/rv64um-p-divw.dump
create mode 100755 test/riscv/tests/rv64um-p-divw.elf
create mode 100644 test/riscv/tests/rv64um-p-mul.dump
create mode 100755 test/riscv/tests/rv64um-p-mul.elf
create mode 100644 test/riscv/tests/rv64um-p-mulh.dump
create mode 100755 test/riscv/tests/rv64um-p-mulh.elf
create mode 100644 test/riscv/tests/rv64um-p-mulhsu.dump
create mode 100755 test/riscv/tests/rv64um-p-mulhsu.elf
create mode 100644 test/riscv/tests/rv64um-p-mulhu.dump
create mode 100755 test/riscv/tests/rv64um-p-mulhu.elf
create mode 100644 test/riscv/tests/rv64um-p-mulw.dump
create mode 100755 test/riscv/tests/rv64um-p-mulw.elf
create mode 100644 test/riscv/tests/rv64um-p-rem.dump
create mode 100755 test/riscv/tests/rv64um-p-rem.elf
create mode 100644 test/riscv/tests/rv64um-p-remu.dump
create mode 100755 test/riscv/tests/rv64um-p-remu.elf
create mode 100644 test/riscv/tests/rv64um-p-remuw.dump
create mode 100755 test/riscv/tests/rv64um-p-remuw.elf
create mode 100644 test/riscv/tests/rv64um-p-remw.dump
create mode 100755 test/riscv/tests/rv64um-p-remw.elf
(limited to 'test')
diff --git a/test/riscv/run_tests.sh b/test/riscv/run_tests.sh
index d52caeb4..dd19bd72 100755
--- a/test/riscv/run_tests.sh
+++ b/test/riscv/run_tests.sh
@@ -49,15 +49,24 @@ printf "\n" >> $DIR/tests.xml
cd $SAILDIR/riscv
-printf "Checking specification...\n"
+printf "Building RISCV specification...\n"
-if make -C $SAILDIR/riscv check;
+if make -C $SAILDIR/riscv riscv ;
then
- green "checked RISCV specification" "ok"
+ green "Building RISCV specification" "ok"
else
- red "checking RISCV specification" "fail"
+ red "Building RISCV specification" "fail"
fi
+for test in $DIR/tests/*.elf; do
+ if $SAILDIR/riscv/riscv "$test" >"${test/.elf/.out}" 2>&1 && grep -q SUCCESS "${test/.elf/.out}"
+ then
+ green "$test" "ok"
+ else
+ red "$test" "fail"
+ fi
+done
+
finish_suite "RISCV tests"
printf "\n" >> $DIR/tests.xml
diff --git a/test/riscv/tests/README b/test/riscv/tests/README
new file mode 100644
index 00000000..4dcfeb11
--- /dev/null
+++ b/test/riscv/tests/README
@@ -0,0 +1,27 @@
+Copyright (c) 2012-2015, The Regents of the University of California (Regents).
+All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the Regents nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING
+OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS
+BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED
+HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE
+MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+The tests in this directory were built from
+https://github.com/riscv/riscv-tools commit 98682995dc4a1ab8777ff45ba673cf2658e54ae2 .
diff --git a/test/riscv/tests/rv64ua-p-amoadd_d.dump b/test/riscv/tests/rv64ua-p-amoadd_d.dump
new file mode 100644
index 00000000..e90473bb
--- /dev/null
+++ b/test/riscv/tests/rv64ua-p-amoadd_d.dump
@@ -0,0 +1,153 @@
+
+rv64ua-p-amoadd_d: file format elf64-littleriscv
+
+
+Disassembly of section .text.init:
+
+0000000080000000 <_start>:
+ 80000000: 04c0006f j 8000004c
+
+0000000080000004 :
+ 80000004: 34202f73 csrr t5,mcause
+ 80000008: 00800f93 li t6,8
+ 8000000c: 03ff0a63 beq t5,t6,80000040
+ 80000010: 00900f93 li t6,9
+ 80000014: 03ff0663 beq t5,t6,80000040
+ 80000018: 00b00f93 li t6,11
+ 8000001c: 03ff0263 beq t5,t6,80000040
+ 80000020: 80000f17 auipc t5,0x80000
+ 80000024: fe0f0f13 addi t5,t5,-32 # 0 <_start-0x80000000>
+ 80000028: 000f0463 beqz t5,80000030
+ 8000002c: 000f0067 jr t5
+ 80000030: 34202f73 csrr t5,mcause
+ 80000034: 000f5463 bgez t5,8000003c
+ 80000038: 0040006f j 8000003c
+
+000000008000003c :
+ 8000003c: 5391e193 ori gp,gp,1337
+
+0000000080000040 :
+ 80000040: 00001f17 auipc t5,0x1
+ 80000044: fc3f2023 sw gp,-64(t5) # 80001000
+ 80000048: ff9ff06f j 80000040
+
+000000008000004c :
+ 8000004c: f1402573 csrr a0,mhartid
+ 80000050: 00051063 bnez a0,80000050
+ 80000054: 00000297 auipc t0,0x0
+ 80000058: 01028293 addi t0,t0,16 # 80000064
+ 8000005c: 30529073 csrw mtvec,t0
+ 80000060: 18005073 csrwi satp,0
+ 80000064: 00000297 auipc t0,0x0
+ 80000068: 01c28293 addi t0,t0,28 # 80000080
+ 8000006c: 30529073 csrw mtvec,t0
+ 80000070: fff00293 li t0,-1
+ 80000074: 3b029073 csrw pmpaddr0,t0
+ 80000078: 01f00293 li t0,31
+ 8000007c: 3a029073 csrw pmpcfg0,t0
+ 80000080: 00000297 auipc t0,0x0
+ 80000084: 01828293 addi t0,t0,24 # 80000098
+ 80000088: 30529073 csrw mtvec,t0
+ 8000008c: 30205073 csrwi medeleg,0
+ 80000090: 30305073 csrwi mideleg,0
+ 80000094: 30405073 csrwi mie,0
+ 80000098: 00000193 li gp,0
+ 8000009c: 00000297 auipc t0,0x0
+ 800000a0: f6828293 addi t0,t0,-152 # 80000004
+ 800000a4: 30529073 csrw mtvec,t0
+ 800000a8: 00100513 li a0,1
+ 800000ac: 01f51513 slli a0,a0,0x1f
+ 800000b0: 00055863 bgez a0,800000c0
+ 800000b4: 0ff0000f fence
+ 800000b8: 00100193 li gp,1
+ 800000bc: 00000073 ecall
+ 800000c0: 80000297 auipc t0,0x80000
+ 800000c4: f4028293 addi t0,t0,-192 # 0 <_start-0x80000000>
+ 800000c8: 00028e63 beqz t0,800000e4
+ 800000cc: 10529073 csrw stvec,t0
+ 800000d0: 0000b2b7 lui t0,0xb
+ 800000d4: 1092829b addiw t0,t0,265
+ 800000d8: 30229073 csrw medeleg,t0
+ 800000dc: 30202373 csrr t1,medeleg
+ 800000e0: f4629ee3 bne t0,t1,8000003c
+ 800000e4: 30005073 csrwi mstatus,0
+ 800000e8: 00000297 auipc t0,0x0
+ 800000ec: 01428293 addi t0,t0,20 # 800000fc
+ 800000f0: 34129073 csrw mepc,t0
+ 800000f4: f1402573 csrr a0,mhartid
+ 800000f8: 30200073 mret
+
+00000000800000fc :
+ 800000fc: 80000537 lui a0,0x80000
+ 80000100: 80000593 li a1,-2048
+ 80000104: 00002697 auipc a3,0x2
+ 80000108: efc68693 addi a3,a3,-260 # 80002000
+ 8000010c: 00a6b023 sd a0,0(a3)
+ 80000110: 00b6b72f amoadd.d a4,a1,(a3)
+ 80000114: 80000eb7 lui t4,0x80000
+ 80000118: 00200193 li gp,2
+ 8000011c: 05d71863 bne a4,t4,8000016c
+
+0000000080000120 :
+ 80000120: 0006b783 ld a5,0(a3)
+ 80000124: fff00e9b addiw t4,zero,-1
+ 80000128: 01fe9e93 slli t4,t4,0x1f
+ 8000012c: 800e8e93 addi t4,t4,-2048 # ffffffff7ffff800 <_end+0xfffffffeffffd7f8>
+ 80000130: 00300193 li gp,3
+ 80000134: 03d79c63 bne a5,t4,8000016c
+
+0000000080000138 :
+ 80000138: 00b6b72f amoadd.d a4,a1,(a3)
+ 8000013c: fff00e9b addiw t4,zero,-1
+ 80000140: 01fe9e93 slli t4,t4,0x1f
+ 80000144: 800e8e93 addi t4,t4,-2048
+ 80000148: 00400193 li gp,4
+ 8000014c: 03d71063 bne a4,t4,8000016c
+
+0000000080000150 :
+ 80000150: 0006b783 ld a5,0(a3)
+ 80000154: fff80eb7 lui t4,0xfff80
+ 80000158: fffe8e9b addiw t4,t4,-1
+ 8000015c: 00ce9e93 slli t4,t4,0xc
+ 80000160: 00500193 li gp,5
+ 80000164: 01d79463 bne a5,t4,8000016c
+ 80000168: 00301c63 bne zero,gp,80000180
+
+000000008000016c :
+ 8000016c: 0ff0000f fence
+ 80000170: 00018063 beqz gp,80000170
+ 80000174: 00119193 slli gp,gp,0x1
+ 80000178: 0011e193 ori gp,gp,1
+ 8000017c: 00000073 ecall
+
+0000000080000180 :
+ 80000180: 0ff0000f fence
+ 80000184: 00100193 li gp,1
+ 80000188: 00000073 ecall
+ 8000018c: c0001073 unimp
+ 80000190: 0000 unimp
+ 80000192: 0000 unimp
+ 80000194: 0000 unimp
+ 80000196: 0000 unimp
+ 80000198: 0000 unimp
+ 8000019a: 0000 unimp
+ 8000019c: 0000 unimp
+ 8000019e: 0000 unimp
+ 800001a0: 0000 unimp
+ 800001a2: 0000 unimp
+ 800001a4: 0000 unimp
+ 800001a6: 0000 unimp
+ 800001a8: 0000 unimp
+ 800001aa: 0000 unimp
+ 800001ac: 0000 unimp
+ 800001ae: 0000 unimp
+ 800001b0: 0000 unimp
+ 800001b2: 0000 unimp
+ 800001b4: 0000 unimp
+ 800001b6: 0000 unimp
+ 800001b8: 0000 unimp
+ 800001ba: 0000 unimp
+ 800001bc: 0000 unimp
+ 800001be: 0000 unimp
+ 800001c0: 0000 unimp
+ 800001c2: 0000 unimp
diff --git a/test/riscv/tests/rv64ua-p-amoadd_d.elf b/test/riscv/tests/rv64ua-p-amoadd_d.elf
new file mode 100755
index 00000000..f4fac374
Binary files /dev/null and b/test/riscv/tests/rv64ua-p-amoadd_d.elf differ
diff --git a/test/riscv/tests/rv64ua-p-amoadd_w.dump b/test/riscv/tests/rv64ua-p-amoadd_w.dump
new file mode 100644
index 00000000..a0bc84ef
--- /dev/null
+++ b/test/riscv/tests/rv64ua-p-amoadd_w.dump
@@ -0,0 +1,124 @@
+
+rv64ua-p-amoadd_w: file format elf64-littleriscv
+
+
+Disassembly of section .text.init:
+
+0000000080000000 <_start>:
+ 80000000: 04c0006f j 8000004c
+
+0000000080000004 :
+ 80000004: 34202f73 csrr t5,mcause
+ 80000008: 00800f93 li t6,8
+ 8000000c: 03ff0a63 beq t5,t6,80000040
+ 80000010: 00900f93 li t6,9
+ 80000014: 03ff0663 beq t5,t6,80000040
+ 80000018: 00b00f93 li t6,11
+ 8000001c: 03ff0263 beq t5,t6,80000040
+ 80000020: 80000f17 auipc t5,0x80000
+ 80000024: fe0f0f13 addi t5,t5,-32 # 0 <_start-0x80000000>
+ 80000028: 000f0463 beqz t5,80000030
+ 8000002c: 000f0067 jr t5
+ 80000030: 34202f73 csrr t5,mcause
+ 80000034: 000f5463 bgez t5,8000003c
+ 80000038: 0040006f j 8000003c
+
+000000008000003c :
+ 8000003c: 5391e193 ori gp,gp,1337
+
+0000000080000040 :
+ 80000040: 00001f17 auipc t5,0x1
+ 80000044: fc3f2023 sw gp,-64(t5) # 80001000
+ 80000048: ff9ff06f j 80000040
+
+000000008000004c :
+ 8000004c: f1402573 csrr a0,mhartid
+ 80000050: 00051063 bnez a0,80000050
+ 80000054: 00000297 auipc t0,0x0
+ 80000058: 01028293 addi t0,t0,16 # 80000064
+ 8000005c: 30529073 csrw mtvec,t0
+ 80000060: 18005073 csrwi satp,0
+ 80000064: 00000297 auipc t0,0x0
+ 80000068: 01c28293 addi t0,t0,28 # 80000080
+ 8000006c: 30529073 csrw mtvec,t0
+ 80000070: fff00293 li t0,-1
+ 80000074: 3b029073 csrw pmpaddr0,t0
+ 80000078: 01f00293 li t0,31
+ 8000007c: 3a029073 csrw pmpcfg0,t0
+ 80000080: 00000297 auipc t0,0x0
+ 80000084: 01828293 addi t0,t0,24 # 80000098
+ 80000088: 30529073 csrw mtvec,t0
+ 8000008c: 30205073 csrwi medeleg,0
+ 80000090: 30305073 csrwi mideleg,0
+ 80000094: 30405073 csrwi mie,0
+ 80000098: 00000193 li gp,0
+ 8000009c: 00000297 auipc t0,0x0
+ 800000a0: f6828293 addi t0,t0,-152 # 80000004
+ 800000a4: 30529073 csrw mtvec,t0
+ 800000a8: 00100513 li a0,1
+ 800000ac: 01f51513 slli a0,a0,0x1f
+ 800000b0: 00055863 bgez a0,800000c0
+ 800000b4: 0ff0000f fence
+ 800000b8: 00100193 li gp,1
+ 800000bc: 00000073 ecall
+ 800000c0: 80000297 auipc t0,0x80000
+ 800000c4: f4028293 addi t0,t0,-192 # 0 <_start-0x80000000>
+ 800000c8: 00028e63 beqz t0,800000e4
+ 800000cc: 10529073 csrw stvec,t0
+ 800000d0: 0000b2b7 lui t0,0xb
+ 800000d4: 1092829b addiw t0,t0,265
+ 800000d8: 30229073 csrw medeleg,t0
+ 800000dc: 30202373 csrr t1,medeleg
+ 800000e0: f4629ee3 bne t0,t1,8000003c
+ 800000e4: 30005073 csrwi mstatus,0
+ 800000e8: 00000297 auipc t0,0x0
+ 800000ec: 01428293 addi t0,t0,20 # 800000fc
+ 800000f0: 34129073 csrw mepc,t0
+ 800000f4: f1402573 csrr a0,mhartid
+ 800000f8: 30200073 mret
+
+00000000800000fc :
+ 800000fc: 80000537 lui a0,0x80000
+ 80000100: 80000593 li a1,-2048
+ 80000104: 00002697 auipc a3,0x2
+ 80000108: efc68693 addi a3,a3,-260 # 80002000
+ 8000010c: 00a6a023 sw a0,0(a3)
+ 80000110: 00b6a72f amoadd.w a4,a1,(a3)
+ 80000114: 80000eb7 lui t4,0x80000
+ 80000118: 00200193 li gp,2
+ 8000011c: 05d71263 bne a4,t4,80000160
+
+0000000080000120 :
+ 80000120: 0006a783 lw a5,0(a3)
+ 80000124: 80000eb7 lui t4,0x80000
+ 80000128: 800e8e9b addiw t4,t4,-2048
+ 8000012c: 00300193 li gp,3
+ 80000130: 03d79863 bne a5,t4,80000160
+
+0000000080000134 :
+ 80000134: 800005b7 lui a1,0x80000
+ 80000138: 00b6a72f amoadd.w a4,a1,(a3)
+ 8000013c: 80000eb7 lui t4,0x80000
+ 80000140: 800e8e9b addiw t4,t4,-2048
+ 80000144: 00400193 li gp,4
+ 80000148: 01d71c63 bne a4,t4,80000160
+
+000000008000014c :
+ 8000014c: 0006a783 lw a5,0(a3)
+ 80000150: 80000e93 li t4,-2048
+ 80000154: 00500193 li gp,5
+ 80000158: 01d79463 bne a5,t4,80000160
+ 8000015c: 00301c63 bne zero,gp,80000174
+
+0000000080000160 :
+ 80000160: 0ff0000f fence
+ 80000164: 00018063 beqz gp,80000164
+ 80000168: 00119193 slli gp,gp,0x1
+ 8000016c: 0011e193 ori gp,gp,1
+ 80000170: 00000073 ecall
+
+0000000080000174 :
+ 80000174: 0ff0000f fence
+ 80000178: 00100193 li gp,1
+ 8000017c: 00000073 ecall
+ 80000180: c0001073 unimp
diff --git a/test/riscv/tests/rv64ua-p-amoadd_w.elf b/test/riscv/tests/rv64ua-p-amoadd_w.elf
new file mode 100755
index 00000000..4b3457d8
Binary files /dev/null and b/test/riscv/tests/rv64ua-p-amoadd_w.elf differ
diff --git a/test/riscv/tests/rv64ua-p-amoand_d.dump b/test/riscv/tests/rv64ua-p-amoand_d.dump
new file mode 100644
index 00000000..cb398f8d
--- /dev/null
+++ b/test/riscv/tests/rv64ua-p-amoand_d.dump
@@ -0,0 +1,124 @@
+
+rv64ua-p-amoand_d: file format elf64-littleriscv
+
+
+Disassembly of section .text.init:
+
+0000000080000000 <_start>:
+ 80000000: 04c0006f j 8000004c
+
+0000000080000004 :
+ 80000004: 34202f73 csrr t5,mcause
+ 80000008: 00800f93 li t6,8
+ 8000000c: 03ff0a63 beq t5,t6,80000040
+ 80000010: 00900f93 li t6,9
+ 80000014: 03ff0663 beq t5,t6,80000040
+ 80000018: 00b00f93 li t6,11
+ 8000001c: 03ff0263 beq t5,t6,80000040
+ 80000020: 80000f17 auipc t5,0x80000
+ 80000024: fe0f0f13 addi t5,t5,-32 # 0 <_start-0x80000000>
+ 80000028: 000f0463 beqz t5,80000030
+ 8000002c: 000f0067 jr t5
+ 80000030: 34202f73 csrr t5,mcause
+ 80000034: 000f5463 bgez t5,8000003c
+ 80000038: 0040006f j 8000003c
+
+000000008000003c :
+ 8000003c: 5391e193 ori gp,gp,1337
+
+0000000080000040 :
+ 80000040: 00001f17 auipc t5,0x1
+ 80000044: fc3f2023 sw gp,-64(t5) # 80001000
+ 80000048: ff9ff06f j 80000040
+
+000000008000004c :
+ 8000004c: f1402573 csrr a0,mhartid
+ 80000050: 00051063 bnez a0,80000050
+ 80000054: 00000297 auipc t0,0x0
+ 80000058: 01028293 addi t0,t0,16 # 80000064
+ 8000005c: 30529073 csrw mtvec,t0
+ 80000060: 18005073 csrwi satp,0
+ 80000064: 00000297 auipc t0,0x0
+ 80000068: 01c28293 addi t0,t0,28 # 80000080
+ 8000006c: 30529073 csrw mtvec,t0
+ 80000070: fff00293 li t0,-1
+ 80000074: 3b029073 csrw pmpaddr0,t0
+ 80000078: 01f00293 li t0,31
+ 8000007c: 3a029073 csrw pmpcfg0,t0
+ 80000080: 00000297 auipc t0,0x0
+ 80000084: 01828293 addi t0,t0,24 # 80000098
+ 80000088: 30529073 csrw mtvec,t0
+ 8000008c: 30205073 csrwi medeleg,0
+ 80000090: 30305073 csrwi mideleg,0
+ 80000094: 30405073 csrwi mie,0
+ 80000098: 00000193 li gp,0
+ 8000009c: 00000297 auipc t0,0x0
+ 800000a0: f6828293 addi t0,t0,-152 # 80000004
+ 800000a4: 30529073 csrw mtvec,t0
+ 800000a8: 00100513 li a0,1
+ 800000ac: 01f51513 slli a0,a0,0x1f
+ 800000b0: 00055863 bgez a0,800000c0
+ 800000b4: 0ff0000f fence
+ 800000b8: 00100193 li gp,1
+ 800000bc: 00000073 ecall
+ 800000c0: 80000297 auipc t0,0x80000
+ 800000c4: f4028293 addi t0,t0,-192 # 0 <_start-0x80000000>
+ 800000c8: 00028e63 beqz t0,800000e4
+ 800000cc: 10529073 csrw stvec,t0
+ 800000d0: 0000b2b7 lui t0,0xb
+ 800000d4: 1092829b addiw t0,t0,265
+ 800000d8: 30229073 csrw medeleg,t0
+ 800000dc: 30202373 csrr t1,medeleg
+ 800000e0: f4629ee3 bne t0,t1,8000003c
+ 800000e4: 30005073 csrwi mstatus,0
+ 800000e8: 00000297 auipc t0,0x0
+ 800000ec: 01428293 addi t0,t0,20 # 800000fc
+ 800000f0: 34129073 csrw mepc,t0
+ 800000f4: f1402573 csrr a0,mhartid
+ 800000f8: 30200073 mret
+
+00000000800000fc :
+ 800000fc: 80000537 lui a0,0x80000
+ 80000100: 80000593 li a1,-2048
+ 80000104: 00002697 auipc a3,0x2
+ 80000108: efc68693 addi a3,a3,-260 # 80002000
+ 8000010c: 00a6b023 sd a0,0(a3)
+ 80000110: 60b6b72f amoand.d a4,a1,(a3)
+ 80000114: 80000eb7 lui t4,0x80000
+ 80000118: 00200193 li gp,2
+ 8000011c: 05d71263 bne a4,t4,80000160
+
+0000000080000120 :
+ 80000120: 0006b783 ld a5,0(a3)
+ 80000124: 80000eb7 lui t4,0x80000
+ 80000128: 00300193 li gp,3
+ 8000012c: 03d79a63 bne a5,t4,80000160
+
+0000000080000130 :
+ 80000130: 0010059b addiw a1,zero,1
+ 80000134: 01f59593 slli a1,a1,0x1f
+ 80000138: 60b6b72f amoand.d a4,a1,(a3)
+ 8000013c: 80000eb7 lui t4,0x80000
+ 80000140: 00400193 li gp,4
+ 80000144: 01d71e63 bne a4,t4,80000160
+
+0000000080000148 :
+ 80000148: 0006b783 ld a5,0(a3)
+ 8000014c: 00100e9b addiw t4,zero,1
+ 80000150: 01fe9e93 slli t4,t4,0x1f
+ 80000154: 00500193 li gp,5
+ 80000158: 01d79463 bne a5,t4,80000160
+ 8000015c: 00301c63 bne zero,gp,80000174
+
+0000000080000160 :
+ 80000160: 0ff0000f fence
+ 80000164: 00018063 beqz gp,80000164
+ 80000168: 00119193 slli gp,gp,0x1
+ 8000016c: 0011e193 ori gp,gp,1
+ 80000170: 00000073 ecall
+
+0000000080000174 :
+ 80000174: 0ff0000f fence
+ 80000178: 00100193 li gp,1
+ 8000017c: 00000073 ecall
+ 80000180: c0001073 unimp
diff --git a/test/riscv/tests/rv64ua-p-amoand_d.elf b/test/riscv/tests/rv64ua-p-amoand_d.elf
new file mode 100755
index 00000000..47e8b321
Binary files /dev/null and b/test/riscv/tests/rv64ua-p-amoand_d.elf differ
diff --git a/test/riscv/tests/rv64ua-p-amoand_w.dump b/test/riscv/tests/rv64ua-p-amoand_w.dump
new file mode 100644
index 00000000..83ce206d
--- /dev/null
+++ b/test/riscv/tests/rv64ua-p-amoand_w.dump
@@ -0,0 +1,125 @@
+
+rv64ua-p-amoand_w: file format elf64-littleriscv
+
+
+Disassembly of section .text.init:
+
+0000000080000000 <_start>:
+ 80000000: 04c0006f j 8000004c
+
+0000000080000004 :
+ 80000004: 34202f73 csrr t5,mcause
+ 80000008: 00800f93 li t6,8
+ 8000000c: 03ff0a63 beq t5,t6,80000040
+ 80000010: 00900f93 li t6,9
+ 80000014: 03ff0663 beq t5,t6,80000040
+ 80000018: 00b00f93 li t6,11
+ 8000001c: 03ff0263 beq t5,t6,80000040
+ 80000020: 80000f17 auipc t5,0x80000
+ 80000024: fe0f0f13 addi t5,t5,-32 # 0 <_start-0x80000000>
+ 80000028: 000f0463 beqz t5,80000030
+ 8000002c: 000f0067 jr t5
+ 80000030: 34202f73 csrr t5,mcause
+ 80000034: 000f5463 bgez t5,8000003c
+ 80000038: 0040006f j 8000003c
+
+000000008000003c :
+ 8000003c: 5391e193 ori gp,gp,1337
+
+0000000080000040 :
+ 80000040: 00001f17 auipc t5,0x1
+ 80000044: fc3f2023 sw gp,-64(t5) # 80001000
+ 80000048: ff9ff06f j 80000040
+
+000000008000004c :
+ 8000004c: f1402573 csrr a0,mhartid
+ 80000050: 00051063 bnez a0,80000050
+ 80000054: 00000297 auipc t0,0x0
+ 80000058: 01028293 addi t0,t0,16 # 80000064
+ 8000005c: 30529073 csrw mtvec,t0
+ 80000060: 18005073 csrwi satp,0
+ 80000064: 00000297 auipc t0,0x0
+ 80000068: 01c28293 addi t0,t0,28 # 80000080
+ 8000006c: 30529073 csrw mtvec,t0
+ 80000070: fff00293 li t0,-1
+ 80000074: 3b029073 csrw pmpaddr0,t0
+ 80000078: 01f00293 li t0,31
+ 8000007c: 3a029073 csrw pmpcfg0,t0
+ 80000080: 00000297 auipc t0,0x0
+ 80000084: 01828293 addi t0,t0,24 # 80000098
+ 80000088: 30529073 csrw mtvec,t0
+ 8000008c: 30205073 csrwi medeleg,0
+ 80000090: 30305073 csrwi mideleg,0
+ 80000094: 30405073 csrwi mie,0
+ 80000098: 00000193 li gp,0
+ 8000009c: 00000297 auipc t0,0x0
+ 800000a0: f6828293 addi t0,t0,-152 # 80000004
+ 800000a4: 30529073 csrw mtvec,t0
+ 800000a8: 00100513 li a0,1
+ 800000ac: 01f51513 slli a0,a0,0x1f
+ 800000b0: 00055863 bgez a0,800000c0
+ 800000b4: 0ff0000f fence
+ 800000b8: 00100193 li gp,1
+ 800000bc: 00000073 ecall
+ 800000c0: 80000297 auipc t0,0x80000
+ 800000c4: f4028293 addi t0,t0,-192 # 0 <_start-0x80000000>
+ 800000c8: 00028e63 beqz t0,800000e4
+ 800000cc: 10529073 csrw stvec,t0
+ 800000d0: 0000b2b7 lui t0,0xb
+ 800000d4: 1092829b addiw t0,t0,265
+ 800000d8: 30229073 csrw medeleg,t0
+ 800000dc: 30202373 csrr t1,medeleg
+ 800000e0: f4629ee3 bne t0,t1,8000003c
+ 800000e4: 30005073 csrwi mstatus,0
+ 800000e8: 00000297 auipc t0,0x0
+ 800000ec: 01428293 addi t0,t0,20 # 800000fc
+ 800000f0: 34129073 csrw mepc,t0
+ 800000f4: f1402573 csrr a0,mhartid
+ 800000f8: 30200073 mret
+
+00000000800000fc :
+ 800000fc: 80000537 lui a0,0x80000
+ 80000100: 80000593 li a1,-2048
+ 80000104: 00002697 auipc a3,0x2
+ 80000108: efc68693 addi a3,a3,-260 # 80002000
+ 8000010c: 00a6a023 sw a0,0(a3)
+ 80000110: 60b6a72f amoand.w a4,a1,(a3)
+ 80000114: 80000eb7 lui t4,0x80000
+ 80000118: 00200193 li gp,2
+ 8000011c: 05d71063 bne a4,t4,8000015c
+
+0000000080000120 :
+ 80000120: 0006a783 lw a5,0(a3)
+ 80000124: 80000eb7 lui t4,0x80000
+ 80000128: 00300193 li gp,3
+ 8000012c: 03d79863 bne a5,t4,8000015c
+
+0000000080000130 :
+ 80000130: 0010059b addiw a1,zero,1
+ 80000134: 01f59593 slli a1,a1,0x1f
+ 80000138: 60b6a72f amoand.w a4,a1,(a3)
+ 8000013c: 80000eb7 lui t4,0x80000
+ 80000140: 00400193 li gp,4
+ 80000144: 01d71c63 bne a4,t4,8000015c
+
+0000000080000148 :
+ 80000148: 0006a783 lw a5,0(a3)
+ 8000014c: 80000eb7 lui t4,0x80000
+ 80000150: 00500193 li gp,5
+ 80000154: 01d79463 bne a5,t4,8000015c
+ 80000158: 00301c63 bne zero,gp,80000170
+
+000000008000015c :
+ 8000015c: 0ff0000f fence
+ 80000160: 00018063 beqz gp,80000160
+ 80000164: 00119193 slli gp,gp,0x1
+ 80000168: 0011e193 ori gp,gp,1
+ 8000016c: 00000073 ecall
+
+0000000080000170 :
+ 80000170: 0ff0000f fence
+ 80000174: 00100193 li gp,1
+ 80000178: 00000073 ecall
+ 8000017c: c0001073 unimp
+ 80000180: 0000 unimp
+ 80000182: 0000 unimp
diff --git a/test/riscv/tests/rv64ua-p-amoand_w.elf b/test/riscv/tests/rv64ua-p-amoand_w.elf
new file mode 100755
index 00000000..06c29f8b
Binary files /dev/null and b/test/riscv/tests/rv64ua-p-amoand_w.elf differ
diff --git a/test/riscv/tests/rv64ua-p-amomax_d.dump b/test/riscv/tests/rv64ua-p-amomax_d.dump
new file mode 100644
index 00000000..c91c2c8a
--- /dev/null
+++ b/test/riscv/tests/rv64ua-p-amomax_d.dump
@@ -0,0 +1,125 @@
+
+rv64ua-p-amomax_d: file format elf64-littleriscv
+
+
+Disassembly of section .text.init:
+
+0000000080000000 <_start>:
+ 80000000: 04c0006f j 8000004c
+
+0000000080000004 :
+ 80000004: 34202f73 csrr t5,mcause
+ 80000008: 00800f93 li t6,8
+ 8000000c: 03ff0a63 beq t5,t6,80000040
+ 80000010: 00900f93 li t6,9
+ 80000014: 03ff0663 beq t5,t6,80000040
+ 80000018: 00b00f93 li t6,11
+ 8000001c: 03ff0263 beq t5,t6,80000040
+ 80000020: 80000f17 auipc t5,0x80000
+ 80000024: fe0f0f13 addi t5,t5,-32 # 0 <_start-0x80000000>
+ 80000028: 000f0463 beqz t5,80000030
+ 8000002c: 000f0067 jr t5
+ 80000030: 34202f73 csrr t5,mcause
+ 80000034: 000f5463 bgez t5,8000003c
+ 80000038: 0040006f j 8000003c
+
+000000008000003c :
+ 8000003c: 5391e193 ori gp,gp,1337
+
+0000000080000040 :
+ 80000040: 00001f17 auipc t5,0x1
+ 80000044: fc3f2023 sw gp,-64(t5) # 80001000
+ 80000048: ff9ff06f j 80000040
+
+000000008000004c :
+ 8000004c: f1402573 csrr a0,mhartid
+ 80000050: 00051063 bnez a0,80000050
+ 80000054: 00000297 auipc t0,0x0
+ 80000058: 01028293 addi t0,t0,16 # 80000064
+ 8000005c: 30529073 csrw mtvec,t0
+ 80000060: 18005073 csrwi satp,0
+ 80000064: 00000297 auipc t0,0x0
+ 80000068: 01c28293 addi t0,t0,28 # 80000080
+ 8000006c: 30529073 csrw mtvec,t0
+ 80000070: fff00293 li t0,-1
+ 80000074: 3b029073 csrw pmpaddr0,t0
+ 80000078: 01f00293 li t0,31
+ 8000007c: 3a029073 csrw pmpcfg0,t0
+ 80000080: 00000297 auipc t0,0x0
+ 80000084: 01828293 addi t0,t0,24 # 80000098
+ 80000088: 30529073 csrw mtvec,t0
+ 8000008c: 30205073 csrwi medeleg,0
+ 80000090: 30305073 csrwi mideleg,0
+ 80000094: 30405073 csrwi mie,0
+ 80000098: 00000193 li gp,0
+ 8000009c: 00000297 auipc t0,0x0
+ 800000a0: f6828293 addi t0,t0,-152 # 80000004
+ 800000a4: 30529073 csrw mtvec,t0
+ 800000a8: 00100513 li a0,1
+ 800000ac: 01f51513 slli a0,a0,0x1f
+ 800000b0: 00055863 bgez a0,800000c0
+ 800000b4: 0ff0000f fence
+ 800000b8: 00100193 li gp,1
+ 800000bc: 00000073 ecall
+ 800000c0: 80000297 auipc t0,0x80000
+ 800000c4: f4028293 addi t0,t0,-192 # 0 <_start-0x80000000>
+ 800000c8: 00028e63 beqz t0,800000e4
+ 800000cc: 10529073 csrw stvec,t0
+ 800000d0: 0000b2b7 lui t0,0xb
+ 800000d4: 1092829b addiw t0,t0,265
+ 800000d8: 30229073 csrw medeleg,t0
+ 800000dc: 30202373 csrr t1,medeleg
+ 800000e0: f4629ee3 bne t0,t1,8000003c
+ 800000e4: 30005073 csrwi mstatus,0
+ 800000e8: 00000297 auipc t0,0x0
+ 800000ec: 01428293 addi t0,t0,20 # 800000fc
+ 800000f0: 34129073 csrw mepc,t0
+ 800000f4: f1402573 csrr a0,mhartid
+ 800000f8: 30200073 mret
+
+00000000800000fc :
+ 800000fc: 80000537 lui a0,0x80000
+ 80000100: 80000593 li a1,-2048
+ 80000104: 00002697 auipc a3,0x2
+ 80000108: efc68693 addi a3,a3,-260 # 80002000
+ 8000010c: 00a6b023 sd a0,0(a3)
+ 80000110: a0b6b72f amomax.d a4,a1,(a3)
+ 80000114: 80000eb7 lui t4,0x80000
+ 80000118: 00200193 li gp,2
+ 8000011c: 05d71063 bne a4,t4,8000015c
+
+0000000080000120 :
+ 80000120: 0006b783 ld a5,0(a3)
+ 80000124: 80000e93 li t4,-2048
+ 80000128: 00300193 li gp,3
+ 8000012c: 03d79863 bne a5,t4,8000015c
+
+0000000080000130 :
+ 80000130: 00100593 li a1,1
+ 80000134: 0006b023 sd zero,0(a3)
+ 80000138: a0b6b72f amomax.d a4,a1,(a3)
+ 8000013c: 00000e93 li t4,0
+ 80000140: 00400193 li gp,4
+ 80000144: 01d71c63 bne a4,t4,8000015c
+
+0000000080000148 :
+ 80000148: 0006b783 ld a5,0(a3)
+ 8000014c: 00100e93 li t4,1
+ 80000150: 00500193 li gp,5
+ 80000154: 01d79463 bne a5,t4,8000015c
+ 80000158: 00301c63 bne zero,gp,80000170
+
+000000008000015c :
+ 8000015c: 0ff0000f fence
+ 80000160: 00018063 beqz gp,80000160
+ 80000164: 00119193 slli gp,gp,0x1
+ 80000168: 0011e193 ori gp,gp,1
+ 8000016c: 00000073 ecall
+
+0000000080000170 :
+ 80000170: 0ff0000f fence
+ 80000174: 00100193 li gp,1
+ 80000178: 00000073 ecall
+ 8000017c: c0001073 unimp
+ 80000180: 0000 unimp
+ 80000182: 0000 unimp
diff --git a/test/riscv/tests/rv64ua-p-amomax_d.elf b/test/riscv/tests/rv64ua-p-amomax_d.elf
new file mode 100755
index 00000000..4828a226
Binary files /dev/null and b/test/riscv/tests/rv64ua-p-amomax_d.elf differ
diff --git a/test/riscv/tests/rv64ua-p-amomax_w.dump b/test/riscv/tests/rv64ua-p-amomax_w.dump
new file mode 100644
index 00000000..5de2185e
--- /dev/null
+++ b/test/riscv/tests/rv64ua-p-amomax_w.dump
@@ -0,0 +1,125 @@
+
+rv64ua-p-amomax_w: file format elf64-littleriscv
+
+
+Disassembly of section .text.init:
+
+0000000080000000 <_start>:
+ 80000000: 04c0006f j 8000004c
+
+0000000080000004 :
+ 80000004: 34202f73 csrr t5,mcause
+ 80000008: 00800f93 li t6,8
+ 8000000c: 03ff0a63 beq t5,t6,80000040
+ 80000010: 00900f93 li t6,9
+ 80000014: 03ff0663 beq t5,t6,80000040
+ 80000018: 00b00f93 li t6,11
+ 8000001c: 03ff0263 beq t5,t6,80000040
+ 80000020: 80000f17 auipc t5,0x80000
+ 80000024: fe0f0f13 addi t5,t5,-32 # 0 <_start-0x80000000>
+ 80000028: 000f0463 beqz t5,80000030
+ 8000002c: 000f0067 jr t5
+ 80000030: 34202f73 csrr t5,mcause
+ 80000034: 000f5463 bgez t5,8000003c
+ 80000038: 0040006f j 8000003c
+
+000000008000003c :
+ 8000003c: 5391e193 ori gp,gp,1337
+
+0000000080000040 :
+ 80000040: 00001f17 auipc t5,0x1
+ 80000044: fc3f2023 sw gp,-64(t5) # 80001000
+ 80000048: ff9ff06f j 80000040
+
+000000008000004c :
+ 8000004c: f1402573 csrr a0,mhartid
+ 80000050: 00051063 bnez a0,80000050
+ 80000054: 00000297 auipc t0,0x0
+ 80000058: 01028293 addi t0,t0,16 # 80000064
+ 8000005c: 30529073 csrw mtvec,t0
+ 80000060: 18005073 csrwi satp,0
+ 80000064: 00000297 auipc t0,0x0
+ 80000068: 01c28293 addi t0,t0,28 # 80000080
+ 8000006c: 30529073 csrw mtvec,t0
+ 80000070: fff00293 li t0,-1
+ 80000074: 3b029073 csrw pmpaddr0,t0
+ 80000078: 01f00293 li t0,31
+ 8000007c: 3a029073 csrw pmpcfg0,t0
+ 80000080: 00000297 auipc t0,0x0
+ 80000084: 01828293 addi t0,t0,24 # 80000098
+ 80000088: 30529073 csrw mtvec,t0
+ 8000008c: 30205073 csrwi medeleg,0
+ 80000090: 30305073 csrwi mideleg,0
+ 80000094: 30405073 csrwi mie,0
+ 80000098: 00000193 li gp,0
+ 8000009c: 00000297 auipc t0,0x0
+ 800000a0: f6828293 addi t0,t0,-152 # 80000004
+ 800000a4: 30529073 csrw mtvec,t0
+ 800000a8: 00100513 li a0,1
+ 800000ac: 01f51513 slli a0,a0,0x1f
+ 800000b0: 00055863 bgez a0,800000c0
+ 800000b4: 0ff0000f fence
+ 800000b8: 00100193 li gp,1
+ 800000bc: 00000073 ecall
+ 800000c0: 80000297 auipc t0,0x80000
+ 800000c4: f4028293 addi t0,t0,-192 # 0 <_start-0x80000000>
+ 800000c8: 00028e63 beqz t0,800000e4
+ 800000cc: 10529073 csrw stvec,t0
+ 800000d0: 0000b2b7 lui t0,0xb
+ 800000d4: 1092829b addiw t0,t0,265
+ 800000d8: 30229073 csrw medeleg,t0
+ 800000dc: 30202373 csrr t1,medeleg
+ 800000e0: f4629ee3 bne t0,t1,8000003c
+ 800000e4: 30005073 csrwi mstatus,0
+ 800000e8: 00000297 auipc t0,0x0
+ 800000ec: 01428293 addi t0,t0,20 # 800000fc
+ 800000f0: 34129073 csrw mepc,t0
+ 800000f4: f1402573 csrr a0,mhartid
+ 800000f8: 30200073 mret
+
+00000000800000fc :
+ 800000fc: 80000537 lui a0,0x80000
+ 80000100: 80000593 li a1,-2048
+ 80000104: 00002697 auipc a3,0x2
+ 80000108: efc68693 addi a3,a3,-260 # 80002000
+ 8000010c: 00a6a023 sw a0,0(a3)
+ 80000110: a0b6a72f amomax.w a4,a1,(a3)
+ 80000114: 80000eb7 lui t4,0x80000
+ 80000118: 00200193 li gp,2
+ 8000011c: 05d71063 bne a4,t4,8000015c
+
+0000000080000120 :
+ 80000120: 0006a783 lw a5,0(a3)
+ 80000124: 80000e93 li t4,-2048
+ 80000128: 00300193 li gp,3
+ 8000012c: 03d79863 bne a5,t4,8000015c
+
+0000000080000130 :
+ 80000130: 00100593 li a1,1
+ 80000134: 0006a023 sw zero,0(a3)
+ 80000138: a0b6a72f amomax.w a4,a1,(a3)
+ 8000013c: 00000e93 li t4,0
+ 80000140: 00400193 li gp,4
+ 80000144: 01d71c63 bne a4,t4,8000015c
+
+0000000080000148 :
+ 80000148: 0006a783 lw a5,0(a3)
+ 8000014c: 00100e93 li t4,1
+ 80000150: 00500193 li gp,5
+ 80000154: 01d79463 bne a5,t4,8000015c
+ 80000158: 00301c63 bne zero,gp,80000170
+
+000000008000015c :
+ 8000015c: 0ff0000f fence
+ 80000160: 00018063 beqz gp,80000160
+ 80000164: 00119193 slli gp,gp,0x1
+ 80000168: 0011e193 ori gp,gp,1
+ 8000016c: 00000073 ecall
+
+0000000080000170 :
+ 80000170: 0ff0000f fence
+ 80000174: 00100193 li gp,1
+ 80000178: 00000073 ecall
+ 8000017c: c0001073 unimp
+ 80000180: 0000 unimp
+ 80000182: 0000 unimp
diff --git a/test/riscv/tests/rv64ua-p-amomax_w.elf b/test/riscv/tests/rv64ua-p-amomax_w.elf
new file mode 100755
index 00000000..1336c9c7
Binary files /dev/null and b/test/riscv/tests/rv64ua-p-amomax_w.elf differ
diff --git a/test/riscv/tests/rv64ua-p-amomaxu_d.dump b/test/riscv/tests/rv64ua-p-amomaxu_d.dump
new file mode 100644
index 00000000..8492cd4d
--- /dev/null
+++ b/test/riscv/tests/rv64ua-p-amomaxu_d.dump
@@ -0,0 +1,125 @@
+
+rv64ua-p-amomaxu_d: file format elf64-littleriscv
+
+
+Disassembly of section .text.init:
+
+0000000080000000 <_start>:
+ 80000000: 04c0006f j 8000004c
+
+0000000080000004 :
+ 80000004: 34202f73 csrr t5,mcause
+ 80000008: 00800f93 li t6,8
+ 8000000c: 03ff0a63 beq t5,t6,80000040
+ 80000010: 00900f93 li t6,9
+ 80000014: 03ff0663 beq t5,t6,80000040
+ 80000018: 00b00f93 li t6,11
+ 8000001c: 03ff0263 beq t5,t6,80000040
+ 80000020: 80000f17 auipc t5,0x80000
+ 80000024: fe0f0f13 addi t5,t5,-32 # 0 <_start-0x80000000>
+ 80000028: 000f0463 beqz t5,80000030
+ 8000002c: 000f0067 jr t5
+ 80000030: 34202f73 csrr t5,mcause
+ 80000034: 000f5463 bgez t5,8000003c
+ 80000038: 0040006f j 8000003c
+
+000000008000003c :
+ 8000003c: 5391e193 ori gp,gp,1337
+
+0000000080000040 :
+ 80000040: 00001f17 auipc t5,0x1
+ 80000044: fc3f2023 sw gp,-64(t5) # 80001000
+ 80000048: ff9ff06f j 80000040
+
+000000008000004c :
+ 8000004c: f1402573 csrr a0,mhartid
+ 80000050: 00051063 bnez a0,80000050
+ 80000054: 00000297 auipc t0,0x0
+ 80000058: 01028293 addi t0,t0,16 # 80000064
+ 8000005c: 30529073 csrw mtvec,t0
+ 80000060: 18005073 csrwi satp,0
+ 80000064: 00000297 auipc t0,0x0
+ 80000068: 01c28293 addi t0,t0,28 # 80000080
+ 8000006c: 30529073 csrw mtvec,t0
+ 80000070: fff00293 li t0,-1
+ 80000074: 3b029073 csrw pmpaddr0,t0
+ 80000078: 01f00293 li t0,31
+ 8000007c: 3a029073 csrw pmpcfg0,t0
+ 80000080: 00000297 auipc t0,0x0
+ 80000084: 01828293 addi t0,t0,24 # 80000098
+ 80000088: 30529073 csrw mtvec,t0
+ 8000008c: 30205073 csrwi medeleg,0
+ 80000090: 30305073 csrwi mideleg,0
+ 80000094: 30405073 csrwi mie,0
+ 80000098: 00000193 li gp,0
+ 8000009c: 00000297 auipc t0,0x0
+ 800000a0: f6828293 addi t0,t0,-152 # 80000004
+ 800000a4: 30529073 csrw mtvec,t0
+ 800000a8: 00100513 li a0,1
+ 800000ac: 01f51513 slli a0,a0,0x1f
+ 800000b0: 00055863 bgez a0,800000c0
+ 800000b4: 0ff0000f fence
+ 800000b8: 00100193 li gp,1
+ 800000bc: 00000073 ecall
+ 800000c0: 80000297 auipc t0,0x80000
+ 800000c4: f4028293 addi t0,t0,-192 # 0 <_start-0x80000000>
+ 800000c8: 00028e63 beqz t0,800000e4
+ 800000cc: 10529073 csrw stvec,t0
+ 800000d0: 0000b2b7 lui t0,0xb
+ 800000d4: 1092829b addiw t0,t0,265
+ 800000d8: 30229073 csrw medeleg,t0
+ 800000dc: 30202373 csrr t1,medeleg
+ 800000e0: f4629ee3 bne t0,t1,8000003c
+ 800000e4: 30005073 csrwi mstatus,0
+ 800000e8: 00000297 auipc t0,0x0
+ 800000ec: 01428293 addi t0,t0,20 # 800000fc
+ 800000f0: 34129073 csrw mepc,t0
+ 800000f4: f1402573 csrr a0,mhartid
+ 800000f8: 30200073 mret
+
+00000000800000fc :
+ 800000fc: 80000537 lui a0,0x80000
+ 80000100: 80000593 li a1,-2048
+ 80000104: 00002697 auipc a3,0x2
+ 80000108: efc68693 addi a3,a3,-260 # 80002000
+ 8000010c: 00a6b023 sd a0,0(a3)
+ 80000110: e0b6b72f amomaxu.d a4,a1,(a3)
+ 80000114: 80000eb7 lui t4,0x80000
+ 80000118: 00200193 li gp,2
+ 8000011c: 05d71063 bne a4,t4,8000015c
+
+0000000080000120 :
+ 80000120: 0006b783 ld a5,0(a3)
+ 80000124: 80000e93 li t4,-2048
+ 80000128: 00300193 li gp,3
+ 8000012c: 03d79863 bne a5,t4,8000015c
+
+0000000080000130 :
+ 80000130: fff00593 li a1,-1
+ 80000134: 0006b023 sd zero,0(a3)
+ 80000138: e0b6b72f amomaxu.d a4,a1,(a3)
+ 8000013c: 00000e93 li t4,0
+ 80000140: 00400193 li gp,4
+ 80000144: 01d71c63 bne a4,t4,8000015c
+
+0000000080000148 :
+ 80000148: 0006b783 ld a5,0(a3)
+ 8000014c: fff00e93 li t4,-1
+ 80000150: 00500193 li gp,5
+ 80000154: 01d79463 bne a5,t4,8000015c
+ 80000158: 00301c63 bne zero,gp,80000170
+
+000000008000015c :
+ 8000015c: 0ff0000f fence
+ 80000160: 00018063 beqz gp,80000160
+ 80000164: 00119193 slli gp,gp,0x1
+ 80000168: 0011e193 ori gp,gp,1
+ 8000016c: 00000073 ecall
+
+0000000080000170 :
+ 80000170: 0ff0000f fence
+ 80000174: 00100193 li gp,1
+ 80000178: 00000073 ecall
+ 8000017c: c0001073 unimp
+ 80000180: 0000 unimp
+ 80000182: 0000 unimp
diff --git a/test/riscv/tests/rv64ua-p-amomaxu_d.elf b/test/riscv/tests/rv64ua-p-amomaxu_d.elf
new file mode 100755
index 00000000..04a36aad
Binary files /dev/null and b/test/riscv/tests/rv64ua-p-amomaxu_d.elf differ
diff --git a/test/riscv/tests/rv64ua-p-amomaxu_w.dump b/test/riscv/tests/rv64ua-p-amomaxu_w.dump
new file mode 100644
index 00000000..1f01067b
--- /dev/null
+++ b/test/riscv/tests/rv64ua-p-amomaxu_w.dump
@@ -0,0 +1,125 @@
+
+rv64ua-p-amomaxu_w: file format elf64-littleriscv
+
+
+Disassembly of section .text.init:
+
+0000000080000000 <_start>:
+ 80000000: 04c0006f j 8000004c
+
+0000000080000004 :
+ 80000004: 34202f73 csrr t5,mcause
+ 80000008: 00800f93 li t6,8
+ 8000000c: 03ff0a63 beq t5,t6,80000040
+ 80000010: 00900f93 li t6,9
+ 80000014: 03ff0663 beq t5,t6,80000040
+ 80000018: 00b00f93 li t6,11
+ 8000001c: 03ff0263 beq t5,t6,80000040
+ 80000020: 80000f17 auipc t5,0x80000
+ 80000024: fe0f0f13 addi t5,t5,-32 # 0 <_start-0x80000000>
+ 80000028: 000f0463 beqz t5,80000030
+ 8000002c: 000f0067 jr t5
+ 80000030: 34202f73 csrr t5,mcause
+ 80000034: 000f5463 bgez t5,8000003c
+ 80000038: 0040006f j 8000003c
+
+000000008000003c :
+ 8000003c: 5391e193 ori gp,gp,1337
+
+0000000080000040