Commit dd3906bf authored by Sergei Trofimovich's avatar Sergei Trofimovich

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: default avatarSergei Trofimovich <slyfox@gentoo.org>
parent df2ea106
......@@ -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);
......
#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)
{
......
#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)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment