1 # See LICENSE for license details.
3 #*****************************************************************************
5 #-----------------------------------------------------------------------------
7 # Test blt instruction.
10 #include "riscv_test.h"
11 #include "test_macros.h"
16 #-------------------------------------------------------------
18 #-------------------------------------------------------------
20 # Each test checks both forward and backward branches
22 TEST_BR2_OP_TAKEN( 2, blt, 0, 1 );
23 TEST_BR2_OP_TAKEN( 3, blt, -1, 1 );
24 TEST_BR2_OP_TAKEN( 4, blt, -2, -1 );
26 TEST_BR2_OP_NOTTAKEN( 5, blt, 1, 0 );
27 TEST_BR2_OP_NOTTAKEN( 6, blt, 1, -1 );
28 TEST_BR2_OP_NOTTAKEN( 7, blt, -1, -2 );
29 TEST_BR2_OP_NOTTAKEN( 8, blt, 1, -2 );
31 #-------------------------------------------------------------
33 #-------------------------------------------------------------
35 TEST_BR2_SRC12_BYPASS( 9, 0, 0, blt, 0, -1 );
36 TEST_BR2_SRC12_BYPASS( 10, 0, 1, blt, 0, -1 );
37 TEST_BR2_SRC12_BYPASS( 11, 0, 2, blt, 0, -1 );
38 TEST_BR2_SRC12_BYPASS( 12, 1, 0, blt, 0, -1 );
39 TEST_BR2_SRC12_BYPASS( 13, 1, 1, blt, 0, -1 );
40 TEST_BR2_SRC12_BYPASS( 14, 2, 0, blt, 0, -1 );
42 TEST_BR2_SRC12_BYPASS( 15, 0, 0, blt, 0, -1 );
43 TEST_BR2_SRC12_BYPASS( 16, 0, 1, blt, 0, -1 );
44 TEST_BR2_SRC12_BYPASS( 17, 0, 2, blt, 0, -1 );
45 TEST_BR2_SRC12_BYPASS( 18, 1, 0, blt, 0, -1 );
46 TEST_BR2_SRC12_BYPASS( 19, 1, 1, blt, 0, -1 );
47 TEST_BR2_SRC12_BYPASS( 20, 2, 0, blt, 0, -1 );
49 #-------------------------------------------------------------
50 # Test delay slot instructions not executed nor bypassed
51 #-------------------------------------------------------------
53 TEST_CASE( 21, x1, 3, \