[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / libclc / generic / lib / integer / mul24.inc
blob95a2f1d6f31baba1cabf93dfe6bcd320799bee7a
2 // We need to use shifts here in order to mantain the sign bit for signed
3 // integers.  The compiler should optimize this to (x & 0x00FFFFFF) for
4 // unsigned integers.
5 #define CONVERT_TO_24BIT(x) (((x) << 8) >> 8)
7 _CLC_OVERLOAD _CLC_DEF __CLC_GENTYPE mul24(__CLC_GENTYPE x, __CLC_GENTYPE y){
8   return CONVERT_TO_24BIT(x) * CONVERT_TO_24BIT(y);
11 #undef CONVERT_TO_24BIT