Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2024-07

soft-fpu

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Frb

Any hints on using unit SoftFpu? (or any alternative)

I have an 80 bit float (from an external source) that needs to be converted to double.

But if I do
  uses softfpu, ufloatx80

then I get
  Error: Multiple defined symbol "INT32_TO_FLOAT64"

and many more...

Reply by email

Florian Klämpfl
to Martin Frb
Show quoted text 13 lines
Am 10.07.2024 um 19:21 schrieb Martin Frb via fpc-devel : Any hints on using unit SoftFpu? (or any alternative) I have an 80 bit float (from an external source) that needs to be converted to double. But if I do uses softfpu, ufloatx80 then I get Error: Multiple defined symbol "INT32_TO_FLOAT64" and many more…

The can be used only automatically by compiler magic. 80 bit soft float support is only limited though. But I guess you can rip out the float80 to float64 code as it has some very liberal license.

Reply by email

Sven Barth
to Martin Frb: Any hints on using unit SoftFpu? (or any alternative) I have an 80 bit float (from an…

Martin Frb via fpc-devel schrieb am Mi.,
10. Juli 2024, 19:21:

Show quoted text 13 lines
Any hints on using unit SoftFpu? (or any alternative) I have an 80 bit float (from an external source) that needs to be converted to double. But if I do uses softfpu, ufloatx80 then I get Error: Multiple defined symbol "INT32_TO_FLOAT64" and many more...

The SoftFpu unit is only intended for use by the compiler. If you want to use 80-bit floating point yourself you need to use ufloat80 and sfpux80 (the later wraps the same include files as SoftFpu, but for use by the user).

Regards,
Sven

Reply by email

Martin Frb
to Sven Barth
Sven Barth wrote 7 lines
The SoftFpu unit is only intended for use by the compiler. If you want to use 80-bit floating point yourself you need to use ufloat80 and sfpux80 (the later wraps the same include files as SoftFpu, but for use by the user).

Thanks. Now FpDebug can show the fpu st0..st7 registers.

I guess on Windows 64 they aren't used, except when cross debugging a 32bit target.
=> still needs work, as currently the value is handled as double in the IDE (less precision)

Reply by email