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
Unknown Object (File)
Tue, May 7, 8:07 PM
Unknown Object (File)
Wed, May 1, 11:59 PM
Unknown Object (File)
Wed, May 1, 11:16 PM
Unknown Object (File)
Wed, May 1, 10:58 PM
Unknown Object (File)
Wed, May 1, 10:57 PM
Unknown Object (File)
Wed, May 1, 10:35 PM
Unknown Object (File)
Sat, Apr 27, 11:08 PM
Unknown Object (File)
Sat, Apr 27, 7:46 AM
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19053
Build 18684: arc lint + arc unit

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.