5 #define TEST_DIV(N, M) \
6 static void test_div_ ##N(uint ## M ## _t rj, \
12 asm volatile("div."#N" %0,%1,%2\n\t" \
19 #define TEST_MOD(N, M) \
20 static void test_mod_ ##N(uint ## M ## _t rj, \
26 asm volatile("mod."#N" %0,%1,%2\n\t" \
44 test_div_w(0xffaced97, 0xc36abcde, 0x0);
45 test_div_wu(0xffaced97, 0xc36abcde, 0x1);
46 test_div_d(0xffaced973582005f, 0xef56832a358b, 0xffffffffffffffa8);
47 test_div_du(0xffaced973582005f, 0xef56832a358b, 0x11179);
48 test_mod_w(0x7cf18c32, 0xa04da650, 0x1d3f3282);
49 test_mod_wu(0x7cf18c32, 0xc04da650, 0x7cf18c32);
50 test_mod_d(0x7cf18c3200000000, 0xa04da65000000000, 0x1d3f328200000000);
51 test_mod_du(0x7cf18c3200000000, 0xc04da65000000000, 0x7cf18c3200000000);