<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libmd, branch release/13.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F13.1.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F13.1.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-12-29T10:06:00Z</updated>
<entry>
<title>Add accelerated arm64 sha512 to libmd</title>
<updated>2021-12-29T10:06:00Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2021-11-19T11:32:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4741f854ce123b9549ad425d85668451d6735584'/>
<id>urn:sha1:4741f854ce123b9549ad425d85668451d6735584</id>
<content type='text'>
As with sha256 add support for accelerated sha512 support to libmd on
arm64. This depends on clang 13+ to build as this is the first release
with the needed intrinsics. Gcc should also support them, however from
a currently unknown release.

Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33373

(cherry picked from commit 71bf1c4cc5b21e7e5740514c1bc6ad751f312eea)
</content>
</entry>
<entry>
<title>Use arm64 sha256 intrinsics in libmd</title>
<updated>2021-12-20T11:09:26Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2021-07-23T09:14:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=757a39b1b27c63eb3fda31418927aea52d854b72'/>
<id>urn:sha1:757a39b1b27c63eb3fda31418927aea52d854b72</id>
<content type='text'>
Summary:
When running on a CPU that supports the arm64 sha256 intrinsics use them
to improve perfromance of sha256 calculations.

With this changethe following improvement has been seen on an Apple M1
with FreeBS running under Parallels, with similar results on a
Neoverse-N1 r3p1.

