gmp3 with 4.08.x
Michael Weber
michael.weber@post.rwth-aachen.de
Tue, 24 Apr 2001 16:29:12 +0200
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
On Tue, Apr 24, 2001 at 14:04:30 +0100, Simon Marlow wrote:
> > BTW: I didn't change too much, AFAIR.
>
> The native code generator will also need changing (it refers to some of
> the internal GMP functions explicitly). I think probably the rest of
> the compiler is OK.
Hmmm, i didn't change anything in this respect (why should I? I
thought gmp3 and gmp2 are binary incompatible /ONLY/), but tested the
NCG.
Seems fine so far:
[409]% cat foo.hs
module Main(main) where
main = print $ (100000000009999999999900000000 :: Integer) `div` 2
[410]% /usr/lib/ghc-4.08.1/bin/ghc -Onot -v -fglasgow-exts foo.hs
The Glorious Glasgow Haskell Compilation System, version 4.08.1
Effective command line: -Onot -v -fglasgow-exts
Ineffective C pre-processor:
echo '{-# LINE 1 "foo.hs" -}' > /tmp/ghc15048.cpp && cat
foo.hs >> /tmp/
ghc15048.cpp
real 0m0.000s
user 0m0.000s
sys 0m0.000s
ghc:compile:Interface file foo.hi doesn't exist
Haskell compiler:
/usr/lib/ghc-4.08.1/hsc /tmp/ghc15048.cpp -fglasgow-exts
-fignore-interface-pragmas -fomit-interface-pragmas -fsimplify
[ -fmax-simplifier-iterations4 ] -fwarn-overlapping-patterns
-fwarn-missing-methods -fwarn-missing-fields
-fwarn-deprecations -fwarn-duplicate-exports -fhi-version=408
-static
"-himap=.%.hi:/usr/lib/ghc-4.08.1/imports/lang%.hi:/usr/lib/ghc-4.08.1/imports/lang%.hi:/usr/lib/ghc-4.08.1/imports/std%.hi"
"-himap-sep=:" -v -hifile=/tmp/ghc15048.hi -o lang=asm
-ofile=/tmp/ghc15048.s -F=/tmp/ghc15048_stb.c
-FH=/tmp/ghc15048_stb.h + RTS -H6000000 -K1000000
[...]
(full output is attached)
> To test it you need to use large integers, as Marcin pointed out.
hopefully I did :)
Cheers,
Michael
--
/~\ ASCII ribbon | "Never buy anything that mentions Windows on the package.
\ / campaign | Except sheets of glass. Or plastic. And that smelly
X against | blue stuff that removes dirt without leaving a residue."
/ \ HTML mail | -- jhickle<at>pgh.nauticom.net in c.o.l.d.s.
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="ghc.log"
The Glorious Glasgow Haskell Compilation System, version 4.08.1
Effective command line: -Onot -v -fglasgow-exts
Ineffective C pre-processor:
echo '{-# LINE 1 "foo.hs" -}' > /tmp/ghc14888.cpp && cat foo.hs >> /tmp/ghc14888.cpp
real 0m0.000s
user 0m0.000s
sys 0m0.000s
ghc:compile:Interface file foo.hi doesn't exist
ghc:recompile:Input file foo.hs newer than foo.o
Haskell compiler:
/usr/lib/ghc-4.08.1/hsc /tmp/ghc14888.cpp -fglasgow-exts -fignore-interface-pragmas -fomit-interface-pragmas -fsimplify [ -fmax-simplifier-iterations4 ] -fwarn-overlapping-patterns -fwarn-missing-methods -fwarn-missing-fields -fwarn-deprecations -fwarn-duplicate-exports -fhi-version=408 -static "-himap=.%.hi:/usr/lib/ghc-4.08.1/imports/lang%.hi:/usr/lib/ghc-4.08.1/imports/lang%.hi:/usr/lib/ghc-4.08.1/imports/std%.hi" "-himap-sep=:" -v -hifile=/tmp/ghc14888.hi -olang=asm -ofile=/tmp/ghc14888.s -F=/tmp/ghc14888_stb.c -FH=/tmp/ghc14888_stb.h +RTS -H6000000 -K1000000
Glasgow Haskell Compiler, version 4.08, for Haskell 98, compiled by GHC version 4.08
real 0m0.775s
user 0m0.690s
sys 0m0.030s
Pin on Haskell consistency info:
echo '
.text
hsc.foo.hs.40.0..:' >> /tmp/ghc14888.s
real 0m0.000s
user 0m0.000s
sys 0m0.000s
*** New hi file follows...
__interface "Main" Main where
__export Main main;
import PrelFloat 1 !;
import Prelude 1;
main :: PrelIOBase.IO PrelBase.Z0T ;
ghc: module version unchanged at 2
Replace .hi file, if changed:
cmp -s Main.hi /tmp/ghc14888.hi-new || ( rm -f Main.hi && cp /tmp/ghc14888.hi-new Main.hi )
real 0m0.003s
user 0m0.000s
sys 0m0.000s
Unix assembler:
gcc -o foo.o -c -I. -I/usr/lib/ghc-4.08.1/includes /tmp/ghc14888.s
0.02user 0.00system 0:00.01elapsed 153%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (316major+85minor)pagefaults 0swaps
Linker:
gcc -v -u PrelMain_mainIO_closure -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelFloat_Fzh_static_info -u PrelFloat_Dzh_static_info -u PrelAddr_Azh_static_info -u PrelAddr_Wzh_static_info -u PrelAddr_I64zh_static_info -u PrelAddr_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelFloat_Fzh_con_info -u PrelFloat_Dzh_con_info -u PrelAddr_Azh_con_info -u PrelAddr_Wzh_con_info -u PrelAddr_I64zh_con_info -u PrelAddr_W64zh_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_closure -u PrelBase_True_closure -u PrelPack_unpackCString_closure -u PrelException_stackOverflow_closure -u PrelException_heapOverflow_closure -u PrelException_NonTermination_closure -u PrelException_PutFullMVar_closure -u PrelException_BlockedOnDeadMVar_closure -u __init_Prelude -u __init_PrelMain foo.o -L/usr/lib/ghc-4.08.1 -L/usr/lib/ghc-4.08.1 -L/usr/lib/ghc-4.08.1 -L/usr/lib/ghc-4.08.1 -L/usr/lib/ghc-4.08.1 -lHSlang -lH!
Slang_cbits -lHSstd -lHSstd_cbits -lHSrts -lgmp -lm
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.3/specs
gcc version 2.95.3 20010219 (prerelease)
/usr/lib/gcc-lib/i386-linux/2.95.3/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -u PrelMain_mainIO_closure -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelFloat_Fzh_static_info -u PrelFloat_Dzh_static_info -u PrelAddr_Azh_static_info -u PrelAddr_Wzh_static_info -u PrelAddr_I64zh_static_info -u PrelAddr_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelFloat_Fzh_con_info -u PrelFloat_Dzh_con_info -u PrelAddr_Azh_con_info -u PrelAddr_Wzh_con_info -u PrelAddr_I64zh_con_info -u PrelAddr_W64zh_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_closure -u PrelBase_True_closure -u PrelPack_unpackCString_closure -u PrelException_stackOverflow_closure -u PrelException_heapOverflow_closure -u PrelException_NonTermination_closure -u PrelException_PutFullMVar_closure -u PrelException_BlockedOnDeadMVar_closure -u __init_Prelude -u __init_PrelMain /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-l!
ib/i386-linux/2.95.3/crtbegin.o -L/usr/lib/ghc-4.08.1 -L/usr/lib/ghc-4.08.1 -L/usr/lib/ghc-4.08.1 -L/usr/lib/ghc-4.08.1 -L/usr/lib/ghc-4.08.1 -L/usr/lib/gcc-lib/i386-linux/2.95.3 foo.o -lHSlang -lHSlang_cbits -lHSstd -lHSstd_cbits -lHSrts -lgmp -lm -lgcc -lc -lgcc /usr/lib/gcc-lib/i386-linux/2.95.3/crtend.o /usr/lib/crtn.o
0.58user 0.10system 0:02.85elapsed 23%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (498major+1191minor)pagefaults 0swaps
rm -f /tmp/ghc14888*
--qMm9M+Fa2AknHoGS--