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