overflow while compiling array.sml

Matthew Fluet fluet@CS.Cornell.EDU
Tue, 6 Nov 2001 09:53:49 -0500 (EST)


> > The overflow is during limit check insertion.  I am tracking down the
> > bug.
> 
> I have checked in a fix for the bug.  Compiling array.sml with all the
> -drop-passes now leads to an x86-codegen bug.
> 
>       x86 code gen starting
> 	 outputC starting
> 	 outputC finished in 0.05 + 0.00 (0% GC)
> 	 outputAssembly starting
> 	    translateChunk raised
> 	 outputAssembly raised in 5.71 + 0.00 (0% GC)
>       x86 code gen raised in 5.83 + 0.00 (0% GC)
>    Compile SML raised in 163.44 + 0.00 (0% GC)
> MLton raised in 163.45 + 0.00 (0% GC)
> mlton: x86Translate.translateChunk::?
> 
> Maybe this is due to the dead-code/handler problem?

Nope; it was an overflow when trying to compute the wordAlignment for the
frontier after allocating an array of n < 0 elements.  Again, this should
be unreachable code, but it will go through with no frontier shift.

Also fixed a bug in elimALTEST that was producing incorrect results in
word.sml.  Turns out that not all arithmetic/logic instructions set the ZF
flag according to the result; in particular, the not instruction does not
(fitting, eh?).