1 # See LICENSE for license details.
3 #*****************************************************************************
5 #-----------------------------------------------------------------------------
7 # Test rem instruction.
10 #include "riscv_test.h"
11 #include "test_macros.h"
16 #-------------------------------------------------------------
18 #-------------------------------------------------------------
20 TEST_RR_OP( 2, rem, 2, 20, 6 );
21 TEST_RR_OP( 3, rem, -2, -20, 6 );
22 TEST_RR_OP( 4, rem, 2, 20, -6 );
23 TEST_RR_OP( 5, rem, -2, -20, -6 );
25 TEST_RR_OP( 6, rem, 0, -1<<63, 1 );
26 TEST_RR_OP( 7, rem, 0, -1<<63, -1 );
28 TEST_RR_OP( 8, rem, -1<<63, -1<<63, 0 );
29 TEST_RR_OP( 9, rem, 1, 1, 0 );
30 TEST_RR_OP(10, rem, 0, 0, 0 );