[commit: ghc] master: UNREG: fix implicit declarations from pdep and pext (dd3906b)

git at git.haskell.org git at git.haskell.org
Fri Mar 9 17:57:31 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/dd3906bf5debdb74bb8e356cede7f6ac6d770007/ghc

>---------------------------------------------------------------

commit dd3906bf5debdb74bb8e356cede7f6ac6d770007
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Fri Mar 9 17:43:01 2018 +0000

    UNREG: fix implicit declarations from pdep and pext
    
    Unreg build failed as:
    
      $ ./configure --enable-unregisterised
      $ make
    
      HC [stage 1] libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o
        ghc_1.hc: In function 'ghczmprim_GHCziPrimopWrappers_pdep8zh_entry':
    
        ghc_1.hc:1810:9: error:
         error: implicit declaration of function 'hs_pdep8'; did you mean 'hs_ctz8'?
           [-Werror=implicit-function-declaration]
         _c3jz = hs_pdep8(*Sp, Sp[1]);
                 ^~~~~~~~
                 hs_ctz8
           |
      1810 | _c3jz = hs_pdep8(*Sp, Sp[1]);
           |         ^
    
    Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>


>---------------------------------------------------------------

dd3906bf5debdb74bb8e356cede7f6ac6d770007
 includes/stg/Prim.h             | 12 ++++++++++++
 libraries/ghc-prim/cbits/pdep.c |  5 -----
 libraries/ghc-prim/cbits/pext.c |  5 -----
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/includes/stg/Prim.h b/includes/stg/Prim.h
index fa3a3ec..a18e02c 100644
--- a/includes/stg/Prim.h
+++ b/includes/stg/Prim.h
@@ -58,6 +58,18 @@ StgWord64 hs_bswap64(StgWord64 x);
 
 /* TODO: longlong.c */
 
+/* libraries/ghc-prim/cbits/pdep.c */
+StgWord64 hs_pdep64(StgWord64 src, StgWord64 mask);
+StgWord hs_pdep32(StgWord src, StgWord mask);
+StgWord hs_pdep16(StgWord src, StgWord mask);
+StgWord hs_pdep8(StgWord src, StgWord mask);
+
+/* libraries/ghc-prim/cbits/pext.c */
+StgWord64 hs_pext64(StgWord64 src, StgWord64 mask);
+StgWord hs_pext32(StgWord src, StgWord mask);
+StgWord hs_pext16(StgWord src, StgWord mask);
+StgWord hs_pext8(StgWord src, StgWord mask);
+
 /* libraries/ghc-prim/cbits/popcnt.c */
 StgWord hs_popcnt8(StgWord x);
 StgWord hs_popcnt16(StgWord x);
diff --git a/libraries/ghc-prim/cbits/pdep.c b/libraries/ghc-prim/cbits/pdep.c
index 8435ffe..58e8611 100644
--- a/libraries/ghc-prim/cbits/pdep.c
+++ b/libraries/ghc-prim/cbits/pdep.c
@@ -1,8 +1,6 @@
 #include "Rts.h"
 #include "MachDeps.h"
 
-extern StgWord64 hs_pdep64(StgWord64 src, StgWord64 mask);
-
 StgWord64
 hs_pdep64(StgWord64 src, StgWord64 mask)
 {
@@ -26,21 +24,18 @@ hs_pdep64(StgWord64 src, StgWord64 mask)
   return result;
 }
 
-extern StgWord hs_pdep32(StgWord src, StgWord mask);
 StgWord
 hs_pdep32(StgWord src, StgWord mask)
 {
   return hs_pdep64(src, mask);
 }
 
-extern StgWord hs_pdep16(StgWord src, StgWord mask);
 StgWord
 hs_pdep16(StgWord src, StgWord mask)
 {
   return hs_pdep64(src, mask);
 }
 
-extern StgWord hs_pdep8(StgWord src, StgWord mask);
 StgWord
 hs_pdep8(StgWord src, StgWord mask)
 {
diff --git a/libraries/ghc-prim/cbits/pext.c b/libraries/ghc-prim/cbits/pext.c
index fe960b1..9cddede 100644
--- a/libraries/ghc-prim/cbits/pext.c
+++ b/libraries/ghc-prim/cbits/pext.c
@@ -1,8 +1,6 @@
 #include "Rts.h"
 #include "MachDeps.h"
 
-extern StgWord64 hs_pext64(StgWord64 src, StgWord64 mask);
-
 StgWord64
 hs_pext64(StgWord64 src, StgWord64 mask)
 {
@@ -22,21 +20,18 @@ hs_pext64(StgWord64 src, StgWord64 mask)
   return result;
 }
 
-extern StgWord hs_pext32(StgWord src, StgWord mask);
 StgWord
 hs_pext32(StgWord src, StgWord mask)
 {
   return hs_pext64(src, mask);
 }
 
-extern StgWord hs_pext16(StgWord src, StgWord mask);
 StgWord
 hs_pext16(StgWord src, StgWord mask)
 {
   return hs_pext64(src, mask);
 }
 
-extern StgWord hs_pext8(StgWord src, StgWord mask);
 StgWord
 hs_pext8(StgWord src, StgWord mask)
 {



More information about the ghc-commits mailing list