Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MPILIB: disable usage of floating point registers on parisc

The umul_ppmm() macro for parisc uses the xmpyu assembler statement
which does calculation via a floating point register.

But usage of floating point registers inside the Linux kernel are not
allowed and gcc will stop compilation due to the -mdisable-fpregs
compiler option.

Fix this by disabling the umul_ppmm() and udiv_qrnnd() macros. The
mpilib will then use the generic built-in implementations instead.

Signed-off-by: Helge Deller <deller@gmx.de>

+3 -2
+3 -2
lib/mpi/longlong.h
··· 318 318 "rM" ((USItype)(bh)), \ 319 319 "rM" ((USItype)(al)), \ 320 320 "rM" ((USItype)(bl))) 321 - #if defined(_PA_RISC1_1) 321 + #if 0 && defined(_PA_RISC1_1) 322 + /* xmpyu uses floating point register which is not allowed in Linux kernel. */ 322 323 #define umul_ppmm(wh, wl, u, v) \ 323 324 do { \ 324 325 union {UDItype __ll; \ ··· 338 337 #define UMUL_TIME 40 339 338 #define UDIV_TIME 80 340 339 #endif 341 - #ifndef LONGLONG_STANDALONE 340 + #if 0 /* #ifndef LONGLONG_STANDALONE */ 342 341 #define udiv_qrnnd(q, r, n1, n0, d) \ 343 342 do { USItype __r; \ 344 343 (q) = __udiv_qrnnd(&__r, (n1), (n0), (d)); \