Skip to content

Commit

Permalink
Zacas: add RV64 tests for amocas.q
Browse files Browse the repository at this point in the history
  • Loading branch information
ved-rivos committed Jul 17, 2023
1 parent e402810 commit 7996b16
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions isa/rv64ua/amocas_q.S
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,35 @@ RVTEST_CODE_BEGIN
TEST_CASE(12, a5, 0xffffffff80000002, ld a5, 0(a0))
TEST_CASE(13, a5, 0xfffffffffffff800, ld a5, 8(a0))

# Zero rs2 means zero.
TEST_CASE(14, a4, 0x80000000, \
li x1, 0x1; \
li a2, 0xffffffff80000000; \
li a3, 0xffffffff70000000; \
la a0, amo_operand; \
sd a2, 0(a0); \
sd a3, 8(a0); \
.word 0x2805462f;\
#amocas.d a2, zero, 0(a0); \
)
TEST_CASE(15, a7, 0, ld a7, 0(a0))
TEST_CASE(16, a7, 0, ld a7, 8(a0))

# Zero rd means zero
TEST_CASE(18, x1, 1, \
li x1, 1; \
li a4, 0xfffffffffffff800; \
li a5, 0xfffffffffffff700; \
la a0, amo_operand; \
sd x0, 0(a0); \
sd x0, 8(a0); \
.word 0x28e5402f;\
#amocas.d zero, a4, 0(a0); \
)
TEST_CASE(19, a7, 0xfffffffffffff800, ld a7, 0(a0))
TEST_CASE(20, a7, 0xfffffffffffff700, ld a7, 8(a0))


TEST_PASSFAIL

RVTEST_CODE_END
Expand Down

0 comments on commit 7996b16

Please sign in to comment.