Bill Allombert on Thu, 28 Oct 2004 18:17:14 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

level0 kernel

Hello PARI-dev,

I have some suggestion to clean up the level0 kernel:

In some circumstance we have only the INLINE function but not
the GCC macro. Unfortunately the LOCAL_HIREMAINDER trick only
work for the GCC macro.

The LOCAL_HIREMAINDER trick give slightly better performance.

One way to fix that could be to add a normal macro like

#define addll(x,y) addll_ov((x),(y),&overflow)

and an INLINE function 
addll_ov(ulong x, ulong y, ulong *overflow)
  const ulong z = x+y;
  return (long) z;

This allow LOCAL_HIREMAINDER to work with non-GCC compiler.

Alternatively we can provide GCC macro version of all level0
INLINE function.