Page MenuHomeFreeBSD

Don't build skein_block_asm.s if we don't have an as binary
ClosedPublic

Authored by arichardson on Aug 22 2018, 2:24 PM.
Tags
None
Referenced Files
F82721364: D16844.id47098.diff
Wed, May 1, 11:59 PM
F82717597: D16844.id.diff
Wed, May 1, 11:16 PM
F82716149: D16844.id47110.diff
Wed, May 1, 10:58 PM
F82716097: D16844.id47199.diff
Wed, May 1, 10:57 PM
F82714227: D16844.diff
Wed, May 1, 10:35 PM
Unknown Object (File)
Sat, Apr 27, 11:08 PM
Unknown Object (File)
Sat, Apr 27, 7:46 AM
Unknown Object (File)
Mar 22 2024, 3:59 PM
Subscribers
None

Details

Summary

This fixes building libmd on MacOS/Linux. The real fix is probably to
build it as a .S file with $CC instead. It might also be better to just
compile the C file in userspace since the compiler can the use SSE/AVX.

Test Plan

buildworld succeeds without building GNU as.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Clang's IAS cannot assemble skein_block_asm.s (D8434) so trying to just use ${CC} instead won't work. LLVM PR 33405 is open to track this.

I think this change is reasonable, although I might suggest adding a comment with more detail, and maybe a .warning if the file exists but we don't have as (e.g. .warning as not available: not using optimized Skein asm

It might be worth spending the time to see how the performance differs. If it's not extreme, then just dropping skein_block_asm.s entirely would make sense given we're talking about an SHA3 candidate that didn't win.

That being said, I see no reason not to commit this version now.

This revision is now accepted and ready to land.Aug 22 2018, 3:55 PM

I wouldn't be surprised if the C version isn't in fact faster with a modern compiler that can use vectorization (SSE/AVX) in userland. The handwritten assembly only uses GPRs.

This revision now requires review to proceed.Aug 22 2018, 4:51 PM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 23 2018, 6:19 PM
This revision was automatically updated to reflect the committed changes.