1. 20 Jun, 2019 1 commit
    • John Ericson's avatar
      Move 'Platform' to ghc-boot · bff2f24b
      John Ericson authored
      ghc-pkg needs to be aware of platforms so it can figure out which
      subdire within the user package db to use. This is admittedly
      roundabout, but maybe Cabal could use the same notion of a platform as
      GHC to good affect too.
      bff2f24b
  2. 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
      modules.
      
      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
      f63bc730
  3. 19 Dec, 2015 1 commit
  4. 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.
      
      Limitations:
      * 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
      d3c1dda6
  5. 15 May, 2014 1 commit
    • Herbert Valerio Riedel's avatar
      Add LANGUAGE pragmas to compiler/ source files · 23892440
      Herbert Valerio Riedel authored
      In some cases, the layout of the LANGUAGE/OPTIONS_GHC lines has been
      reorganized, while following the convention, to
      
      - place `{-# LANGUAGE #-}` pragmas at the top of the source file, before
        any `{-# OPTIONS_GHC #-}`-lines.
      
      - Moreover, if the list of language extensions fit into a single
        `{-# LANGUAGE ... -#}`-line (shorter than 80 characters), keep it on one
        line. Otherwise split into `{-# LANGUAGE ... -#}`-lines for each
        individual language extension. In both cases, try to keep the
        enumeration alphabetically ordered.
        (The latter layout is preferable as it's more diff-friendly)
      
      While at it, this also replaces obsolete `{-# OPTIONS ... #-}` pragma
      occurences by `{-# OPTIONS_GHC ... #-}` pragmas.
      23892440
  6. 22 Apr, 2014 1 commit
  7. 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
      includes:
      
        * 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>
      b372e8ea
  8. 14 Nov, 2012 1 commit
  9. 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).
      9756690f
  10. 14 Sep, 2012 1 commit
  11. 10 Sep, 2012 1 commit
  12. 28 Aug, 2012 1 commit
    • ian@well-typed.com's avatar
      Move more code into codeGen/CodeGen/Platform.hs · c0907ed2
      ian@well-typed.com authored
      HaskellMachRegs.h is no longer included in anything under compiler/
      
      Also, includes/CodeGen.Platform.hs now includes "stg/MachRegs.h"
      rather than <stg/MachRegs.h> which means that we always get the file
      from the tree, rather than from the bootstrapping compiler.
      c0907ed2
  13. 21 Aug, 2012 2 commits
  14. 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.
      3144f856
  15. 22 Nov, 2011 1 commit
  16. 04 Nov, 2011 1 commit
  17. 23 Oct, 2011 1 commit
  18. 19 Oct, 2011 2 commits
  19. 18 Oct, 2011 1 commit
    • Ian Lynagh's avatar
      Remove ArchUnknown · 2dea11a4
      Ian Lynagh authored
      It doesn't make sense. If platformArch is ArchUnknown then we don't know
      the answer to any questions about the arch. So now if we don't recognise
      the arch we just fail, and the new arch will need to be added to the
      datatype.
      2dea11a4
  20. 21 Aug, 2011 1 commit
    • kgardas's avatar
      enhance ArchARM with ISA and ISA extensions · bab9a72d
      kgardas authored
      This patch enhances ArchARM with ARM ISA and ISA extensions details
      as is suggested in the comment in Platform.hs file. The patch is needed
      by future patch which will use ARM ISA information in order to pass
      appropriate command-line option to the LLVM llc tool.
      bab9a72d
  21. 15 Jul, 2011 1 commit
  22. 27 Jun, 2011 1 commit
  23. 31 May, 2011 1 commit
  24. 15 Feb, 2009 1 commit
    • Ben.Lippmeier@anu.edu.au's avatar
      NCG: Split up the native code generator into arch specific modules · b04a210e
      Ben.Lippmeier@anu.edu.au authored
        - nativeGen/Instruction defines a type class for a generic
          instruction set. Each of the instruction sets we have, 
          X86, PPC and SPARC are instances of it.
        
        - The register alloctors use this type class when they need
          info about a certain register or instruction, such as
          regUsage, mkSpillInstr, mkJumpInstr, patchRegs..
        
        - nativeGen/Platform defines some data types enumerating
          the architectures and operating systems supported by the 
          native code generator.
        
        - DynFlags now keeps track of the current build platform, and 
          the PositionIndependentCode module uses this to decide what
          to do instead of relying of #ifdefs.
        
        - It's not totally retargetable yet. Some info info about the
          build target is still hardwired, but I've tried to contain
          most of it to a single module, TargetRegs.
        
        - Moved the SPILL and RELOAD instructions into LiveInstr.
        
        - Reg and RegClass now have their own modules, and are shared
          across all architectures.
      b04a210e
  25. 02 Feb, 2009 1 commit