* Problem with ulonglong on SPARC
@ 2010-04-16 12:18 Victor Stinner
2010-04-21 10:45 ` Mark Dickinson
0 siblings, 1 reply; 2+ messages in thread
From: Victor Stinner @ 2010-04-16 12:18 UTC (permalink / raw)
To: libffi-discuss
Hi,
Python had an issuse about unsigned long long on SPARC:
http://bugs.python.org/issue8314
Martin v. Löwis wrote a patch which was commited to Python trunk:
http://svn.python.org/view?view=rev&revision=79892
Could you port the fix to your git tree?
PS: Please CC-me to your answers, I didn't subscribed to the mailing list.
--
Victor Stinner
http://www.haypocalc.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem with ulonglong on SPARC
2010-04-16 12:18 Problem with ulonglong on SPARC Victor Stinner
@ 2010-04-21 10:45 ` Mark Dickinson
0 siblings, 0 replies; 2+ messages in thread
From: Mark Dickinson @ 2010-04-21 10:45 UTC (permalink / raw)
To: libffi-discuss
Victor Stinner <victor.stinner@...> writes:
> Python had an issuse about unsigned long long on SPARC:
>
> http://bugs.python.org/issue8314
To elaborate, Python's tests for handling of unsigned long long on SPARC (using
both Linux and Solaris) were failing; Martin von Löwis tracked the problem down
to an apparent bug in libffi: it looks as though the code that should handle
unsigned long long in src/sparc/v8.S is missing. At around line 68 of that file
there's the following code:
cmp %i3, FFI_TYPE_INT
be,a done
st %o0, [%i4] ! (delay)
cmp %i3, FFI_TYPE_FLOAT
be,a done
st %f0, [%i4+0] ! (delay)
cmp %i3, FFI_TYPE_DOUBLE
be,a double
st %f0, [%i4+0] ! (delay)
cmp %i3, FFI_TYPE_SINT8
be,a sint8
sll %o0, 24, %o0 ! (delay)
cmp %i3, FFI_TYPE_UINT8
be,a uint8
sll %o0, 24, %o0 ! (delay)
cmp %i3, FFI_TYPE_SINT16
be,a sint16
sll %o0, 16, %o0 ! (delay)
cmp %i3, FFI_TYPE_UINT16
be,a uint16
sll %o0, 16, %o0 ! (delay)
cmp %i3, FFI_TYPE_SINT64
be,a longlong
st %o0, [%i4+0] ! (delay)
done:
ret
restore
Should there be an entry for FFI_TYPE_UINT64 somewhere here? My knowledge of
Sparc ABI and Sparc assembly is non-existent, so I've no idea what should go
here, but the patch that Martin came up can be seen here:
http://bugs.python.org/file16798/sparc.diff
This seems to fix the problem for us, but it would be great to have the libffi
folks confirm that this is a sensible fix, or to point out better fixes if they
exist.
Thanks,
Mark Dickinson
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-21 10:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-16 12:18 Problem with ulonglong on SPARC Victor Stinner
2010-04-21 10:45 ` Mark Dickinson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).