00001 #define QOS_DEBUG_LEVEL QOS_LEVEL_DEBUG 00002 #include <linux/aquosa/qos_debug.h> 00003 #include <linux/aquosa/qos_l.h> 00004 00005 int main() { 00006 qos_chk_exit(l_mul_shr(0x10000l, 0x1l, 16) == 0x1l); 00007 qos_chk_exit(l_mul_shr(0x40000000, 0x10000, 16) == (__s32) 0x40000000l); 00008 qos_chk_exit(l_mul_shr(0x7FFFFFFF, 0x10000, 16) == (__s32) 0x7FFFFFFFl); 00009 qos_log_debug("0x80000000 * 0x10000 >> 17 = %lx", (unsigned long) l_mul_shr(0x80000000, 0x10000, 17)); 00010 qos_chk_exit(l_mul_shr(0x80000000, 0x10000, 17) == (__s32) 0xC0000000); 00011 00012 qos_chk_exit(l_shl_div(0x7FFFl, 16, 0x20000l) == 0x3FFFl); 00013 qos_chk_exit(l_shl_div(0x80002244l, 16, 0x20000l) == (__s32) 0xC0001122l); 00014 qos_chk_exit(l_shl_div(0x84210002l, 16, 0x20000l) == (__s32) 0xC2108001l); 00015 00016 return 0; 00017 }