Skip to content
  • Michal Terepeta's avatar
    Add Int8# and Word8# · 5d5307f9
    Michal Terepeta authored and Ben Gamari's avatar Ben Gamari committed
    This is the first step of implementing:
    https://github.com/ghc-proposals/ghc-proposals/pull/74
    
    
    
    The main highlights/changes:
    
    - `primops.txt.pp` gets two new sections for two new primitive types
      for signed and unsigned 8-bit integers (`Int8#` and `Word8`
      respectively) along with basic arithmetic and comparison
      operations. `PrimRep`/`RuntimeRep` get two new constructors for
      them. All of the primops translate into the existing `MachOP`s.
    
    - For `CmmCall`s the codegen will now zero-extend the values at call
      site (so that they can be moved to the right register) and then
      truncate them back their original width.
    
    - x86 native codegen needed some updates, since it wasn't able to deal
      with the new widths, but all the changes are quite localized. LLVM
      backend seems to just work.
    
    Bumps binary submodule.
    
    Signed-off-by: default avatarMichal Terepeta <michal.terepeta@gmail.com>
    
    Test Plan: ./validate with new tests
    
    Reviewers: hvr, goldfire, bgamari, simonmar
    
    Subscribers: Abhiroop, dfeuer, rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4475
    5d5307f9