• N
    lib/mpi: Eliminate unused umul_ppmm definitions for MIPS · b0c091ae
    Nathan Chancellor 提交于
    Clang errors out when building this macro:
    
    lib/mpi/generic_mpih-mul1.c:37:24: error: invalid use of a cast in a
    inline asm context requiring an l-value: remove the cast or build with
    -fheinous-gnu-extensions
                    umul_ppmm(prod_high, prod_low, s1_ptr[j], s2_limb);
                    ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    lib/mpi/longlong.h:652:20: note: expanded from macro 'umul_ppmm'
            : "=l" ((USItype)(w0)), \
                    ~~~~~~~~~~^~~
    lib/mpi/generic_mpih-mul1.c:37:3: error: invalid output constraint '=h'
    in asm
                    umul_ppmm(prod_high, prod_low, s1_ptr[j], s2_limb);
                    ^
    lib/mpi/longlong.h:653:7: note: expanded from macro 'umul_ppmm'
                 "=h" ((USItype)(w1)) \
                 ^
    2 errors generated.
    
    The C version that is used for GCC 4.4 and up works well with clang;
    however, it is not currently being used because Clang masks itself
    as GCC 4.2.1 for compatibility reasons. As Nick points out, we require
    GCC 4.6 and newer in the kernel so we can eliminate all of the
    versioning checks and just use the C version of umul_ppmm for all
    supported compilers.
    
    Link: https://github.com/ClangBuiltLinux/linux/issues/605Suggested-by: NNick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: NNathan Chancellor <natechancellor@gmail.com>
    Reviewed-by: NNick Desaulniers <ndesaulniers@google.com>
    Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
    b0c091ae
longlong.h 39.0 KB