1. 22 Apr, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-04-22 09:32:39 by simonmar] · 0f3205e6
      simonmar authored
      SMP: the rest of the changes to support safe thunk entry & updates.  I
      thought the compiler changes were independent, but I ended up breaking
      the HEAD, so I'll have to commit the rest.  non-SMP compilation should
      not be affected.
      0f3205e6
  2. 05 Apr, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-04-05 09:38:00 by simonmar] · 3f4fd743
      simonmar authored
      Main x86_64 hacking: we have a problem on this arch where binutils
      can't generate 64-bit relative relocations (R_X86_64_PC64), which many
      of our info-table fields are.  So far we've been hacking around it by
      putting everything in the text section, but I've decided to adopt
      another approach: we'll use explicit 32-bit offset fields on this
      platform instead.  This is safe in the default "small" memory model
      where all symbols are guaranteed to be in the lower 2Gb of the address
      space.
      
      NCG changes coming; mangler changes are probably required too.
      3f4fd743
  3. 13 Aug, 2004 1 commit
  4. 12 Nov, 2003 1 commit
    • sof's avatar
      [project @ 2003-11-12 17:27:00 by sof] · a814590c
      sof authored
      Tidy up a couple of unportable coding issues:
      
      - conditionally use empty structs.
      - use GNU attributes only if supported.
      - 'long long' usage
      - use of 'inline' in declarations and definitions.
      
      Upshot of these changes is that MSVC is now capable of compiling
      the non-.hc portions of the RTS.
      a814590c
  5. 11 Dec, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-12-11 15:36:20 by simonmar] · 0bffc410
      simonmar authored
      Merge the eval-apply-branch on to the HEAD
      ------------------------------------------
      
      This is a change to GHC's evaluation model in order to ultimately make
      GHC more portable and to reduce complexity in some areas.
      
      At some point we'll update the commentary to describe the new state of
      the RTS.  Pending that, the highlights of this change are:
      
        - No more Su.  The Su register is gone, update frames are one
          word smaller.
      
        - Slow-entry points and arg checks are gone.  Unknown function calls
          are handled by automatically-generated RTS entry points (AutoApply.hc,
          generated by the program in utils/genapply).
      
        - The stack layout is stricter: there are no "pending arguments" on
          the stack any more, the stack is always strictly a sequence of
          stack frames.
      
          This means that there's no need for LOOKS_LIKE_GHC_INFO() or
          LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
          how to find the boundary between the text and data segments (BIG WIN!).
      
        - A couple of nasty hacks in the mangler caused by the neet to
          identify closure ptrs vs. info tables have gone away.
      
        - Info tables are a bit more complicated.  See InfoTables.h for the
          details.
      
        - As a side effect, GHCi can now deal with polymorphic seq.  Some bugs
          in GHCi which affected primitives and unboxed tuples are now
          fixed.
      
        - Binary sizes are reduced by about 7% on x86.  Performance is roughly
          similar, some programs get faster while some get slower.  I've seen
          GHCi perform worse on some examples, but haven't investigated
          further yet (GHCi performance *should* be about the same or better
          in theory).
      
        - Internally the code generator is rather better organised.  I've moved
          info-table generation from the NCG into the main codeGen where it is
          shared with the C back-end; info tables are now emitted as arrays
          of words in both back-ends.  The NCG is one step closer to being able
          to support profiling.
      
      This has all been fairly thoroughly tested, but no doubt I've messed
      up the commit in some way.
      0bffc410
  6. 03 Oct, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-10-03 13:57:42 by simonmar] · b4623557
      simonmar authored
      Tidy up ghc/includes/Constants and related things.
      
      Now all the constants that the compiler needs to know, such as header
      size, update frame size, info table size and so on are generated
      automatically into a header file, DeriviedConstants.h, by a small C
      program in the same way as NativeDefs.h.  The C code in the RTS is
      expected to use sizeof() directly (it already does).
      
      Also tidied up the constants in MachDeps.h - all the constants
      representing the sizes of various types are named SIZEOF_<foo>, to
      match the constants defined in config.h.  PrelStorable.lhs now doesn't
      contain any special knowledge about GHC's conventions as regards the
      size of certain types, this is all in MachDeps.h.
      b4623557
  7. 26 Jul, 2001 1 commit
    • ken's avatar
      [project @ 2001-07-26 03:08:38 by ken] · 47774449
      ken authored
      Run prelude/primops.txt through the preprocessor, to weed out
      primitives that don't (need to) exist on 64-bit architectures.
      47774449
  8. 23 Jul, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-07-23 17:23:19 by simonmar] · dfd7d6d0
      simonmar authored
      Add a compacting garbage collector.
      
      It isn't enabled by default, as there are still a couple of problems:
      there's a fallback case I haven't implemented yet which means it will
      occasionally bomb out, and speed-wise it's quite a bit slower than the
      copying collector (about 1.8x slower).
      
      Until I can make it go faster, it'll only be useful when you're
      actually running low on real memory.
      
      '+RTS -c' to enable it.
      
      Oh, and I cleaned up a few things in the RTS while I was there, and
      fixed one or two possibly real bugs in the existing GC.
      dfd7d6d0
  9. 07 Nov, 2000 2 commits
    • simonmar's avatar
      [project @ 2000-11-07 17:05:47 by simonmar] · 2de8104d
      simonmar authored
      Clean ups:
      
         - reduce the namespace pollution of StgTypes.h, it doesn't define
           the shorthand versions any more (W_, I_ etc.).  These are moved into
           Stg.h.  StgTypes.h also defines StgClosure as an "opaque" struct.
      
         - RtsAPI.h is now standalone, and includes HsFFI.h and thereby
           config.h & StgTypes.h.  Now we don't need to #include "Stg.h" in
           *_stub.c.
      
         - all the rts_mkXXXX and rts_getXXXX functions are defined in terms
           of the HsXXXX types rather than random C types (this fixes some
           potential bugs in our foreign export support).
      
         - added HsWord type, to match StgWord.  The Haskell version of this
           type isn't "documented", but perhaps it should be.
      2de8104d
    • simonmar's avatar
      [project @ 2000-11-07 13:30:40 by simonmar] · 330ff38d
      simonmar authored
      Wave goodbye to FLOATS_AS_DOUBLES, it was a somewhat misconceived idea
      which will cause trouble with the FFI on 64-bit machines.
      330ff38d
  10. 07 Aug, 2000 1 commit
    • qrczak's avatar
      [project @ 2000-08-07 23:37:19 by qrczak] · 4b172698
      qrczak authored
      Now Char, Char#, StgChar have 31 bits (physically 32).
      "foo"# is still an array of bytes.
      
      CharRep represents 32 bits (on a 64-bit arch too). There is also
      Int8Rep, used in those places where bytes were originally meant.
      readCharArray, indexCharOffAddr etc. still use bytes. Storable and
      {I,M}Array use wide Chars.
      
      In future perhaps all sized integers should be primitive types. Then
      some usages of indexing primops scattered through the code could
      be changed to then-available Int8 ones, and then Char variants of
      primops could be made wide (other usages that handle text should use
      conversion that will be provided later).
      
      I/O and _ccall_ arguments assume ISO-8859-1. UTF-8 is internally used
      for string literals (only).
      
      Z-encoding is ready for Unicode identifiers.
      
      Ranges of intlike and charlike closures are more easily configurable.
      
      I've probably broken nativeGen/MachCode.lhs:chrCode for Alpha but I
      don't know the Alpha assembler to fix it (what is zapnot?). Generally
      I'm not sure if I've done the NCG changes right.
      
      This commit breaks the binary compatibility (of course).
      
      TODO:
      * is* and to{Lower,Upper} in Char (in progress).
      * Libraries for text conversion (in design / experiments),
        to be plugged to I/O and a higher level foreign library.
      * PackedString.
      * StringBuffer and accepting source in encodings other than ISO-8859-1.
      4b172698
  11. 12 Jun, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-06-12 11:04:12 by simonmar] · 6f0e4c4d
      simonmar authored
      Fix a nasty bug: the 'c' component of StgUnion was declared as type
      StgChar, which sounds reasonable, but meant that when assigning a char
      to R1 gcc would correctly arrange to only overwrite the low byte
      rather than zero-extending the value.  We assume elsewhere that when
      R1 contains a char that the upper 24 bits are zero, so this was wrong.
      
      This bug must have been around for a *long* time, strange that it only
      just showed up. <shrug>
      6f0e4c4d
  12. 13 Apr, 2000 1 commit
  13. 06 Apr, 2000 1 commit
  14. 05 Apr, 2000 1 commit
    • panne's avatar
      [project @ 2000-04-05 14:26:31 by panne] · a5841e53
      panne authored
      Changed a bunch of `#endif FOO' to `#endif /* FOO */', the former is
      not strictly ANSI (don't know if the latter is, but `gcc -Wall -ansi
      -pedantic' is silent then).
      a5841e53
  15. 04 Apr, 2000 1 commit
  16. 25 Jan, 2000 1 commit
  17. 15 Jul, 1999 1 commit
    • panne's avatar
      [project @ 1999-07-15 16:11:29 by panne] · a61ce4a4
      panne authored
      We have to be very careful with numeric literals in the C part, in
      this case 0xff (of type int = 4 bytes on Alpha) was shifted left 56
      times => always zero  :-{  Using an L or UL suffix is not always
      practical, because the needed size depends on conditional typedefs
      somewhere else. Solution: Cast!  :-P  ghc/includes contains some more
      suspicious literals, but I did not have a look at them yet.
      a61ce4a4
  18. 02 Mar, 1999 1 commit
  19. 05 Feb, 1999 1 commit
  20. 26 Jan, 1999 1 commit
    • simonm's avatar
      [project @ 1999-01-26 11:12:41 by simonm] · ed4cd6d4
      simonm authored
      - Add Stable Names
      
      - Stable pointers and stable names are now both provided by the
        "Stable" module in ghc/lib/exts.  Documentation is updated, and Foriegn
        still exports the stable pointer operations for backwards compatibility.
      ed4cd6d4
  21. 02 Dec, 1998 1 commit