x sha256.orig
+ sha256.arm64
+--------------------------------------------------------------------+
|++                                                               x x|
|+++                                                              xxx|
||A                                                               |A||
+--------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5          3.41           3.5          3.46         3.458   0.042661458
+   5          0.47          0.54           0.5         0.504   0.027018512
Difference at 95.0% confidence
        -2.954 +/- 0.0520768
        -85.4251% +/- 0.826831%
        (Student's t, pooled s = 0.0357071)

Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31284

(cherry picked from commit 69d8dc20be6ca10cf87c98223121c4121aff42cc)
</content>
</entry>
<entry>
<title>Fix a few mandoc issues</title>
<updated>2020-10-09T19:12:44Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2020-10-09T19:12:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3d265fce43746c293ae826e9603adbfe09f93cf6'/>
<id>urn:sha1:3d265fce43746c293ae826e9603adbfe09f93cf6</id>
<content type='text'>
- skipping paragraph macro: Pp after Sh
- sections out of conventional order: Sh EXAMPLES
- whitespace at end of input line
- normalizing date format
</content>
</entry>
<entry>
<title>libmd: add dependency workaround for r366344</title>
<updated>2020-10-02T14:00:52Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-10-02T14:00:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=da6e5efe925e4d167d788b98bf5c72326f953801'/>
<id>urn:sha1:da6e5efe925e4d167d788b98bf5c72326f953801</id>
<content type='text'>
r366344 fixed and reenabled the assembly optimized skein implementation,
but skein_block objects were not being rebuilt in no-clean builds. This
resulted in failing no-clean builds. SKEIN_USE_ASM controls which
routines come from C vs assembly, and with no explicit dependency
r366344's change to SKEIN_USE_ASM did not cause skein_block.{o,pico}
to be rebuilt.

Add a dependency on this Makefile for the skein_block objects. This
dependency is broader in scope than absolutely required (that is, the
skein_block objects will now be rebuilt on any change to this Makefile).
There are ways this could be addressed, but it is probably not worth the
additional effort or testing time to pursue them.

PR:		248221
Reported by:	kevans, Jeremy Faulkner
Discussed with:	kevans
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>libmd: fix assembly optimized skein implementation</title>
<updated>2020-10-01T21:05:50Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-10-01T21:05:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=36972ee3e0fe8474e85646d0a2f1de9247a1e66a'/>
<id>urn:sha1:36972ee3e0fe8474e85646d0a2f1de9247a1e66a</id>
<content type='text'>
The assembly implementation incorrectly used logical AND instead of
bitwise AND. Fix, and re-enable in libmd.

Submitted by:	Yang Zhong &lt;yzhong@freebsdfoundation.org&gt;
Reviewed by:	cem (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D26614
</content>
</entry>
<entry>
<title>libmd: temporarily disable optimized assembly skein1024 implementation</title>
<updated>2020-07-23T18:55:47Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-07-23T18:55:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0d2c19d05b7c6a96a04b465d759bc0ab49afb7b1'/>
<id>urn:sha1:0d2c19d05b7c6a96a04b465d759bc0ab49afb7b1</id>
<content type='text'>
It is apparently broken when assembled by contemporary GNU as as well as
Clang IAS (which is used in the default configuration).

PR:		248221
Reported by:	pizzamig
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Remove warning that is no longer accurate after r361853</title>
<updated>2020-07-15T17:24:34Z</updated>
<author>
<name>Alex Richardson</name>
<email>arichardson@FreeBSD.org</email>
</author>
<published>2020-07-15T17:24:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7425ce4b54844c63e8481a64bb92dba585f8c48e'/>
<id>urn:sha1:7425ce4b54844c63e8481a64bb92dba585f8c48e</id>
<content type='text'>
We now build the skein assembly with clangs integrated assembler.

Reviewed By:	emaste
Differential Revision: https://reviews.freebsd.org/D25664
</content>
</entry>
<entry>
<title>Rename skein_block_asm.s to .S and assemble using Clang IAS</title>
<updated>2020-06-06T00:35:41Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-06-06T00:35:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=24ed6f550a26e4872f70064975e1fa72467fc4d6'/>
<id>urn:sha1:24ed6f550a26e4872f70064975e1fa72467fc4d6</id>
<content type='text'>
Comparing the object files produced by GNU as 2.17.50 and Clang IAS
shows many immaterial changes in strtab etc., and one material change
in .text:

   1bac:  4c 8b 4f 18             mov    0x18(%rdi),%r9
   1bb0:  eb 0e                   jmp    1bc0 &lt;Skein1024_block_loop&gt;
-  1bb2:  66 66 2e 0f 1f 84 00    data16 nopw %cs:0x0(%rax,%rax,1)
-  1bb9:  00 00 00 00
-  1bbd:  0f 1f 00                nopl   (%rax)
+  1bb2:  66 2e 0f 1f 84 00 00    nopw   %cs:0x0(%rax,%rax,1)
+  1bb9:  00 00 00
+  1bbc:  0f 1f 40 00             nopl   0x0(%rax)

 0000000000001bc0 &lt;Skein1024_block_loop&gt;:
 Skein1024_block_loop():
   1bc0:  4c 8b 47 10             mov    0x10(%rdi),%r8
   1bc4:  4c 03 85 c0 00 00 00    add    0xc0(%rbp),%r8

That is, GNU as and Clang's integrated assembler use different multi-
byte NOPs for alignment (GNU as emits an 11 byte NOP + a 3 byte NOP,
while Clang IAS emits a 10 byte NOP + a 4 byte NOP).

Dependency cleanup hacks are not required, because we do not create
.depend files from GNU as.

Reviewed by:	allanjude, arichardson, cem, tsoome
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8434
</content>
</entry>
<entry>
<title>Also pass SKEIN_USE_ASM to the assembler, via AFLAGS</title>
<updated>2020-06-05T18:56:43Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-06-05T18:56:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f2b86886645fc3fa331543565268808b80d5abdb'/>
<id>urn:sha1:f2b86886645fc3fa331543565268808b80d5abdb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Apply C SKEIN_LOOP setting only to skein_block.c</title>
<updated>2020-06-05T17:00:38Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-06-05T17:00:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=310e81aede569411ad005f6d6e7259ae0cdafd82'/>
<id>urn:sha1:310e81aede569411ad005f6d6e7259ae0cdafd82</id>
<content type='text'>
Otherwise if assembling skein_block_asm.s with Clang's integrated assembler
we can pass conflicting SKEIN_LOOP settings (via CFLAGS and ACFLAGS).
</content>
</entry>
</feed>
