1 # See LICENSE for license details.
3 #*****************************************************************************
5 #-----------------------------------------------------------------------------
10 #include "riscv_test.h"
11 #include "test_macros.h"
16 #-------------------------------------------------------------
18 #-------------------------------------------------------------
20 TEST_LD_OP( 2, lh, 0x00000000000000ff, 0, tdat );
21 TEST_LD_OP( 3, lh, 0xffffffffffffff00, 2, tdat );
22 TEST_LD_OP( 4, lh, 0x0000000000000ff0, 4, tdat );
23 TEST_LD_OP( 5, lh, 0xfffffffffffff00f, 6, tdat );
25 # Test with negative offset
27 TEST_LD_OP( 6, lh, 0x00000000000000ff, -6, tdat4 );
28 TEST_LD_OP( 7, lh, 0xffffffffffffff00, -4, tdat4 );
29 TEST_LD_OP( 8, lh, 0x0000000000000ff0, -2, tdat4 );
30 TEST_LD_OP( 9, lh, 0xfffffffffffff00f, 0, tdat4 );
32 # Test with a negative base
34 TEST_CASE( 10, x3, 0x00000000000000ff, \
40 # Test with unaligned base
42 TEST_CASE( 11, x3, 0xffffffffffffff00, \
48 #-------------------------------------------------------------
50 #-------------------------------------------------------------
52 TEST_LD_DEST_BYPASS( 12, 0, lh, 0x0000000000000ff0, 2, tdat2 );
53 TEST_LD_DEST_BYPASS( 13, 1, lh, 0xfffffffffffff00f, 2, tdat3 );
54 TEST_LD_DEST_BYPASS( 14, 2, lh, 0xffffffffffffff00, 2, tdat1 );
56 TEST_LD_SRC1_BYPASS( 15, 0, lh, 0x0000000000000ff0, 2, tdat2 );
57 TEST_LD_SRC1_BYPASS( 16, 1, lh, 0xfffffffffffff00f, 2, tdat3 );
58 TEST_LD_SRC1_BYPASS( 17, 2, lh, 0xffffffffffffff00, 2, tdat1 );
60 #-------------------------------------------------------------
61 # Test write-after-write hazard
62 #-------------------------------------------------------------
64 TEST_CASE( 18, x2, 2, \
70 TEST_CASE( 19, x2, 2, \