Hello list, my 1st post.

I've had a hard time building Nettle using MSVC/clang-cl
on Win-10. My aim is simply to use it for GnuTLS.

Running 'nettle-benchmark.exe' gave me a crash in some
.asm-code I failed to understand. It's signature is:
 _nettle_sha256_compress_n (uint32_t *state, const uint32_t *k,
                            size_t blocks, const uint8_t *input);

But I noted it's .asm-code says 'W64_ENTRY(3, 0)'
Why not 'W64_ENTRY(4, 0)' when there are 4 arguments?

I admin 'm4' is alien to me, but changing it into:

--- a/x86_64/sha256-compress-n.asm 2023-02-13 07:38:45
+++ b/x86_64/sha256-compress-n.asm 2023-02-14 14:04:26
@@ -134,7 +134,7 @@
        ALIGN(16)

 PROLOGUE(_nettle_sha256_compress_n)
-       W64_ENTRY(3, 0)
+       W64_ENTRY(4, 0)
        test    BLOCKS, BLOCKS
        jz      .Lend

@@ -228,6 +228,6 @@
        add     $120, %rsp
 .Lend:
        mov     INPUT, %rax
-       W64_EXIT(3, 0)
+       W64_EXIT(4, 0)
        ret
 EPILOGUE(_nettle_sha256_compress_n)

-------

fixed the crash.

But in other places I see 'W64_ENTRY(x..)' is
used for functions with 'y' arguments (y != x).
Somebody please explain this.

PS. I used a home-brewed GNU-makefile modelled
    after a Cygwin build. Plus I used only Mini-GMP,
    but .asm + AES asm-code.

--
--gv
_______________________________________________
nettle-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to