1# See LICENSE for license details. 2 3#***************************************************************************** 4# divuw.S 5#----------------------------------------------------------------------------- 6# 7# Test divuw instruction. 8# 9 10#include "riscv_test.h" 11#include "test_macros.h" 12 13RVTEST_RV64U 14RVTEST_CODE_BEGIN 15 16 #------------------------------------------------------------- 17 # Arithmetic tests 18 #------------------------------------------------------------- 19 20 TEST_RR_OP( 2, divuw, 3, 20, 6 ); 21 TEST_RR_OP( 3, divuw, 715827879, -20 << 32 >> 32, 6 ); 22 TEST_RR_OP( 4, divuw, 0, 20, -6 ); 23 TEST_RR_OP( 5, divuw, 0, -20, -6 ); 24 25 TEST_RR_OP( 6, divuw, -1<<31, -1<<31, 1 ); 26 TEST_RR_OP( 7, divuw, 0, -1<<31, -1 ); 27 28 TEST_RR_OP( 8, divuw, -1, -1<<31, 0 ); 29 TEST_RR_OP( 9, divuw, -1, 1, 0 ); 30 TEST_RR_OP(10, divuw, -1, 0, 0 ); 31 32 TEST_PASSFAIL 33 34RVTEST_CODE_END 35 36 .data 37RVTEST_DATA_BEGIN 38 39 TEST_DATA 40 41RVTEST_DATA_END 42