Get rid of `std.math.F80Repr`. Instead of trying to match the memory
layout of f80, we treat it as a value, same as the other floating point
types. The functions `make_f80` and `break_f80` are introduced to
compose an f80 value out of its parts, and the inverse operation.
stage2 LLVM backend: fix pointer to zero length array tripping LLVM
assertion. It now checks for when the element type is a zero-bit type
and lowers such thing the same way that pointers to other zero-bit types
are lowered.
Both stage1 and stage2 LLVM backends are adjusted so that f80 is lowered
as x86_fp80 on x86_64 and i386 architectures, and identical to a u80 on
others. LLVM constants are lowered in a less hacky way now that #10860
is fixed, by using the expression `(exp << 64) | fraction` using llvm
constants.
Sema is improved to handle c_longdouble by recursively handling it
correctly for whatever the float bit width is. In both stage1 and
stage2.
It's needed because LLVM emits library calls to compiler-rt when hardware lacks
functionality, for example, 64-bit integer multiplication on 32-bit x86.
This library is automatically built as-needed for the compilation target and
then statically linked and therefore is a transparent dependency for the
programmer.
Any bugs should be solved by trying to duplicate the bug upstream.
If the bug exists upstream, get it fixed with the LLVM team and then port
the fix downstream to Zig.
If the bug only exists in Zig, something went wrong porting the code,
and you can run the C code and Zig code side by side in a debugger
to figure out what's happening differently.