1. 27 Feb, 2006 1 commit
  2. 17 Jan, 2006 1 commit
  3. 09 Jan, 2006 1 commit
  4. 18 Nov, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-11-18 14:01:33 by simonmar] · 9342a543
      simonmar authored
      Discard various ways in which gcc zeroes stack slots in the prologue.
      So far in my investigations these have always been unnecessary, they
      appear to be the result of missed optimisations by gcc, so cross
      fingers and discard them.  New variants have just shown up because I
      started compiling the RTS with -optc-O2.
      9342a543
  5. 31 Oct, 2005 2 commits
  6. 16 Sep, 2005 1 commit
  7. 13 Jun, 2005 2 commits
    • wolfgang's avatar
      [project @ 2005-06-13 02:03:42 by wolfgang] · 4302b12e
      wolfgang authored
      Darwin/x86:
      Instead of aligning all literals at 16 bytes, reuse the hack from x86-64.
      4302b12e
    • wolfgang's avatar
      [project @ 2005-06-13 00:15:58 by wolfgang] · 59177a1b
      wolfgang authored
      Darwin/x86:
      Fix two causes for crashes:
      *) align literals to 16 bytes, because Apple's GCC likes to use
         SSE instructions which require this alignment.
      *) In print_doctored, recognize global jumps that masquerade as
         local jumps by going via Lfoo$stub or Lfoo$non_lazy_ptr.
      59177a1b
  8. 09 Jun, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-06-09 05:55:40 by wolfgang] · af0c406d
      wolfgang authored
      Registerised support for Darwin/x86, both NCG and mangled.
      
      *) -fPIC doesn't work yet with -fvia-C.
      *) Apple officially requires the stack to be 16-byte-aligned,
         GHC ignores this for now.
      af0c406d
  9. 03 Jun, 2005 2 commits
  10. 10 May, 2005 1 commit
  11. 30 Apr, 2005 1 commit
  12. 29 Apr, 2005 1 commit
  13. 08 Mar, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-03-08 13:32:06 by simonmar] · bc2d66a0
      simonmar authored
      HACK HACK HACK on x86_64
      
      we need 16-byte aligned constants on this platform sometimes.  Don't
      just 16-byte align everything, but try to detect 16-byte constants and
      align just those.
      
      All the codegen tests now go through on registerised x86_64, I'm
      building a stage2 GHC now.
      bc2d66a0
    • simonmar's avatar
      [project @ 2005-03-08 11:04:11 by simonmar] · b9dce85f
      simonmar authored
      x86_64: the assembler doesn't like generating 8-byte relative
      relocations between text and rodata symbols.  Hack around this by
      putting SRTs in the text segment for now.
      b9dce85f
  14. 03 Mar, 2005 1 commit
  15. 10 Feb, 2005 3 commits
  16. 09 Feb, 2005 1 commit
  17. 01 Feb, 2005 1 commit
  18. 23 Jan, 2005 2 commits
    • wolfgang's avatar
      [project @ 2005-01-23 20:34:17 by wolfgang] · 1856c4c7
      wolfgang authored
      Distinguish between rodata and relrodata (relocatable read-only data) in the
      mangler.
      By default, use $T_HDR_rodata if $T_HDR_relrodata is not defined for a
      particular platform.
      1856c4c7
    • wolfgang's avatar
      [project @ 2005-01-23 06:10:15 by wolfgang] · 6f985ae8
      wolfgang authored
      Add support for the dead code stripping feature of recent Apple linkers.
      If your code is compiled using the NCG, you can now specify
      -optl-W,-dead_strip on the GHC command line when linking.
      It will have basically the same effect as using split-objs to build the
      libraries.
      
      Advantages over split-objs:
          * No evil perl script involved
          * Requires no special handling when building libraries
      
      Disadvantages:
          * The current version of Apple's linker is slow when given the
            -dead_strip flag. _REALLY_ slow.
          * Mac OS X only.
      
      This works by making the NCG emit the .subsections_via_symbols directive.
      Additionally, we have to add an extra label at the top of every info table,
      and make sure that the entry code references it (otherwise the info table
      will be considered part of the preceding entry code).
      The mangler just removes the .subsections_via_symbols directive.
      6f985ae8
  19. 17 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-17 16:46:58 by simonmar] · 84783be6
      simonmar authored
      sparc-.*linux: slight modification to rev. 1.107, the whitespace
      before .section should be \s+, not \t.  Fixes problems with even more
      recent gcc versions on sparc64.
      84783be6
  20. 12 Jan, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-01-12 05:53:07 by wolfgang] · b9472fcf
      wolfgang authored
      Move _srtd and _closure_tbl to read-only data instead of text
      (these things contain pointers to other symbols, so they can't go into
      .text for position-independent code).
      b9472fcf
  21. 09 Jan, 2005 1 commit
    • desrt's avatar
      [project @ 2005-01-09 00:29:05 by desrt] · d27af865
      desrt authored
      Modified the mangler for powerpc64.  This is the last missing piece for supporting
      registerised builds on PPC64.
      
      The current state of the mangler is temporary.  We're discussing a better way to take
      advantage of the PPC64 ABI's unique features to provide a better way of storing info
      tables.
      
      I don't think I've changed anything that affects other platforms.
      d27af865
  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. 24 Sep, 2004 1 commit
    • wolfgang's avatar
      [project @ 2004-09-24 16:29:33 by wolfgang] · d190e1a1
      wolfgang authored
      PowerPC/Mac OS X:
      Improve epilogue mangling.
      This became necesssary because the new CG may "fall through" for cases in
      a switch that are known to never happen, so GCC generates the epilogue code
      again. With the previous CG, GCC never generated any epilog code, because
      every function ended with an unconditional tail jump.
      d190e1a1
  24. 16 Sep, 2004 1 commit
    • stolz's avatar
      [project @ 2004-09-16 08:13:02 by stolz] · bb787c29
      stolz authored
      Collect unknown chunks in new chkcat 'unknown' which gets treated like
      'misc', but isn't mangled on sparc-*-solaris2 because of function
      definitions in C-headers like <pwd.h>. This shouldn't affect any
      other platform since this was already a border-case.
      
      Closes SF Bug 1012521 "getUserEntryForID dies".
      Please merge.
      bb787c29
  25. 13 Sep, 2004 1 commit
  26. 02 Sep, 2004 1 commit
  27. 20 Aug, 2004 1 commit
  28. 13 Aug, 2004 1 commit
  29. 21 May, 2004 1 commit
  30. 18 Apr, 2004 1 commit
  31. 16 Apr, 2004 1 commit
    • igloo's avatar
      [project @ 2004-04-16 02:02:44 by igloo] · 490fd965
      igloo authored
      Change the mangler to allow a tab before .section on sparc. Fixes a
      problem which shows up as symbols not being made global so not being
      defined when compiling with gcc >= 3.something.
      490fd965
  32. 10 Dec, 2003 1 commit
    • wolfgang's avatar
      [project @ 2003-12-10 11:35:24 by wolfgang] · 60ea58ab
      wolfgang authored
      PowerPC Linux support for registerised compilation and native code
      generation. (object splitting and GHCi are still unsupported).
      
      Code for other platforms is not affected, so MERGE TO STABLE.
      60ea58ab
  33. 28 Sep, 2003 1 commit