1 #*****************************************************************************
3 #-----------------------------------------------------------------------------
5 # Test lbu instruction.
8 #include "riscv_test.h"
9 #include "test_macros.h"
14 #-------------------------------------------------------------
16 #-------------------------------------------------------------
18 TEST_LD_OP( 2, lbu, 0x00000000000000ff, 0, tdat );
19 TEST_LD_OP( 3, lbu, 0x0000000000000000, 1, tdat );
20 TEST_LD_OP( 4, lbu, 0x00000000000000f0, 2, tdat );
21 TEST_LD_OP( 5, lbu, 0x000000000000000f, 3, tdat );
23 # Test with negative offset
25 TEST_LD_OP( 6, lbu, 0x00000000000000ff, -3, tdat4 );
26 TEST_LD_OP( 7, lbu, 0x0000000000000000, -2, tdat4 );
27 TEST_LD_OP( 8, lbu, 0x00000000000000f0, -1, tdat4 );
28 TEST_LD_OP( 9, lbu, 0x000000000000000f, 0, tdat4 );
30 # Test with a negative base
32 TEST_CASE( 10, x3, 0x00000000000000ff, \
38 # Test with unaligned base
40 TEST_CASE( 11, x3, 0x0000000000000000, \
46 #-------------------------------------------------------------
48 #-------------------------------------------------------------
50 TEST_LD_DEST_BYPASS( 12, 0, lbu, 0x00000000000000f0, 1, tdat2 );
51 TEST_LD_DEST_BYPASS( 13, 1, lbu, 0x000000000000000f, 1, tdat3 );
52 TEST_LD_DEST_BYPASS( 14, 2, lbu, 0x0000000000000000, 1, tdat1 );
54 TEST_LD_SRC1_BYPASS( 15, 0, lbu, 0x00000000000000f0, 1, tdat2 );
55 TEST_LD_SRC1_BYPASS( 16, 1, lbu, 0x000000000000000f, 1, tdat3 );
56 TEST_LD_SRC1_BYPASS( 17, 2, lbu, 0x0000000000000000, 1, tdat1 );
58 #-------------------------------------------------------------
59 # Test write-after-write hazard
60 #-------------------------------------------------------------
62 TEST_CASE( 18, x2, 2, \
68 TEST_CASE( 19, x2, 2, \