[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] param passing float
Hi John,
At Tue, 17 Aug 2004 14:20:18 +1000,
John Williams wrote:
>
> Hi Yashi,
>
> Yasushi SHOJI wrote:
> > I've benn tring to figure out this weird symptoms. I've been testing
> > with John's latest toolchain and Xilinx's EDK 6.2. both prints:
> >
> > now what I can't compile is this:
> >
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <string.h>
> >
> > int main()
> > {
> > char buf[1024];
> > sprintf(buf, "%.*g\n\n", 15, 1.0);
> > printf("%s\n", buf);
> > gcvt(1.0, 15, buf);
> > printf("%s\n", buf);
> > return 0;
> > }
> >
> >
> > if I comment out gcvt() line, it seems like it compiles fine and work
> > as I expected.
>
> This program compiles cleanly for me using the out-of-tree compile
> instructions that you wrote. It runs, but the result looks ilke garbage.
>
> What's the error if you include the gcvt line?
oops, that's a bug in my wording ;P I can compile, but as you said
result is garbage. is this know bug?
if you disassemble, main() is tring to pass float to gcvt, but
register assignment is a bit odd. hmm... i'll try in-tree compile to
see whether it works or not.
btw, is there any ABI doc about float and double? do i need any
option to pass float/double to a function?
best,
--
yashi
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/