[Git][ghc/ghc][master] Remove CPP ensuring word size is 32 or 64 bits around Addr# <-> int# primops

Marge Bot gitlab at gitlab.haskell.org
Sun Jun 9 22:48:05 UTC 2019



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
5023adce by John Ericson at 2019-06-09T22:47:59Z
Remove CPP ensuring word size is 32 or 64 bits around Addr# <-> int# primops

It shouldn't be needed these days, and those primops are "highly
deprecated" anyways.

This fits with my plans because it removes one bit of target-dependence
of the builtin primops, and this is the hardest part of GHC to make
multi-target.

CC @carter

- - - - -


1 changed file:

- compiler/prelude/primops.txt.pp


Changes:

=====================================
compiler/prelude/primops.txt.pp
=====================================
@@ -2175,7 +2175,6 @@ primop   AddrSubOp "minusAddr#" GenPrimOp Addr# -> Addr# -> Int#
 primop   AddrRemOp "remAddr#" GenPrimOp Addr# -> Int# -> Int#
          {Return the remainder when the {\tt Addr\#} arg, treated like an {\tt Int\#},
           is divided by the {\tt Int\#} arg.}
-#if (WORD_SIZE_IN_BITS == 32 || WORD_SIZE_IN_BITS == 64)
 primop   Addr2IntOp  "addr2Int#"     GenPrimOp   Addr# -> Int#
         {Coerce directly from address to int.}
    with code_size = 0
@@ -2184,7 +2183,6 @@ primop   Int2AddrOp   "int2Addr#"    GenPrimOp  Int# -> Addr#
         {Coerce directly from int to address.}
    with code_size = 0
         deprecated_msg = { This operation is strongly deprecated. }
-#endif
 
 primop   AddrGtOp  "gtAddr#"   Compare   Addr# -> Addr# -> Int#
 primop   AddrGeOp  "geAddr#"   Compare   Addr# -> Addr# -> Int#



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/5023adceeb59e9a2b57cda2e69cd2a6152a13ead

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/5023adceeb59e9a2b57cda2e69cd2a6152a13ead
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190609/4934b0b4/attachment-0001.html>


More information about the ghc-commits mailing list