1 /** Simple test for the mul/div/mod operations.
3 type: int, signed char, short
12 {attr} {storage} {type} i;
17 LOG(("i*5 == 25 = %u\n", (int)i*5));
20 LOG(("i*-4 == -20 = %u\n", (int)i*-4));
24 LOG(("i*12 == -120 = %u\n", (int)i*12));
26 LOG(("i*-3 == 30 = %u\n", (int)i*-3));
29 LOG(("30 == %u\n", (int)i*-3));
35 {attr} {storage} {type} i;
38 LOG(("i/5 == 20 = %u\n", (int)i/5));
40 LOG(("i/-4 == -25 = %u\n", (int)i/-4));
44 LOG(("i/25 == -2 = %u\n", (int)i/25));
46 LOG(("i/-12 == 4 = %u\n", (int)i/-12));
53 {attr} {storage} {type} i;
55 // Disabled the LOG functions due to a bug in sdcc involving
58 // LOG(("i%%17 == 15 = %u\n", (int)(i%9)));
61 #if MOD_SIGN_FOLLOWS_DIVIDEND
62 // LOG(("i%%-7 == 2 = %u\n", (int)i%-7));
66 // LOG(("i%%3 == -1 = %u\n", (int)i%3));
68 // LOG(("i%%-5 == -4 = %u\n", (int)i%-5));