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)
Dec 25 2023, 12:23 PM
Unknown Object (File)
Dec 20 2023, 2:55 AM
Unknown Object (File)
Dec 13 2023, 12:01 AM
Unknown Object (File)
Nov 13 2023, 7:29 AM
Unknown Object (File)
Nov 11 2023, 2:33 AM
Unknown Object (File)
Nov 8 2023, 8:36 PM
Unknown Object (File)
Oct 24 2023, 8:55 PM
Unknown Object (File)
Sep 6 2023, 10:00 AM

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.