1. 09 May, 2007 1 commit
  2. 27 Apr, 2007 1 commit
  3. 08 Mar, 2007 1 commit
    • wolfgang.thaller@gmx.net's avatar
      Make constructor names in info tables position independent · b648333f
      wolfgang.thaller@gmx.net authored
      Info tables, like everything else in the text section, MUST NOT contain
      pointers. A pointer is, by definition, position dependent and is therefore
      fundamentally incompatible with generating position independent code.
      
      Therefore, we have to store an offset from the info label to the string
      instead of the pointer, just as we already did for other things referred
      to by the info table (SRTs, large bitmaps, etc.)
      b648333f
  4. 28 Feb, 2007 1 commit
  5. 20 Feb, 2007 1 commit
    • bjpop@csse.unimelb.edu.au's avatar
      Constructor names in info tables · 7d6dffe5
      bjpop@csse.unimelb.edu.au authored
      This patch adds data constructor names into their info tables. 
      This is useful in the ghci debugger. It replaces the old scheme which
      was based on tracking data con names in the linker. 
      7d6dffe5
  6. 22 Jan, 2007 2 commits
    • Simon Marlow's avatar
      Semi-tagging optimisation · a2d78ebe
      Simon Marlow authored
      In the generated code for case-of-variable, test the tag of the
      scrutinee closure and only enter if it is unevaluated.  Also turn
      *off* vectored returns.
      a2d78ebe
    • Simon Marlow's avatar
      Semi-tagging optimisation · 7f1bc015
      Simon Marlow authored
      In the generated code for case-of-variable, test the tag of the
      scrutinee closure and only enter if it is unevaluated.  Also turn
      *off* vectored returns.
      7f1bc015
  7. 17 Oct, 2006 1 commit
  8. 12 Oct, 2006 1 commit
    • Ian Lynagh's avatar
      Partially fix GHCi when unregisterised · 8c254946
      Ian Lynagh authored
      We were constructing info tables designed for TABLES_NEXT_TO_CODE,
      but were building without TABLES_NEXT_TO_CODE.
      
      This patch also fixes a bug when we are unregisterised on amd64 and
      have code with an address above 2^32.
      8c254946
  9. 11 Oct, 2006 1 commit
    • Simon Marlow's avatar
      Module header tidyup, phase 1 · 49c98d14
      Simon Marlow authored
      This patch is a start on removing import lists and generally tidying
      up the top of each module.  In addition to removing import lists:
      
         - Change DATA.IOREF -> Data.IORef etc.
         - Change List -> Data.List etc.
         - Remove $Id$
         - Update copyrights
         - Re-order imports to put non-GHC imports last
         - Remove some unused and duplicate imports
      49c98d14
  10. 29 Jun, 2006 1 commit
    • Simon Marlow's avatar
      x86-64: fix a problem exposed by negative offsets in vector tables · 1bda00ba
      Simon Marlow authored
      static relative offsets (eg .long l1-l2) are restricted to 32 bits on
      x86-64 due to lack of support in the linker.  The codegen, NCG and
      runtime work around this, using 32-bit offsets instead of 64.
      However, we were missing a workaround for vector tables, and it
      happened to work by accident because the offsets were always positive
      and resolved by the assembler.  The bug was exposed by using the NCG
      to compile the RTS, where the offsets became negative, again by
      accident.
      1bda00ba
  11. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  12. 24 Feb, 2006 1 commit
  13. 17 May, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-05-17 12:22:37 by simonmar] · ce2fc604
      simonmar authored
      Profiling: the type_descr and closure_descr were the wrong way around,
      so +RTS -hy behaves like +RTS -hd, and vice-versa.  How on earth that
      happened I have no idea.
      ce2fc604
  14. 31 Mar, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-03-31 10:16:33 by simonmar] · 853e20a3
      simonmar authored
      Tweaks to get the GHC sources through Haddock.  Doesn't quite work
      yet, because Haddock complains about the recursive modules.  Haddock
      needs to understand SOURCE imports (it can probably just ignore them
      as a first attempt).
      853e20a3
  15. 18 Mar, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-03-18 13:37:27 by simonmar] · d1c1b7d0
      simonmar authored
      Flags cleanup.
      
      Basically the purpose of this commit is to move more of the compiler's
      global state into DynFlags, which is moving in the direction we need
      to go for the GHC API which can have multiple active sessions
      supported by a single GHC instance.
      
      Before:
      
      $ grep 'global_var' */*hs | wc -l
           78
      
      After:
      
      $ grep 'global_var' */*hs | wc -l
           27
      
      Well, it's an improvement.  Most of what's left won't really affect
      our ability to host multiple sessions.
      
      Lots of static flags have become dynamic flags (yay!).  Notably lots
      of flags that we used to think of as "driver" flags, like -I and -L,
      are now dynamic.  The most notable static flags left behind are the
      "way" flags, eg. -prof.  It would be nice to fix this, but it isn't
      urgent.
      
      On the way, lots of cleanup has happened.  Everything related to
      static and dynamic flags lives in StaticFlags and DynFlags
      respectively, and they share a common command-line parser library in
      CmdLineParser.  The flags related to modes (--makde, --interactive
      etc.) are now private to the front end: in fact private to Main
      itself, for now.
      d1c1b7d0
  16. 01 Feb, 2005 3 commits
  17. 07 Oct, 2004 1 commit
    • wolfgang's avatar
      [project @ 2004-10-07 15:54:03 by wolfgang] · b4d045ae
      wolfgang authored
      Position Independent Code and Dynamic Linking Support, Part 1
      
      This commit allows generation of position independent code (PIC) that fully supports dynamic linking on Mac OS X and PowerPC Linux.
      Other platforms are not yet supported, and there is no support for actually linking or using dynamic libraries - so if you use the -fPIC or -dynamic code generation flags, you have to type your (platform-specific) linker command lines yourself.
      
      
      nativeGen/PositionIndependentCode.hs:
      New file. Look here for some more comments on how this works.
      
      cmm/CLabel.hs:
      Add support for DynamicLinkerLabels and PIC base labels - for use inside the NCG.
      needsCDecl: Case alternative labels now need C decls, see the codeGen/CgInfoTbls.hs below for details
      
      cmm/Cmm.hs:
      Add CmmPicBaseReg (used in NCG),
      and CmmLabelDiffOff (used in NCG and for offsets in info tables)
      
      cmm/CmmParse.y:
      support offsets in info tables
      
      cmm/PprC.hs:
      support CmmLabelDiffOff
      Case alternative labels now need C decls (see the codeGen/CgInfoTbls.hs for details), so we need to pprDataExterns for info tables.
      
      cmm/PprCmm.hs:
      support CmmLabelDiffOff
      
      codeGen/CgInfoTbls.hs:
      no longer store absolute addresses in info tables, instead, we store offsets.
      Also, for vectored return points, emit the alternatives _after_ the vector table. This is to work around a limitation in Apple's as, which refuses to handle label differences where one label is at the end of a section. Emitting alternatives after vector info tables makes sure this never happens in GHC generated code. Case alternatives now require prototypes in hc code, though (see changes in PprC.hs, CLabel.hs).
      
      main/CmdLineOpts.lhs:
      Add a new option, -fPIC.
      
      main/DriverFlags.hs:
      Pass the correct options for PIC to gcc, depending on the platform. Only for powerpc for now.
      
      nativeGen/AsmCodeGen.hs:
      Many changes...
      Mac OS X-specific management of import stubs is no longer, it's now part of a general mechanism to handle such things for all platforms that need it (Darwin [both ppc and x86], Linux on ppc, and some platforms we don't support).
      Move cmmToCmm into its own monad which can accumulate a list of imported symbols. Make it call cmmMakeDynamicReference at the right places.
      
      nativeGen/MachCodeGen.hs:
      nativeGen/MachInstrs.hs:
      nativeGen/MachRegs.lhs:
      nativeGen/PprMach.hs:
      nativeGen/RegAllocInfo.hs:
      Too many changes to enumerate here, PowerPC specific.
      
      nativeGen/NCGMonad.hs:
      NatM still tracks imported symbols, as more labels can be created during code generation (float literals, jump tables; on some platforms all data access has to go through the dynamic linking mechanism).
      
      driver/mangler/ghc-asm.lprl:
      Mangle absolute addresses in info tables to offsets.
      Correctly pass through GCC-generated PIC for Mac OS X and powerpc linux.
      
      includes/Cmm.h:
      includes/InfoTables.h:
      includes/Storage.h:
      includes/mkDerivedConstants.c:
      rts/GC.c:
      rts/GCCompact.c:
      rts/HeapStackCheck.cmm:
      rts/Printer.c:
      rts/RetainerProfile.c:
      rts/Sanity.c:
      Adapt to the fact that info tables now contain offsets.
      
      rts/Linker.c:
      Mac-specific: change machoInitSymbolsWithoutUnderscore to support PIC.
      b4d045ae
  18. 10 Sep, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-09-10 14:53:44 by simonmar] · 6458c2c5
      simonmar authored
      Fix problem that shows up when building stage2 on Windows: slots of a
      vector table that can never happen are normally filled with the
      RtsShouldNeverHappen label, which currently prints as "0".  On systems
      with leading underscores on labels, such as Windows, this turns into
      "_0" which is reported as an undefined symbol.
      
      Having a label print as "0" is a real hack, so the solution is to do
      it properly.  This commit does just that.
      6458c2c5
  19. 13 Aug, 2004 2 commits