On 3/4/08, Justin Bailey <[EMAIL PROTECTED]> wrote: > I'm trying to get a feel for the assembly output by GHC on my > platform. Below is a module containing one function and the associated > assembly. I've put in comments what I think is going on, but I'd > appreciate it if anyone could give me some pointers. I'd really like > to know three things: > > * Why does _Add_unsafeShiftR_info check if (%esi) is 3? > * What's going on in _s86_info? > * At the end of _s87_info, 8 is added to %ebp and then jumped to. Is > that a jump to the I# constructor and, if so, how did it's address get > to that offset from %ebp? >
I agree with Stefan's advice: read the STG code, especially to answer the second two questions (-ddump-stg), and read the STG paper (if you haven't already): Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine, SL Peyton Jones, Journal of Functional Programming 2(2), Apr 1992, pp127-202. Then if anything's still not clear, ask on the mailing list. Cheers, Tim -- Tim Chevalier * http://cs.pdx.edu/~tjc * Often in error, never in doubt "The future is not google-able." -- William Gibson _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users