Skip to content
Snippets Groups Projects
Commit 2c959a18 authored by Michal Terepeta's avatar Michal Terepeta Committed by Ben Gamari
Browse files

Add Int8# and Word8#

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 MachOPs.

    For CmmCalls 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.

This is the second attempt at merging this, after the first attempt in
D4475 had to be backed out due to regressions on i386.

Bumps binary submodule.

Signed-off-by: default avatarMichal Terepeta <michal.terepeta@gmail.com>

Test Plan: ./validate (on both x86-{32,64})

Reviewers: bgamari, hvr, goldfire, simonmar

Subscribers: rwbarton, carter

Differential Revision: https://phabricator.haskell.org/D5258
parent 6bb8aaa3
No related branches found
No related tags found
No related merge requests found
Showing
with 571 additions and 181 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment