Recent

Author Topic: FPU 80 bit extended precision  (Read 947 times)

mav

  • Jr. Member
  • **
  • Posts: 79
FPU 80 bit extended precision
« on: February 06, 2023, 07:26:25 pm »
Hello:
Hello, lately every time I update the trunk (I use a stable version and a trunk normally) with fpcup, I see the message: "Adding -dFPC_SOFT_FPUX80
to compiler option to enable 80bit (soft)  float support (trunk only) "...and I ask myself the following questions:
How do you use that "-dFPC_SOFT_FPUX80", is there an example somewhere?
Can it be used in 64 bit applications, in Windows ? (...I am a Windows user).
I usually start by writing code and then when it works,
I do the design of the program... this time I'm doing it backwards.
 Greetings to all!

It takes time and work to learn...!! :D :D ;D ;D    :o

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: FPU 80 bit extended precision
« Reply #1 on: February 06, 2023, 08:34:17 pm »
The windows 64 ABI by itself does not support this (extended is double) but FPC supports this anyway, but not as standard and requires recompilation. NOT recommended. If you are really and I mean really experienced, I can give you a clue.
Otherwise it is pointless.
« Last Edit: February 06, 2023, 08:39:19 pm by Thaddy »
Specialize a type, not a var.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: FPU 80 bit extended precision
« Reply #2 on: February 06, 2023, 10:17:24 pm »
Hello, lately every time I update the trunk (I use a stable version and a trunk normally) with fpcup, I see the message: "Adding -dFPC_SOFT_FPUX80
to compiler option to enable 80bit (soft)  float support (trunk only) "...and I ask myself the following questions:
How do you use that "-dFPC_SOFT_FPUX80", is there an example somewhere?

This is a define that is only respected by the compiler itself and controls whether it uses a software based 80-bit floating point type for cross compiling from a target that does not support 80-bit floating point types (e.g. Win64 on x86_64 or any non-x86 target) to a target that does (e.g. any x86 target that is not x86_64-win64). This define will not enable Extended support on x86_64-win64 and it's also not yet recommended to use that define anyway, because generated binaries will differ from one done with a compiler that has native 80-bit floating point support.

If you want to use 80-bit floating point in your own program then use the sfpux80 and ufloatx80 units. However these are compiled by default only on 3.3.1, not yet on 3.2.2, so you need to compile them yourself.

mav

  • Jr. Member
  • **
  • Posts: 79
Re: FPU 80 bit extended precision
« Reply #3 on: February 07, 2023, 01:01:25 am »
Thanks for answering me.
  Thaddy, I'm not really experienced...but I'll try, I'll post the code I'm doing...I've been looking at the units
  sfpux80 and ufloatx80 and I already started to do something... let's see what comes out... :) :)

 

TinyPortal © 2005-2018