1. 19 Jun, 2020 1 commit
  2. 17 Jun, 2020 1 commit
    • Sylvain Henry's avatar
      ghc-bignum library · 9f96bc12
      Sylvain Henry authored
      ghc-bignum is a newer package that aims to replace the legacy
      integer-simple and integer-gmp packages.
      * it supports several backends. In particular GMP is still supported and
        most of the code from integer-gmp has been merged in the "gmp"
      * the pure Haskell "native" backend is new and is much faster than the
        previous pure Haskell implementation provided by integer-simple
      * new backends are easier to write because they only have to provide a
        few well defined functions. All the other code is common to all
        backends. In particular they all share the efficient small/big number
        distinction previously used only in integer-gmp.
      * backends can all be tested against the "native" backend with a simple
        Cabal flag. Backends are only allowed to differ in performance, their
        results should be the same.
      * Add `integer-gmp` compat package: provide some pattern synonyms and
        function aliases for those in `ghc-bignum`. It is intended to avoid
        breaking packages that depend o...
  3. 06 May, 2020 1 commit
  4. 21 Apr, 2020 1 commit
    • Sylvain Henry's avatar
      CmmToAsm DynFlags refactoring (#17957) · 747093b7
      Sylvain Henry authored
      * Remove `DynFlags` parameter from `isDynLinkName`: `isDynLinkName` used
        to test the global `ExternalDynamicRefs` flag. Now we test it outside of
      * Add new fields into `NCGConfig`: current unit id, sse/bmi versions,
        externalDynamicRefs, etc.
      * Replace many uses of `DynFlags` by `NCGConfig`
      * Moved `BMI/SSE` datatypes into `GHC.Platform`
  5. 01 Apr, 2020 1 commit
  6. 26 Mar, 2020 1 commit
    • Sylvain Henry's avatar
      DynFlags refactoring III · 0de03cd7
      Sylvain Henry authored
      Use Platform instead of DynFlags when possible:
      * `tARGET_MIN_INT` et al. replaced with `platformMinInt` et al.
      * no more DynFlags in PreRules: added a new `RuleOpts` datatype
      * don't use `wORD_SIZE` in the compiler
      * make `wordAlignment` use `Platform`
      * make `dOUBLE_SIZE` a constant
      Metric Decrease:
  7. 22 Oct, 2019 1 commit
    • Stefan Schulze Frielinghaus's avatar
      Implement s390x LLVM backend. · fd8b666a
      Stefan Schulze Frielinghaus authored
      This patch adds support for the s390x architecture for the LLVM code
      generator. The patch includes a register mapping of STG registers onto
      s390x machine registers which enables a registerised build.
  8. 05 Oct, 2019 1 commit
  9. 10 Aug, 2019 1 commit
    • Joachim Breitner's avatar
      Consolidate `TablesNextToCode` and `GhcUnreigsterised` in configure (#15548) · 81860281
      Joachim Breitner authored
      `TablesNextToCode` is now a substituted by configure, where it has the
      correct defaults and error handling. Nowhere else needs to duplicate
      that, though we may want the compiler to to guard against bogus settings
      I renamed it from `GhcEnableTablesNextToCode` to `TablesNextToCode` to:
       - Help me guard against any unfixed usages
       - Remove any lingering connotation that this flag needs to be combined
         with `GhcUnreigsterised`.
      Original reviewers:
      Original subscribers: TerrorJack, rwbarton, carter
      Original Differential Revision: https://phabricator.haskell.org/D5082
  10. 07 Aug, 2019 1 commit
  11. 14 Jul, 2019 1 commit
  12. 20 Jun, 2019 2 commits
  13. 29 May, 2019 1 commit
    • John Ericson's avatar
      Break up `Settings` into smaller structs · ace2e335
      John Ericson authored
      As far as I can tell, the fields within `Settings` aren't *intrinsicly*
      related. They just happen to be initialized the same way (in particular
      prior to the rest of `DynFlags`), and that is why they are grouped
      Within `Settings`, however, there are groups of settings that clearly do
      share something in common, regardless of how they anything is
      In the spirit of GHC being a library, where the end cosumer may choose
      to initialize this configuration in arbitrary ways, I made some new data
      types for thoses groups internal to `Settings`, and used them to define
      `Settings` instead. Hopefully this is a baby step towards a general
      decoupling of the stateful and stateless parts of GHC.
  14. 17 Mar, 2018 1 commit
    • Sergei Trofimovich's avatar
      aclocal.m4: add OSHurd (debian patch) · 0693b0b0
      Sergei Trofimovich authored
      ghc treats OSUnknown (and GNU/Hurd) as non-ELF target.
      This causes panic in native codegenerator when trying
      to build PIC code:
        -- all other platforms
        howToAccessLabel dflags _ _ _ _ _
              | not (positionIndependent dflags)
              = AccessDirectly
              | otherwise
              = panic "howToAccessLabel: PIC not defined for this platform"
      This change declares new 'OSHurd' and marks it as an
      ELF target. Fixes building ghc-stage2 on i686-unknown-gnu0.9.
      Patch provided by "Pino" via Samuel Thibault and taken from
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
  15. 19 Sep, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      compiler: introduce custom "GhcPrelude" Prelude · f63bc730
      Herbert Valerio Riedel authored
      This switches the compiler/ component to get compiled with
      -XNoImplicitPrelude and a `import GhcPrelude` is inserted in all
      This is motivated by the upcoming "Prelude" re-export of
      `Semigroup((<>))` which would cause lots of name clashes in every
      modulewhich imports also `Outputable`
      Reviewers: austin, goldfire, bgamari, alanz, simonmar
      Reviewed By: bgamari
      Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari
      Differential Revision: https://phabricator.haskell.org/D3989
  16. 08 Sep, 2017 1 commit
  17. 12 Apr, 2017 1 commit
    • Moritz Angermann's avatar
      Drop special handling of iOS · 68c00a1b
      Moritz Angermann authored
      iOS at least since iOS8 (we are currently at iOS10.3), allows for
      dynamic libaries, hence any artificail restriction on dyanmic
      libraries should be lifted.
      Please ping me with any iOS related issues that should potentially
      resurface.  The iOS toolchain has considerably changed over the
      years, and I'm willing to drop work arounds in good faith.
      Reviewers: bgamari, austin
      Reviewed By: bgamari
      Subscribers: rwbarton, thomie
      GHC Trac Issues: #13559, #7722
      Differential Revision: https://phabricator.haskell.org/D3451
  18. 10 Jan, 2017 1 commit
  19. 28 Mar, 2016 1 commit
    • Herbert Valerio Riedel's avatar
      Scrap DEC OSF/1 support · f911358b
      Herbert Valerio Riedel authored
      DEC OSF/1 (aka Tru64 UNIX) has been discontinued a few years ago already[1].
      This removes the undoubtedly bitrotten support for `OSOsf3 :: OS` from GHC's
      Support for `ArchAlpha :: Arch` may be removed at some later point, as there
      may still be users out there running a more or less recent Linux/alpha
      distribution on their more-than-a-decade old Alpha hardware...
       [1]: https://en.wikipedia.org/wiki/Tru64_UNIX
  20. 19 Dec, 2015 1 commit
  21. 19 Nov, 2015 1 commit
  22. 03 Jul, 2015 1 commit
    • Peter Trommler's avatar
      Implement PowerPC 64-bit native code backend for Linux · d3c1dda6
      Peter Trommler authored
      Extend the PowerPC 32-bit native code generator for "64-bit
      PowerPC ELF Application Binary Interface Supplement 1.9" by
      Ian Lance Taylor and "Power Architecture 64-Bit ELF V2 ABI Specification --
      OpenPOWER ABI for Linux Supplement" by IBM.
      The latter ABI is mainly used on POWER7/7+ and POWER8
      Linux systems running in little-endian mode. The code generator
      supports both static and dynamic linking. PowerPC 64-bit
      code for ELF ABI 1.9 and 2 is mostly position independent
      anyway, and thus so is all the code emitted by the code
      generator. In other words, -fPIC does not make a difference.
      rts/stg/SMP.h support is implemented.
      Following the spirit of the introductory comment in
      PPC/CodeGen.hs, the rest of the code is a straightforward
      extension of the 32-bit implementation.
      * Code is generated only in the medium code model, which
        is also gcc's default
      * Local symbols are not accessed directly, which seems to
        also be the case for 32-bit
      * LLVM does not work, but this does not work on 32-bit either
      * Must use the system runtime linker in GHCi, because the
        GHC linker for "static" object files (rts/Linker.c) for
        PPC 64-bit is not implemented. The system runtime
        (dynamic) linker works.
      * The handling of the system stack (register 1) is not ELF-
        compliant so stack traces break. Instead of allocating a new
        stack frame, spill code should use the "official" spill area
        in the current stack frame and deallocation code should restore
        the back chain
      * DWARF support is missing
      Fixes #9863
      Test Plan: validate (on powerpc, too)
      Reviewers: simonmar, trofi, erikd, austin
      Reviewed By: trofi
      Subscribers: bgamari, arnons1, kgardas, thomie
      Differential Revision: https://phabricator.haskell.org/D629
      GHC Trac Issues: #9863
  23. 28 Dec, 2014 1 commit
    • Erik de Castro Lopo's avatar
      LlvmCodeGen cross-compiling fixes (#9895) · 58ac9c8f
      Erik de Castro Lopo authored
      * Throw an error when cross-compiling without a target definition.
        When cross compiling via LLVM, a target 'datalayout' and 'triple' must
        be defined or LLVM will generate code for the compile host instead of
        the compile target.
      * Add aarch64-unknown-linux-gnu target.
        The datalayout and triple lines were found by using clang to compile a
        small C program and -emit-llvm to get the LLVM IR output.
      Signed-off-by: Erik de Castro Lopo's avatarErik de Castro Lopo <erikd@mega-nerd.com>
      Test Plan: validate
      Reviewers: rwbarton, carter, hvr, bgamari, austin
      Reviewed By: austin
      Subscribers: carter, thomie, garious
      Differential Revision: https://phabricator.haskell.org/D585
      GHC Trac Issues: #9895
  24. 19 Nov, 2014 1 commit
  25. 22 Apr, 2014 1 commit
  26. 28 Jan, 2014 1 commit
  27. 06 Sep, 2013 1 commit
    • thoughtpolice's avatar
      Add basic support for GHCJS · b372e8ea
      thoughtpolice authored
      This patch encompasses most of the basic infrastructure for GHCJS. It
        * A new extension, -XJavaScriptFFI
        * A new architecture, ArchJavaScript
        * Parser and lexer support for 'foreign import javascript', only
          available under -XJavaScriptFFI, using ArchJavaScript.
        * As a knock-on, there is also a new 'WayCustom' constructor in
          DynFlags, so clients of the GHC API can add custom 'tags' to their
          built files. This should be useful for other users as well.
      The remaining changes are really just the resulting fallout, making sure
      all the cases are handled appropriately for DynFlags and Platform.
      Authored-by: Luite Stegeman's avatarLuite Stegeman <stegeman@gmail.com>
      Signed-off-by: thoughtpolice's avatarAustin Seipp <aseipp@pobox.com>
  28. 27 Apr, 2013 1 commit
  29. 18 Mar, 2013 1 commit
  30. 02 Mar, 2013 1 commit
  31. 25 Jan, 2013 1 commit
  32. 23 Jan, 2013 1 commit
  33. 13 Nov, 2012 1 commit
    • ian@well-typed.com's avatar
      Tell the compiler about alpha, mipseb and mipsel again; fixes #7339 · 9756690f
      ian@well-typed.com authored
      This reverts the compiler parts of
          commit 7b594a5d
          Author: David Terei <davidterei@gmail.com>
          Date:   Mon Nov 21 12:05:18 2011 -0800
          Remove registerised code for dead architectures: mips, ia64, alpha,
          hppa1, m68k
      In particular, we want to know whether bewareLoadStoreAlignment should
      return True or False for them.
      It also reverts
          commit 3fc68b5c
          Author: Simon Marlow <marlowsd@gmail.com>
          Date:   Wed Jan 4 11:44:02 2012 +0000
          Remove missing archs (mipseb, mipsel, alpha) (#5734)
          It doesn't hurt to map these to ArchUnknown since we don't need to
          know anything specific about them, and adding them would be a pain
          (there are a bunch of places where we have to case-match on all the
          arches to avoid warnings).
  34. 10 Sep, 2012 1 commit
  35. 07 Aug, 2012 1 commit
  36. 24 Jul, 2012 1 commit
  37. 27 Apr, 2012 1 commit
    • kgardas's avatar
      add support for ARM hard-float ABI (fixes #5914) · 3144f856
      kgardas authored
      This patch enhances Platform's ArchARM to include ARM ABI value. It also
      tweaks configure machinery to detect hard-float ABI and to set it wherever
      needed. Finally when hard-float ABI is in use, pass appropriate compiler
      option to the LLVM's llc. Fixes #5914.
  38. 07 Mar, 2012 1 commit
  39. 11 Feb, 2012 1 commit