On Fri, 4 Oct 2013 13:06:37 +0000 (UTC)
"anri p." <anr...@mail.com> wrote:

> I've recently encountered a situation, when calling compiled C function like:
> 
> double
> fn( double a);
> 
> 
> from ECL causes to return garbage. It seem that it is ether an UFFI bug
> or misconfiguration in the build environment. This happens on linux x86-64,
> running 32 bit ECL and compiling C code with -m32 gcc flag. And 
> integer/pointer
> C code calling works fine.
> 
> So i believe that it is some issue with FP registers returning convention for 
> x86.
> Is there any way to change it in a some predictable way in both UFFI/ECL and
> gcc options?

Would it be possible to show how you're calling the function from Lisp
(including the UFFI binding)?

Also, it'd be useful to have the C source code which fails and the
assembly of the resulting code.  Using (setf c::*delete-files* nil) and
then compiling the file should leave the C file around for inspection.
It's also possible to obtain the resulting assembly using objdump -drw
<file>.fas (from binutils).

Thanks,
-- 
Matt

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to