www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Layout of 80-bit Reals on Mac

reply dsimcha <dsimcha yahoo.com> writes:
I understand that 80-bit reals are padded to 12 bytes on Linux and 16 bytes on
Mac.  Oversight of this issue caused bug 4306
(http://d.puremagic.com/issues/show_bug.cgi?id=4306) since the code was only
initially tested on Windows.  On Linux my testing indicates that the lowest
order 16 bits of a real are zero padding and can be ignored.  However, I don't
own any Mac equipment.  Is it true on Mac that the lowest 32 bits are padding
and can be ignored?  More generally, is it true for the foreseeable future
that, for x86 hardware with reals that occupy N bits of storage, the lowest
order 80 - N bits will be where the padding is?
Jun 13 2010
parent Walter Bright <newshound1 digitalmars.com> writes:
dsimcha wrote:
 I understand that 80-bit reals are padded to 12 bytes on Linux and 16 bytes on
 Mac.  Oversight of this issue caused bug 4306
 (http://d.puremagic.com/issues/show_bug.cgi?id=4306) since the code was only
 initially tested on Windows.  On Linux my testing indicates that the lowest
 order 16 bits of a real are zero padding and can be ignored.  However, I don't
 own any Mac equipment.  Is it true on Mac that the lowest 32 bits are padding
 and can be ignored?  More generally, is it true for the foreseeable future
 that, for x86 hardware with reals that occupy N bits of storage, the lowest
 order 80 - N bits will be where the padding is?

The padding trails the 80 bit real, not precedes it.
Jun 13 2010