Re: libffi & powerpc

2007-05-16 Thread Patrick Olinet
ok, I've created PR31937 related to the libffi bug and I've also submitted a quick patch to the gcc-patches mailing list Patrick On 5/16/07, Mike Stump <[EMAIL PROTECTED]> wrote: On May 15, 2007, at 2:20 AM, Patrick Olinet wrote: > Finally, I've tried it the dirty way, ie by commenting out all

Re: libffi & powerpc

2007-05-15 Thread Mike Stump
On May 15, 2007, at 2:20 AM, Patrick Olinet wrote: Finally, I've tried it the dirty way, ie by commenting out all the "stfd" instructions at the beginning of the ppc_closure.S file and things seem to work !!! Wonderful. If you could, would you submit the patch to gcc- patches... I suspect

Re: libffi & powerpc

2007-05-15 Thread Andrew Haley
Patrick Olinet writes: > > > I thought that fpu emulation worked by trapping cpu exceptions when a > > > fpu instruction is being executed and then emulating this instruction > > > on software level. > > > > Yes. > > > > > Isn't the mechanism implemented by the "--with-float=soft" option

Re: libffi & powerpc

2007-05-15 Thread Andrew Haley
Patrick Olinet writes: > Finally, I've tried it the dirty way, ie by commenting out all the > "stfd" instructions at the beginning of the ppc_closure.S file and > things seem to work !!! > > "stfd" are used to save fpu registers and were always executed, even > if no float/double arguments w

Re: libffi & powerpc

2007-05-15 Thread Patrick Olinet
Finally, I've tried it the dirty way, ie by commenting out all the "stfd" instructions at the beginning of the ppc_closure.S file and things seem to work !!! "stfd" are used to save fpu registers and were always executed, even if no float/double arguments were involved in the call and if no fpu i

Re: libffi & powerpc

2007-05-14 Thread Joel Sherrill
Mike Stump wrote: On May 14, 2007, at 11:53 AM, Eric Christopher wrote: On May 14, 2007, at 11:35 AM, Mike Stump wrote: On May 14, 2007, at 8:46 AM, Patrick Olinet wrote: Running with gdb, it looks like the problem comes from the ppc_closure.S file of the libffi/src/powerpc directory, at l

Re: libffi & powerpc

2007-05-14 Thread Mike Stump
On May 14, 2007, at 11:53 AM, Eric Christopher wrote: On May 14, 2007, at 11:35 AM, Mike Stump wrote: On May 14, 2007, at 8:46 AM, Patrick Olinet wrote: Running with gdb, it looks like the problem comes from the ppc_closure.S file of the libffi/src/powerpc directory, at line 32 : Maybe so

Re: libffi & powerpc

2007-05-14 Thread Patrick Olinet
> I thought that fpu emulation worked by trapping cpu exceptions when a > fpu instruction is being executed and then emulating this instruction > on software level. Yes. > Isn't the mechanism implemented by the "--with-float=soft" option ? No. FPU emulation requires no special compile-time

Re: libffi & powerpc

2007-05-14 Thread Eric Christopher
On May 14, 2007, at 11:35 AM, Mike Stump wrote: On May 14, 2007, at 8:46 AM, Patrick Olinet wrote: Running with gdb, it looks like the problem comes from the ppc_closure.S file of the libffi/src/powerpc directory, at line 32 : Maybe something like: #ifndef _SOFT_FLOAT stfd %f1, 48(%r1) #e

Re: libffi & powerpc

2007-05-14 Thread Mike Stump
On May 14, 2007, at 8:46 AM, Patrick Olinet wrote: Running with gdb, it looks like the problem comes from the ppc_closure.S file of the libffi/src/powerpc directory, at line 32 : Maybe something like: #ifndef _SOFT_FLOAT stfd %f1, 48(%r1) #endif but then, you might have to have something li

Re: libffi & powerpc

2007-05-14 Thread Andrew Haley
Patrick Olinet writes: > > > I've compiled again my cross toolchain with the "--with-float=soft" > > > option, hoping that it would emulate FPU instruction, but this > > > unfortunately doesn't help... I'm nevertheless not sure that this > > > option is the right one... > > > > If your entire

Re: libffi & powerpc

2007-05-14 Thread Patrick Olinet
> I've compiled again my cross toolchain with the "--with-float=soft" > option, hoping that it would emulate FPU instruction, but this > unfortunately doesn't help... I'm nevertheless not sure that this > option is the right one... If your entire toolchain is compiled with --with-float=soft, then

Re: libffi & powerpc

2007-05-14 Thread Andrew Haley
[top-posting fixed] Patrick Olinet writes: > On 5/8/07, Andrew Haley <[EMAIL PROTECTED]> wrote: > > Patrick Olinet writes: > > > Hi there, > > > > > > I'm running an embedded platform based on a powerpc 405EP CPU and a > > > gcc 4.1.0 cross-toolchain. My initial problem was that gcj comp

Re: libffi & powerpc

2007-05-14 Thread David Daney
Patrick Olinet wrote: Running with gdb, it looks like the problem comes from the ppc_closure.S file of the libffi/src/powerpc directory, at line 32 : stfd %f1, 48(%r1) I don't understand anything to powerpc assembly, but after a google search, "stfd" means "store floating-point double". But the

Re: libffi & powerpc

2007-05-14 Thread Patrick Olinet
Running with gdb, it looks like the problem comes from the ppc_closure.S file of the libffi/src/powerpc directory, at line 32 : stfd %f1, 48(%r1) I don't understand anything to powerpc assembly, but after a google search, "stfd" means "store floating-point double". But the PPC405 doesn't have an

Re: libffi & powerpc

2007-05-08 Thread Andrew Haley
Patrick Olinet writes: > Hi there, > > I'm running an embedded platform based on a powerpc 405EP CPU and a > gcc 4.1.0 cross-toolchain. My initial problem was that gcj compiled > binaries crash at runtime when interpreting java bytecode ("Illegal > instruction" message). > > After many in