li a1, 0xfffffffffffff800; \
la a3, amo_operand; \
sd a0, 0(a3); \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
amoadd.d a4, a1, 0(a3); \
)
# try again after a cache miss
TEST_CASE(4, a4, 0xffffffff7ffff800, \
- li a4, 16384; \
- add a5, a3, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
amoadd.d a4, a1, 0(a3); \
)
.align 3
amo_operand:
.dword 0
- .skip 65536
li a1, 0xfffffffffffff800; \
la a3, amo_operand; \
sw a0, 0(a3); \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
amoadd.w a4, a1, 0(a3); \
)
# try again after a cache miss
TEST_CASE(4, a4, 0x000000007ffff800, \
li a1, 0xffffffff80000000; \
- li a4, 16384; \
- add a5, a3, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
amoadd.w a4, a1, 0(a3); \
)
.align 3
amo_operand:
.dword 0
- .skip 65536
li a1, 0xfffffffffffff800; \
la a3, amo_operand; \
sd a0, 0(a3); \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
amoand.d a4, a1, 0(a3); \
)
# try again after a cache miss
TEST_CASE(4, a4, 0xffffffff80000000, \
li a1, 0x0000000080000000; \
- li a4, 16384; \
- add a5, a3, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
amoand.d a4, a1, 0(a3); \
)
.align 3
amo_operand:
.dword 0
- .skip 65536
li a1, 0xfffffffffffff800; \
la a3, amo_operand; \
sw a0, 0(a3); \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
amoand.w a4, a1, 0(a3); \
)
# try again after a cache miss
TEST_CASE(4, a4, 0xffffffff80000000, \
li a1, 0x0000000080000000; \
- li a4, 16384; \
- add a5, a3, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
amoand.w a4, a1, 0(a3); \
)
.align 3
amo_operand:
.dword 0
- .skip 65536
.align 3
amo_operand:
.dword 0
- .skip 65536
.align 3
amo_operand:
.dword 0
- .skip 65536
.align 3
amo_operand:
.dword 0
- .skip 65536
.align 3
amo_operand:
.dword 0
- .skip 65536
.align 3
amo_operand:
.dword 0
- .skip 65536
.align 3
amo_operand:
.dword 0
- .skip 65536
.align 3
amo_operand:
.dword 0
- .skip 65536
+
.align 3
amo_operand:
.dword 0
- .skip 65536
+
li a1, 0xfffffffffffff800; \
la a3, amo_operand; \
sd a0, 0(a3); \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
amoor.d a4, a1, 0(a3); \
)
# try again after a cache miss
TEST_CASE(4, a4, 0xfffffffffffff800, \
li a1, 1; \
- li a4, 16384; \
- add a5, a3, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
amoor.d a4, a1, 0(a3); \
)
.align 3
amo_operand:
.dword 0
- .skip 65536
li a1, 0xfffffffffffff800; \
la a3, amo_operand; \
sw a0, 0(a3); \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
amoor.w a4, a1, 0(a3); \
)
# try again after a cache miss
TEST_CASE(4, a4, 0xfffffffffffff800, \
li a1, 1; \
- li a4, 16384; \
- add a5, a3, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
amoor.w a4, a1, 0(a3); \
)
.align 3
amo_operand:
.dword 0
- .skip 65536
li a1, 0xfffffffffffff800; \
la a3, amo_operand; \
sd a0, 0(a3); \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
amoswap.d a4, a1, 0(a3); \
)
# try again after a cache miss
TEST_CASE(4, a4, 0xfffffffffffff800, \
li a1, 0x0000000080000000; \
- li a4, 16384; \
- add a5, a3, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
- add a5, a5, a4; \
- ld x0, 0(a5); \
amoswap.d a4, a1, 0(a3); \
)
.align 3
amo_operand:
.dword 0
- .skip 65536
li a1, 0xfffffffffffff800; \
la a3, amo_operand; \
sw a0, 0(a3); \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
amoswap.w a4, a1, 0(a3); \
)
# try again after a cache miss
TEST_CASE(4, a4, 0xfffffffffffff800, \
li a1, 0x0000000080000000; \
- li a4, 16384; \
- add a5, a3, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
amoswap.w a4, a1, 0(a3); \
)
.align 3
amo_operand:
.dword 0
- .skip 65536
li a1, 0xfffffffffffff800; \
la a3, amo_operand; \
sw a0, 0(a3); \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
- nop; nop; nop; nop; \
amoxor.w a4, a1, 0(a3); \
)
# try again after a cache miss
TEST_CASE(4, a4, 0x7ffff800, \
li a1, 0xc0000001; \
- li a4, 16384; \
- add a5, a3, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
- add a5, a5, a4; \
- lw x0, 0(a5); \
amoxor.w a4, a1, 0(a3); \
)
.align 3
amo_operand:
.dword 0
- .skip 65536