80 bit floating point emulation

Iain Buclaw ibuclaw at gdcproject.org
Sat Jul 9 15:38:42 UTC 2022


On Saturday, 9 July 2022 at 13:50:12 UTC, Bruce Carneal wrote:
> On Saturday, 9 July 2022 at 06:56:25 UTC, Daniel N wrote:
>> On Saturday, 9 July 2022 at 00:05:07 UTC, Adam D Ruppe wrote:
>>> On Friday, 8 July 2022 at 22:04:38 UTC, Walter Bright wrote:
>>>> In order for DMD to become a proper cross compiler
>>>>
>>>>
>>>> (We don't use other peoples' emulators because of licensing 
>>>> issues.)
>>>
>>> Does ldc have an emulator you don't use for licensing? or 
>>> does it manage to be a usable cross compiler without 80 bit 
>>> reals?
>>
>> LDC always uses 64-bit double for real, no 80 bit support 
>> anywhere afaik.
>
> A quick scan of LLVM code reveals support for a small menagerie 
> of floating point types: f16, bf16, f32, f64, f128 and f80 for 
> x86 targets.
>
> I imagine LDC could support code generation for any subset of 
> these relatively easily.  I'd be surprised if gdc could not.
>

GDC does software emulation for all floating point operations in 
the D compiler, it emulates the target platform by default, but 
it's written as such that it could support emulating native float 
with a 160-bit mantissa, and 26-bit exponent.


More information about the Digitalmars-d mailing list