[M3devel] EXT:RE: [M3commit] CVS Update: cm3

Jay K jay.krell at cornell.edu
Wed Sep 25 18:52:36 CEST 2013


Using a type with smaller alignment seems probably correct.

 1) The original authors were pretty good.
 2) So try to come up with a rationale that fits the existing code instead thinking through how we might write it from scratch. (Is this what people call "back filling"?) Really, I can't figure it out either from scratch, but I can maybe guess the thinking behind the existing code.
     Here is my guess: For example: I want to load a 32bit size 32bit aligned datum.
     I have available the ability to do load operation against a 32bit size 8 bit aligned datum.
     I can use that load operation on the more aligned data, as long as 32 mod 8 == 0.


For all I care, we could remove bitfields from the language entirely.
Make people use sets or bit operations with Word.
I don't like that I can't predict the layout of bitfields.
They currently introduce endian-dependentness, but we can fix that.


But I know the garbage collection runtime uses them for compactness.


 - Jay


> Date: Wed, 25 Sep 2013 11:04:09 -0500
> From: rodney_bates at lcwb.coop
> To: m3devel at elegosoft.com
> Subject: Re: [M3devel] EXT:RE:  [M3commit] CVS Update: cm3
> 
> I can reproduce this symptom on a LINUXLIBC6 system and got a small example
> constructed.  It does not happen on AMD64_LINUX, so is apparently word-size
> dependent.
> 
> Jay's revert in CG.ScanTypes makes the problem go away here and elsewhere,
> so should help Randy get past this one.  But it does reintroduce the same
> symptom on different cases, involving packed fields with bit counts other
> than 8, 16, 32, and 64.
> 
> Something seems very wrong, as ScanTypes is, as originally coded, looking
> for a type whose alignment is <= the requested alignment, not >=.  At least
> some of the requested alignment values are coming from a field commented as
> "(* minimum alignment in bits *)".  But then there are places that ask for
> 64-bit alignment on all targets.  Impossible to satisfy.
> 
> I will keep my changes local until I get both groups of cases working on both
> word sizes.
> 
> On 09/23/2013 06:03 PM, Coleburn, Randy wrote:
> > *Things go fine until I get to m3core.  I get an internal code generator error. *See error below:
> >
> > --- processing package "m3-libs\m3core" ---
> >
> > --- purging derived files from NT386 ---
> >
> > --- cleaning NT386 ---
> >
> > ignoring ..\src\m3overrides
> >
> > --- building in NT386 ---
> >
> > ignoring ..\src\m3overrides
> >
> > new source -> compiling RTHooks.i3
> >
> > new source -> compiling RT0.i3
> >
> > new source -> compiling RuntimeError.i3
> >
> > new source -> compiling WordRep.i3
> >
> > new source -> compiling Word.i3
> >
> > new source -> compiling RTException.i3
> >
> > new source -> compiling RTHooks.m3
> >
> > new source -> compiling RT0.m3
> >
> > new source -> compiling Compiler.i3
> >
> > new source -> compiling RuntimeError.m3
> >
> > new source -> compiling Compiler.m3
> >
> > new source -> compiling RTAllocator.i3
> >
> > new source -> compiling RTType.i3
> >
> > new source -> compiling RTHeapRep.i3
> >
> > new source -> compiling FloatMode.i3
> >
> > new source -> compiling RTThread.i3
> >
> > new source -> compiling Scheduler.i3
> >
> > new source -> compiling RTOS.i3
> >
> > new source -> compiling RTMisc.i3
> >
> > new source -> compiling Cstdlib.i3
> >
> > new source -> compiling Cstddef.i3
> >
> > new source -> compiling LongRep.i3
> >
> > new source -> compiling Long.i3
> >
> > new source -> compiling BasicCtypes.i3
> >
> > new source -> compiling Ctypes.i3
> >
> > new source -> compiling RTAllocCnts.i3
> >
> > new source -> compiling RTAllocator.m3
> >
> > "..\src\runtime\common\RTAllocator.m3", line 95: ** INTERNAL CG ERROR *** unable to find integer type? type=Word.32  s/o/a=8/416/64
> >
> > "..\src\runtime\common\RTAllocator.m3", line 209: ** INTERNAL CG ERROR *** unable to find integer type?  type=Word.32  s/o/a=8/416/64
> >
> > "..\src\runtime\common\RTAllocator.m3", line 231: ** INTERNAL CG ERROR *** unable to find integer type?  type=Word.32  s/o/a=8/416/64
> >
> > "..\src\runtime\common\RTAllocator.m3", line 248: ** INTERNAL CG ERROR *** unable to find integer type?  type=Word.32  s/o/a=8/416/64
> >
> > "..\src\runtime\common\RTAllocator.m3", line 270: ** INTERNAL CG ERROR *** unable to find integer type?  type=Word.32  s/o/a=8/416/64
> >
> > "..\src\runtime\common\RTAllocator.m3", line 303: ** INTERNAL CG ERROR *** unable to find integer type?  type=Word.32  s/o/a=8/416/64
> >
> > "..\src\runtime\common\RTAllocator.m3", line 324: ** INTERNAL CG ERROR *** unable to find integer type?  type=Word.32  s/o/a=8/416/64
> >
> > 7 errors encountered
> >
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20130925/03642f34/attachment-0002.html>


More information about the M3devel mailing list