<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><div>Is bitfield layout really portable enough and predictable enough that interop is achievable?</div><div>I don't know the layout algorithms myself.</div><div>I don't really know what packed does.</div><div>Change the alignment rules for the record?</div><div>Remove all padding for alignment? And then access fields piecemeal in case anything is no longer aligned?</div><div>I should experiment.</div><div><br></div><div><br></div><div> - Jay<br><br><br><br></div><div><hr id="stopSpelling">Subject: Re: [M3devel] posix/nt/32/64/endian platforms for C backend?<br>From: hosking@purdue.edu<br>Date: Tue, 18 Aug 2015 11:57:52 +1000<br>CC: m3devel@elegosoft.com<br>To: jay.krell@cornell.edu<br><br><br><div><blockquote><div>On Aug 18, 2015, at 9:43 AM, Jay K <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>> wrote:</div><br class="ecxApple-interchange-newline"><div><div style="font: 16px/normal Calibri; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal;" dir="ltr"><div>But if these are new targets, that can only generate C?</div><div>I claim the endianness is arbitrary and only serves for interop with C bitfields and nothing else.</div></div></div></blockquote><div><br></div><div>And doesn’t interrupt make sense wherever possible.  I would hope that there is a reasonable correspondence between C types and M3 types, particularly for RECORD and PACKED elements.</div><br><blockquote><div><div style="font: 16px/normal Calibri; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal;" dir="ltr"><div>It doesn't matter what endianness you declare. It is likely to work correctly either way.</div><div>I have to double check that integers and floats are initialized "at once", and not a byte at a time.</div><div><br></div><div> - Jay<br><br><br><br></div><div>> Subject: Re: [M3devel] posix/nt/32/64/endian platforms for C backend?<br>> From:<span class="ecxApple-converted-space"> </span><a href="mailto:hosking@purdue.edu">hosking@purdue.edu</a><br>> Date: Mon, 17 Aug 2015 09:49:37 +1000<br>> CC:<span class="ecxApple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> To:<span class="ecxApple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>><span class="ecxApple-converted-space"> </span><br>> I strongly prefer that the front-end remain aware of target endianness (as it currently is for packing/unpacking bits in memory).<br>> It is important that there be some correspondence with the target.<br>> So, endianness should remain.<br>><span class="ecxApple-converted-space"> </span></div></div></div></blockquote></div><br></div>                                       </div></body>
</html>