1. 09 Jul, 2005 1 commit
  2. 05 Jul, 2005 1 commit
    • dons's avatar
      [project @ 2005-07-05 04:55:30 by dons] · 76f8c7b8
      dons authored
      Fix ffi on OpenBSD by dynamically allocating the obscure_ccall_ret_code.
      Also merge in SimonM's wrapper over inline asm patch.
  3. 15 Mar, 2005 1 commit
  4. 14 Mar, 2005 1 commit
  5. 10 Mar, 2005 2 commits
  6. 28 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-28 12:55:17 by simonmar] · 153b9cb9
      simonmar authored
      Rationalise the BUILD,HOST,TARGET defines.
      Recall that:
        - build is the platform we're building on
        - host is the platform we're running on
        - target is the platform we're generating code for
      The change is that now we take these definitions as applying from the
      point of view of the particular source code being built, rather than
      the point of view of the whole build tree.
      For example, in RTS and library code, we were previously testing the
      TARGET platform.  But under the new rule, the platform on which this
      code is going to run is the HOST platform.  TARGET only makes sense in
      the compiler sources.
      In practical terms, this means that the values of BUILD, HOST & TARGET
      may vary depending on which part of the build tree we are in.
      Actual changes:
       - new file: includes/ghcplatform.h contains platform defines for
         the RTS and library code.
       - new file: includes/ghcautoconf.h contains the autoconf settings
         only (HAVE_BLAH).  This is so that we can get hold of these
         settings independently of the platform defines when necessary
         (eg. in GHC).
       - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
       - MachRegs.h, which is included into both the compiler and the RTS,
         now has to cope with the fact that it might need to test either
         _TARGET_ or _HOST_ depending on the context.
       - the compiler's Makefile now generates
         which contains platform defines for the compiler.  These differ
         depending on the stage, of course: in stage2, the HOST is the
         TARGET of stage1.  This was wrong before.
       - The compiler doesn't get platform info from Config.hs any more.
         Previously it did (sometimes), but unless we want to generate
         a new Config.hs for each stage we can't do this.
       - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
         in CPP'd Haskell source.
       - ghcplatform.h defines *_TARGET_* for backwards compatibility
         (ghcplatform.h is included by ghcconfig.h, which is included by
         config.h, so code which still #includes config.h will get the TARGET
         settings as before).
       - The Users's Guide is updated to mention *_HOST_* rather than
       - coding-style.html in the commentary now contains a section on
         platform defines.  There are further doc updates to come.
      Thanks to Wolfgang Thaller for pointing me in the right direction.
  7. 20 Jan, 2005 1 commit
  8. 11 Jan, 2005 2 commits
  9. 10 Jan, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-01-10 18:44:38 by wolfgang] · 0aca2f00
      wolfgang authored
      Handle foreign import wrapper properly for MacOS X, powerpc64-linux and AIX.
      Only Mac OS X tested so far.
      Pass information about argument types from DsForeign to createAdjustor encoded
      as a string ('i' for integers, 'f' for floats, 'd' for doubles and 'l' for
      long [64bit] integers).
  10. 10 Nov, 2004 1 commit
  11. 14 Sep, 2004 1 commit
    • panne's avatar
      [project @ 2004-09-14 16:47:57 by panne] · 4b172561
      panne authored
      * Merged stgMalloc and execPage into a single function which handles
        even multiple pages correctly.
      * Enabled the use VirtualProtect on x86 WinDoze now. This could be
        necessary for processors which distinguish between READ and EXECUTE
        memory accesses, e.g. Itaniums IIRC.
      * Nuked pageMode and set page permissions always to READ/WRITE/EXECUTE,
        otherwise we could accidentally remove the WRITE permission.
      Only mildly tested on x86 Linux, but it might be worth merging into
      the STABLE branch when it turns out to work on x86 WinDoze and OpenBSD.
  12. 13 Sep, 2004 1 commit
    • dons's avatar
      [project @ 2004-09-13 09:19:16 by dons] · 10a9b180
      dons authored
      malloc memory isn't executable by default on OpenBSD, so mprotect
      pages in execPage for that platform. Enables the FFI.
      Merge to stable
  13. 03 Sep, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-09-03 15:28:18 by simonmar] · 95ca6bff
      simonmar authored
      Cleanup: all (well, most) messages from the RTS now go through the
      functions in RtsUtils: barf(), debugBelch() and errorBelch().  The
      latter two were previously called belch() and prog_belch()
      respectively.  See the comments for the right usage of these message
      One reason for doing this is so that we can avoid spurious uses of
      stdout/stderr by Haskell apps on platforms where we shouldn't be using
      them (eg. non-console apps on Windows).
  14. 22 Aug, 2004 4 commits
  15. 21 Aug, 2004 1 commit
  16. 28 Dec, 2003 1 commit
    • panne's avatar
      [project @ 2003-12-28 13:02:46 by panne] · e2c936e2
      panne authored
      Warning police + a little cleanup of #ifdefs relating to execPage. Added two
      TODOs on the way (an adjustor spanning two pages + calling initAdjustor at RTS
      startup). Note that execPage is still disabled (why?).
  17. 12 Nov, 2003 1 commit
    • sof's avatar
      [project @ 2003-11-12 17:18:05 by sof] · 11a971e9
      sof authored
      win32: Support for explicitly setting the execute bit
      on pages containing code that we generate. Not yet enabled.
      Starting with SP2, Windows XP will honour newer x86 CPUs
      that lets you distinguish between readable and
      readable-executable pages.
  18. 21 Sep, 2003 1 commit
  19. 25 Mar, 2003 1 commit
    • sof's avatar
      [project @ 2003-03-25 17:58:47 by sof] · 2548429c
      sof authored
      to ease replacement of the underlying allocator used by stgMallocBytes() and friends, provide (&use) RtsUtils.c:stgFree()
  20. 04 Jan, 2003 1 commit
  21. 22 Nov, 2002 1 commit
  22. 19 Jul, 2002 1 commit
  23. 18 Jul, 2002 1 commit
  24. 21 May, 2002 1 commit
  25. 14 May, 2002 1 commit
    • matthewc's avatar
      [project @ 2002-05-14 08:27:11 by matthewc] · e9d28592
      matthewc authored
      Make adjustor unavailability on a particular platform a runtime barf
      instead of an #error (to allow the remainder of ghc to function without
      architecture-specific support)
  26. 25 Apr, 2002 2 commits
  27. 19 Apr, 2002 1 commit
  28. 26 Mar, 2002 1 commit
  29. 22 Sep, 2001 1 commit
  30. 04 Sep, 2001 1 commit
    • ken's avatar
      [project @ 2001-09-04 14:11:58 by ken] · 6f2578c5
      ken authored
      Just as we do on sparc:
      On alpha, create code to shuffle a0 .. a3 into a2 .. a5 before the
      old code.  This is a GHASTLY HACK which at least makes f-x-dynamic on
      alpha work for callees with up to 32 bytes (4 words) of args.
  31. 22 Aug, 2001 1 commit
    • sewardj's avatar
      [project @ 2001-08-22 14:32:19 by sewardj] · faec4d69
      sewardj authored
      On sparc, create code to shuffle %i0 .. %i3 into %i2 .. %i5 before the
      old code.  This is a GHASTLY HACK which at least makes f-x-dynamic on
      sparc work for callees with up to 16 bytes (4 words) of args.
  32. 14 Aug, 2001 1 commit
    • sewardj's avatar
      [project @ 2001-08-14 13:40:07 by sewardj] · bc5c8021
      sewardj authored
      Change the story about POSIX headers in C compilation.
      Until now, all C code in the RTS and library cbits has by default been
      compiled with settings for POSIXness enabled, that is:
         #define _POSIX_SOURCE   1
         #define _POSIX_C_SOURCE 199309L
         #define _ISOC9X_SOURCE
      If you wanted to negate this, you'd have to define NON_POSIX_SOURCE
      before including headers.
      This scheme has some bad effects:
      * It means that ccall-unfoldings exported via interfaces from a
        module compiled with -DNON_POSIX_SOURCE may not compile when
        imported into a module which does not -DNON_POSIX_SOURCE.
      * It overlaps with the feature tests we do with autoconf.
      * It seems to have caused borkage in the Solaris builds for some
        considerable period of time.
      The New Way is:
      * The default changes to not-being-in-Posix mode.
      * If you want to force a C file into Posix mode, #include as
        the **first** include the new file ghc/includes/PosixSource.h.
        Most of the RTS C sources have this include now.
      * NON_POSIX_SOURCE is almost totally expunged.  Unfortunately
        we have to retain some vestiges of it in ghc/compiler so that
        modules compiled via C on Solaris using older compilers don't
  33. 05 Aug, 2001 1 commit
    • ken's avatar
      [project @ 2001-08-05 00:27:36 by ken] · d41a37d0
      ken authored
      Adjustor code cleanup. Added code to generate Alpha adjustors.
      The way we generate Alpha adjustors right now, it only works if the
      wptr function (the stub function for the Haskell side, that is) takes
      no argument other than the hptr (the Haskell closure to call)!  I believe
      the same deficiency exists in the Sparc adjustors code.
  34. 16 Jan, 2001 1 commit