<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><b>• gc-6-ocaml.patch (+190 lines)</b></div><div>Finally, the new <font class="Apple-style-span" face="Courier">OcamlCollector</font> emits the Ocaml frametable data structure and related symbols.</div><div><br class="webkit-block-placeholder"></div><div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">$ llvm-as -o simple_ocaml.bc simple_ocaml.ll</font></font></div><div><span class="Apple-style-span" style="font-family: Courier; ">$ llc -asm-verbose -gc=ocaml -o - simple_ocaml.bc</span></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .text</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">_camlSimple_ocaml__code_begin:</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .data</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">_camlSimple_ocaml__data_begin:</font></font></div><div><font class="Apple-style-span" face="Courier"><br></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000"><br class="webkit-block-placeholder"></font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .text</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .align  4,0x90</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .globl  _fun</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">_fun:</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        subl    $12, %esp</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        movl    16(%esp), %eax</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        movl    %eax, 8(%esp)</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">LBB1_1: # bb.loop</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        movl    8(%esp), %eax</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        movl    4(%eax), %eax</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        testl   %eax, %eax</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        je      LBB1_1  # bb.loop</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">LBB1_2: # bb.end</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        movl    $8, (%esp)</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        call    L_malloc$stub</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000"><br class="webkit-block-placeholder"></font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">Llabel1:</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        movl    8(%esp), %ecx</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        movl    %ecx, 4(%ecx)</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        addl    $12, %esp</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        ret</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">L_malloc$stub:</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .indirect_symbol _malloc</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        hlt ; hlt ; hlt ; hlt ; hlt</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000"><br class="webkit-block-placeholder"></font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .subsections_via_symbols</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000"><br class="webkit-block-placeholder"></font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .text</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">_camlSimple_ocaml__code_end:</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .data</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">_camlSimple_ocaml__data_end:</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .long   0</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">_camlSimple_ocaml__frametable:</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        # live roots for fun</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .long   Llabel1 # call return address</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .short  0x0     # stack frame size</font></font></div><div><span class="Apple-style-span" style="font-family: Courier; "><font class="Apple-style-span" color="#000000">        .short  0x2     # live root count</font></span></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .word   8       # stack offset</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .word   4       # stack offset</font></font></div><div><font class="Apple-style-span" face="Courier"><font class="Apple-style-span" color="#000000">        .align  2</font></font></div><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" face="Courier"></font></font><br></div></div><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; ">(Oops, just noticed that the stack frame size is incorrect here. I think the machine code pass simply needs to be moved after epilogue/prologue generation a couple patches back.)</span></span></span></span></span></span></div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Trebuchet MS; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; ">— Gordon</span></span></span></span></span></span></div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-style-span" style="font-family: Courier; "></span></div></body></html>