Page MenuHomeFreeBSD

Refactor skein_block_asm.s to assemble with LLVM integrated assembler
AbandonedPublic

Authored by emaste on Jan 5 2019, 8:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 1:47 PM
Unknown Object (File)
Thu, Oct 9, 9:04 PM
Unknown Object (File)
Thu, Oct 2, 11:55 AM
Unknown Object (File)
Aug 14 2025, 4:11 AM
Unknown Object (File)
Aug 9 2025, 11:03 PM
Unknown Object (File)
Aug 8 2025, 12:31 AM
Unknown Object (File)
Jul 22 2025, 8:47 AM
Unknown Object (File)
Jun 17 2025, 8:51 PM

Details

Summary

The LLVM integrated assembler doesn't support the extensive macro system that GNU as does. To implement the code without the heavy macros I wrote a C program to use C's macros to unroll all the code and printf each instruction to create interim files that were combined to make skein_block_asm.S that LLVM would compile. As looping would require the assembler to have the macro support it lacks all the loop code was removed. As the SKEIN_DEBUG code wasn't in use by FreeBSD I also removed it.

Test Plan

Tested with libmd's make test target

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

lib/libmd/Makefile
120

Need to remove MK_BINUTILS_BOOTSTRAP test here and either move AFLAGS to ACFLAGS or drop if not needed any longer

Ugh. Did you just preprocess it with as to de-macro it? It'd be nice to not lose that abstraction. Does IAS not support any form of macros?

Here is the files I use to create skein_block_asm.S - https://github.com/gldisater/genskein

When I did the original work in Nov, I wasn't able to get even a simple macro to work with the rotation constants (RC_256_0_0, etc.) but I found the bug in the genskein.c that was causing that issue, as well as a bug in the SkeinMix macro.

This revision now requires changes to proceed.Jun 5 2020, 9:59 AM
This revision now requires review to proceed.Aug 26 2020, 10:22 AM

Thank you for working on this, although it was addressed by D25143 instead.