Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # See LICENSE for license details.
- #*****************************************************************************
- # yourinst.S
- #-----------------------------------------------------------------------------
- #
- # This is the most basic self checking test. If your simulator does not
- # pass thiss then there is little chance that it will pass any of the
- # more complicated self checking tests.
- #
- #include "riscv_test.h"
- #include "test_macros.h"
- #define TEST_STRCHR( testnum, result, init, chr ) \
- TEST_CASE( testnum, x1, result, \
- li x1, MASK_XLEN(init); \
- li x2, MASK_XLEN(0xDEADBEEF); \
- li x6, MASK_XLEN(99); \
- sw x6, x2 \
- li x6, MASK_XLEN(97) \
- sw x6, 4(x2) \
- li x6, MASK_XLEN(116) \
- sw x6, 8(x2) \
- li x6, MASK_XLEN(97) \
- sw x6, 12(x2) \
- li x6, MASK_XLEN(0) \
- sw x6, 16(x2) \
- li x3, MASK_XLEN(chr); \
- .word 0x3100EB)
- RVTEST_RV64U
- RVTEST_CODE_BEGIN
- # FIXME: Add your tests here
- # See the tests in movn.S for examples
- // TEST_STRCHR
- TEST_STRCHR(2, 0xDEADBEEF + 4, 0, 'a')
- TEST_PASSFAIL
- RVTEST_CODE_END
- 1,1 Top
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement