Re: _Float16 support (Kaylor, Andrew via cfe-dev)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: _Float16 support (Kaylor, Andrew via cfe-dev)

David Blaikie via cfe-dev
I haven't looked at what happens with clang when compiling for other targets that don't have native support for half-precision arithmetic, but I would imagine that similar problems exist.

As a comparison point, our out of tree target uses __fp16 (and will move to _Float16 once I find time to work out what semantic changes that causes) but doesn't have native support for it.

In order to avoid spuriously converting to/from f32 across function calls it's special cased in the calling convention. Essentially pass in the low half of a f32 register without changing the bit pattern. This has no drawbacks known to me.

Cheers,

Jon

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev