[fpc-devel] 64 Bit / 32 Bit

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Oct 4 13:23:10 CEST 2007

On 04 Oct 2007, at 13:13, Daniƫl Mantione wrote:

> Op Thu, 4 Oct 2007, schreef Jonas Maebe:
>> It won't keep it working but rather break it, since currently  
>> writing an
>> extended to file on virtually all platforms writes a double to the  
>> file.
> The majority of code has not been ported to non-x86. To obtain a  
> healthy
> base of compilable code, non-x86 platforms should be compatible  
> with x86
> as much as possible, not the other way around.

It should be compatible where reasonable, but it doesn't make sense  
to emulate all x86 peculiarities on non-x86. Otherwise e.g. "longint  
shl 32" also has to be emulated as "shl 0" on ppc (rather than  
setting the result to 0), all intermediate floating point  
calculations have to be performed using soft float 80 bit math and  
only the end result rounded back to 64/32 bit, etc.

I disagree that having "extended" bit compatible with the i386 is  
required to be able to port most code. Extended, like comp, is an x86- 
specific type and you only get approximate behaviour when using it on  
other architectures (in case of comp the difference is at compile  
time, due to comp being an integer rather than a floating point type  
on non-i386).


More information about the fpc-devel mailing list