[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Byte endianess vs Bit endianess
From: |
John Darrington |
Subject: |
Re: Byte endianess vs Bit endianess |
Date: |
Mon, 18 Nov 2019 19:07:36 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Nov 18, 2019 at 05:10:02PM +0100, Jose E. Marchesi wrote:
Another alternative would be to add the ability to define "endianness
groups" in Poke structs:
deftype IEEE754_Double =
struct
{
endian
{
int<52> fraction @ fraction_offset;
int<11> exponent @ exponent_offset;
int<1> sign @ sign_offset;
};
};
That would make the compiler to generate peek/poke instructions assuming
the whole group shall be written as a discrete integral, endian wise.
wdyt?
This would seem like the right approach to me. And if this was the
case, then the @ xxx_offset bits would be unnecessary. It would DTRT
depending on the endianess in effect at the time.
J'