1. 22 Feb, 2006 1 commit
    • Simon Marlow's avatar
      floating-point fix for x86_64 · 3034a6c8
      Simon Marlow authored
        
      For 32-bit float primtives like sinFloat#, we currently call the
      double versions of the C library functions (sin(), cos() etc.).  It
      seems more correct to call the float versions (sinf(), cosf() etc.).
      This makes a difference on x86_64, I'm not entirely sure why, but this
      way at least generates more consistent results and avoids extra
      promotion/demotion instructions when calling these primitives.
      3034a6c8
  2. 09 Feb, 2006 1 commit
  3. 24 Sep, 2005 1 commit
  4. 18 Sep, 2005 2 commits
  5. 11 Sep, 2005 1 commit
  6. 21 Jul, 2005 1 commit
  7. 21 May, 2005 1 commit
    • panne's avatar
      [project @ 2005-05-21 15:39:00 by panne] · faa8d785
      panne authored
      Warning police: Removed overlapped patterns. In general, taking
      compiler warnings about unmatched patterns seriously when they come up
      later might be better than writing catch-all patterns right from the
      start. Otherwise readers are confused and wonder which patterns might
      be missing when there are none.
      faa8d785
  8. 19 May, 2005 1 commit
    • simonpj's avatar
      [project @ 2005-05-19 07:58:35 by simonpj] · f7ccc078
      simonpj authored
      Catch an exception in Template Haskell code
      
      		Merge to STABLE
      
      If the code run by a Template Haskell splice fails with, say,
      a pattern-match failure, we should not report it as a GHC panic.
      It's a bug in the user's program.
      
      This commit fixes up the exception handling to do the right thing.
      
      Fixes SourceForge item #1201666
      
      TH_fail tests it.
      f7ccc078
  9. 15 May, 2005 1 commit
  10. 27 Apr, 2005 1 commit
  11. 13 Apr, 2005 1 commit
  12. 11 Apr, 2005 2 commits
  13. 08 Apr, 2005 2 commits
  14. 05 Apr, 2005 3 commits
  15. 04 Apr, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-04-04 15:54:18 by simonmar] · 61988d63
      simonmar authored
      Use the imul instruction natively, rather than the braindead wrapper
      around it.  The register allocator has been able to handle the fixed
      register usage of imul for a while now.  Also, the wrapper was broken
      on x86_64.
      61988d63
  16. 03 Apr, 2005 2 commits
  17. 01 Apr, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-04-01 12:14:29 by simonmar] · 6c554010
      simonmar authored
      First cut at the x86_64 native code generator.  Lots of code is shared
      with i386, but floating point uses SSE2.
      
      This more or less works, the things I know that don't work are:
      
        - the floating-point primitives (sin, cos etc.) are missing
        - floating-point comparisons involving NaN are wrong
        - there's no PIC support yet
      
      Also, I have a long list of small things to fix up to improve
      performance.
      
      I think the small memory model is assumed, for now.
      6c554010
  18. 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
  19. 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
  20. 23 Jan, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-01-23 18:50:40 by wolfgang] · e171a977
      wolfgang authored
      Make the NCG distinguish between the read-only data section and the
      "relocatable read-only data" section.
      Read-only data is supposed to be _really_ read-only, whereas "relrodata"
      can have relocations, but should not be modified by the program at runtime.
      
      For Linux, put relrodata into ".data" by default, as the dynamic linker
      tends to do evil things to avoid relocating things in read-only sections.
      e171a977
  21. 12 Jan, 2005 1 commit
  22. 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
  23. 13 Aug, 2004 1 commit