[M3devel] Target.Structure_size_boundary?

Jay K jay.krell at cornell.edu
Fri Aug 14 22:43:18 CEST 2015


air:src jay$ grep -i boundary *
Target.i3:    boundary (i.e. (size + align - 1) DIV align * align).Target.i3:  Structure_size_boundary: CARDINAL;Target.i3-old:    boundary (i.e. (size + align - 1) DIV align * align).Target.i3-old:  Structure_size_boundary: CARDINAL;Target.m3:    Structure_size_boundary   := 8;Target.m3:        Structure_size_boundary := 16;Target.m3-old:    Structure_size_boundary   := 8;Target.m3-old:                 Structure_size_boundary   := 16;Target.m3-old:                 Structure_size_boundary   := 32;Target.m3-old:                 Structure_size_boundary   := 16;Target.m3-old:                 Structure_size_boundary   := 16;Target.m3-old:                 Structure_size_boundary   := 16;Target.m3-old:                 Structure_size_boundary   := 16;Target.m3-old:                 Structure_size_boundary   := 32;Target.m3-old:                 Structure_size_boundary   := 16;Target.m3-old:                 Structure_size_boundary   := 32;Target.m3-old:                 Structure_size_boundary   := 16;TargetT.i3:  structure_size_boundary: CARDINAL;

Surely we can just consider this 8 and remove all of it uses?
Are all those old >8 uses even correct?
 sizeof(struct {char a;}) really isn't always 1?  sizeof(struct {char a[3];}) really isn't always 3? 

Actually we can verify this easily enough with a cross gcc w/o cross driver/linker/assembler/headers/libraries.I'll do that later.

Plus, we can have the C code statically verify struct sizes agreebetween front end backend, as long as they get encoded anywhere by frontend.

You know, I want to limit Target.m3 to endian and word size. Even those I wish I could remove.

Thanks, - Jay 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20150814/f90c9d0f/attachment-0001.html>


More information about the M3devel mailing list