为了卡常

2018-01-16 20:31:30


不顾一切地卡常

    __inline__ __attribute__ ((always_inline)) int mul_mod(int a, int b){
        int ret;
        __asm__ __volatile__ ("\tmull %%ebx\n\tdivl %%ecx\n":"=d"(ret):"a"(a),"b"(b),"c"(MODS));
        return ret;
    }