[MLton] nj-mlton on amd64 linux broken?

Vesa Karvonen vesa.a.j.k at gmail.com
Wed Sep 10 13:00:10 PDT 2008


I've been looking at committing the FP constant folding stuff.  One of
the problems was that the code didn't compile with SML/NJ.  I've now
changed the code to also compile with SML/NJ (and the optimization is
disabled when MLton has been compiled with SML/NJ) and I'd now like to
make a sanity check that nothing broke.  However, it seems that MLton
built with SML/NJ on amd64 linux is broken.  Here is what happens when
I run bin/regression after make nj-mlton on amd64 linux from
unmodified SVN trunk:

$ ./bin/regression
MLton MLTONVERSION (built Wed Sep 10 22:44:30 2008 on caterpillar)
flags = -type-check true
testing 10
        movq (gcState+0x18)(%rip),%r15
.p2align 0x4
.globl F_0
.hidden F_0
F_0:
L_0:
        movq (gcState+0x18)(%rip),%r15
        cmpq %rbp,%r15
        setb %al
        movzbl %al,%eax
        testl %eax,%eax
        movl %eax,(globalWord32+0x0)(%rip)
        jnz L_7
L_1:
        movq (gcState+0x8)(%rip),%r14
        cmpq %r12,%r14
        setb %bl
        movzbl %bl,%ebx
        testl %ebx,%ebx
        movl %ebx,(globalWord32+0x4)(%rip)
        jnz L_25
L_2:
        movq (c_stackP+0x0)(%rip),%r15
        movq %r15,%rsp
        movq $0x11,%r15
        movq %r15,%rcx
        xorq %r15,%r15
        movq %r15,%rdx
        movq $0x18,%r15
        movq %r15,%rsi
        leaq gcState(%rip),%r15
        movq %r15,%r14
        movq %r14,%rdi
        addq $0x8,%rbp
        leaq (L_3+0x0)(%rip),%r15
        movq %r15,0xFFFFFFFFFFFFFFF8(%rbp)
        movq %r12,(gcState+0x0)(%rip)
        movq %rbp,(gcState+0x10)(%rip)
        call GC_arrayAllocate
        movq (gcState+0x0)(%rip),%r15
        movq %r15,%r12
        movq (gcState+0x10)(%rip),%r15
        movq %r15,%rbp
        jmp L_3
assertion failure: amd64CodeGen.outputChunk
compilation of 10 failed with -type-check true

(And the same seems to happen on other tests, too.)

So, am I doing something wrong here or should I just forget about
testing with SML/NJ built MLton on amd64 linux?

-Vesa Karvonen



More information about the MLton mailing list