Commit Graph

4 Commits

Author SHA1 Message Date
LemonBoy
2dce137d92 compiler-rt: Add __extendsfdf2
Add AEABI builtin __aeabi_f2d
2019-05-09 00:07:46 +02:00
LemonBoy
4ab7b459df Avoid endless recursion in __extendhfsf2
On some platforms the conversion ended up creating a dangerous recursive
loop that ate all the stack.

The conversion to f16 is also pointless since we're operating on the raw
bits anyway.
2019-05-07 11:47:23 +02:00
Ben Noordhuis
fd75e73ee9 add f16 type
Add support for half-precision floating point operations.

Introduce `__extendhfsf2` and `__truncsfhf2` in std/special/compiler_rt.

Add `__gnu_h2f_ieee` and `__gnu_f2h_ieee` as aliases that are used in
Windows builds.

The logic in std/special/compiler_rt/extendXfYf2.zig has been reworked
and can now operate on 16 bits floating point types.

`extendXfYf2()` and `truncXfYf2()` are marked `inline` to work around
a not entirely understood stack alignment issue on Windows when calling
the f16 versions of the builtins.

closes #1122
2018-06-27 16:20:04 +02:00
Andrew Kelley
5f38d6e2e9 add casting docs, __extenddftf2, and __extendsftf2 2018-06-21 14:44:35 -04:00