[M3devel] closure marker

Jay K jay.krell at cornell.edu
Wed May 26 17:13:38 CEST 2010


As I understand, currently we define the "closure marker" to be INTEGER sized and -1, and guaranteed aligned or not.
64bit systems that care about alignment pay quite a penality imho.


I need to research, but I strongly suspect we should have Target.ClosureSize (bits) instead of Target.AlignedProcedures.


If a system with a 64bit INTEGER has 4 byte instructions, that are always 4 byte aligned, and has instructions that can load a 4 byte integer, then we'd just set Target.ClosureSize = 32. The alignment stuff would fall away.


I suspect this covers PPC64, SPARC64, ALPHA64, HPPA64, but I'd have to research their intruction sets.
  Do they have 4 byte instructions, that are always 4 byte aligned?


IA64 probably would have Target.ClosureSize=128 and the frontend would generate two guaranteed-aligned 64bit loads.


More general might be
  Target.ClosureElementSize  (bits)
  Target.ClosureElementCount  


IA64 could then use Target.ClosureElementSize = 64, Target.ClosureElementCount = 2.
Whereas most others would have Target.ClosureElementSize  = 32, Target.ClosureElementSize  = 1.
ClosureElementSize would be chosen to be match guaranteed code alignment.



  - Jay

 		 	   		  


More information about the M3devel mailing list