[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] param passing float
Yasushi SHOJI wrote:
> At Tue, 17 Aug 2004 14:20:18 +1000,
> John Williams wrote:
>
>>Hi Yashi,
>>
>>Yasushi SHOJI wrote:
>>
>>>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?
Well I've never tested floats before - I added an assignment and some
simple printf statements in there, and to my great surprise they seemed
to work fine. Not sure about gcvt though.
> 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.
There used to be a problem with variable argument lists and 64 bit types
as parameters, but that's been fixed in the last few EDK releases...
perhaps there's a similar thing for doubles.
> btw, is there any ABI doc about float and double? do i need any
> option to pass float/double to a function?
Not quite sure what you mean here? I would expect float and double
parameter passing ABI is same as integer 32/64 bit types - maybe a gcc
expert can shed some light?
Cheers,
John
___________________________
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/