"Julian Seward (Intl Vendor)" <[EMAIL PROTECTED]> wrote,

> The adventurous among you may like to try an innovation
> which in some cases nearly doubles the speed at which 
> ghc compiles programs.

Sounds very promising :-)

[..]
> * Please try it out!  I would be pleased to get feedback on it.

When I have an -fasm-x86 and an -fvia-C in the command line, 
which one is supposed to take precedence?  Shouldn't (at the 
moment) -fvia-C always take precedence, because it can't
hurt to compile via C?  My concrete problem is the
following, I added 

  GhcLibHcOpts = -O -H24m -split-objs -fasm-x86

to my `build.mk' to make ghc compile its libraries with the
native code generator.  For `ST.lhs' this effectively leads
to the call

  rm -f ST.o ; if [ ! -d ST ]; then mkdir ST; else find ST -name '*.o' -print | xargs 
rm -f __rm_food ; fi ;    
  ../../ghc/driver/ghc-inplace -recomp -cpp -optC-fglasgow-exts -fvia-C -Rghc-timing 
-I../../ghc/includes  -imonads -static -O -H24m -split-objs -fasm-x86     -c ST.lhs -o 
ST.o -osuf o

which in turn gives me

  --------- native code generator ---------

  panic! (the `impossible' happened):
          getRegister(x86,dyadic primop)
      (Prim sameMutVarzh P_IntReg(1) P_[(Sp +P_ (0))])

How can I compile all libraries with the native code
generator, except those which explicitly require to be
compiled via C?

Otherwise, it seems to run fine on my first test programs.
Is the FFI supported by the native code generator?

Thanks for a great feature :-)

Manuel

Reply via email to