mpn_rshift / mpn_lshift bug on m68000
Kevin Ryde
user42 at zip.com.au
Sat Oct 18 08:07:14 CEST 2003
Patrick Pelissier <Patrick.Pelissier at loria.fr> writes:
>
> For mc68000, in most case, int = 16 bits, and long = 32 bits.
I believe all our current targets have int==long. int==long might
even be in the srv4 spec (which I've read, but didn't keep enough crib
notes).
> The best way to fix this is, in my opinion, to never use type 'int'
> for a library. But it is a lot of work...
The parameter type cannot be changed, it'd break source code
compatibility.
But yes, if the value is 16-bits and it's passed with garbage in the
upper part then we have to account for that.
I think the PalmOS tools use int==16bits, but I'm not sure we ever got
as far as actually running on that, so I don't know if there's an
actual problem or merely a hypothetical one.
I guess we can load just 16-bits either way, since the shift count is
only ever 1 to 31. Feel free to propose a patch.
More information about the gmp-bugs
mailing list