[M3devel] platform-independent packing/alignment?

Jay K jay.krell at cornell.edu
Sun Jan 31 13:21:19 CET 2010


These are more potential ABI breaking changes.

Not sure if they'd break pickles or not.

 

 

I suggest we can probably get by with platform-independent packing/alignment settings.

Align everything by its size, up to 8. ?

That is increased alignment for LONGINT and LONGFLOAT on some systems.

  Which they probably should have been in the first place.

It would also increase alignment for obsolete M68K platforms.

 

 

I also suggest we need pragmas to declare something is packed/aligned

differently. But that might be avoided via C layers.

 

 

See, in mklib we have:

 

 

TYPE
  PIMAGE_SYMBOL = <* UNALIGNED *> UNTRACED REF IMAGE_SYMBOL;
  IMAGE_SYMBOL = RECORD
    N: ARRAY [0 .. 7] OF UINT8;
    Value              : UINT32;
    SectionNumber      : INT16;
    Type               : UINT16;
    StorageClass       : UINT8;
    NumberOfAuxSymbols : UINT8;
  END;

 

CONST
    IMAGE_SIZEOF_SYMBOL = 18;


 

But BYTESIZE(IMAGE_SYMBOL) is probably 20 on all platforms (except maybe M68K ones).

 

 

Then Target.Int8, etc. could be constants.

Maybe not worth anything.

 

 

 - Jay
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100131/6b8cddf1/attachment-0001.html>


More information about the M3devel mailing list