<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/amd64/string/memcmp.S, branch releng/13.1</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>amd64: bring back asm bcmp, shared with memcmp</title>
<updated>2022-03-29T12:40:32+00:00</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2022-03-25T15:04:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1544cd332b9635a4a3c1821d895c3ad40bc630f9'/>
<id>1544cd332b9635a4a3c1821d895c3ad40bc630f9</id>
<content type='text'>
Turns out clang converts "memcmp(foo, bar, len) == 0" and similar to
bcmp calls.

Reviewed by:	emaste (previous version), jhb (previous version)
Differential Revision:	https://reviews.freebsd.org/D34673
Approved by:	re (gjb)

(cherry picked from commit fbc002cb72d2d9bb435cce99630d5d7da9f59390)
(cherry picked from commit c5890784f6d315c501586b39cf8c0c80b609be5b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns out clang converts "memcmp(foo, bar, len) == 0" and similar to
bcmp calls.

Reviewed by:	emaste (previous version), jhb (previous version)
Differential Revision:	https://reviews.freebsd.org/D34673
Approved by:	re (gjb)

(cherry picked from commit fbc002cb72d2d9bb435cce99630d5d7da9f59390)
(cherry picked from commit c5890784f6d315c501586b39cf8c0c80b609be5b)
</pre>
</div>
</content>
</entry>
<entry>
<title>amd64: move memcmp checks upfront</title>
<updated>2021-02-04T17:59:10+00:00</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2021-01-31T15:46:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=88a580ebeea10e7bf9eb823dbbf48349eb8da540'/>
<id>88a580ebeea10e7bf9eb823dbbf48349eb8da540</id>
<content type='text'>
This is a tradeoff which saves jumps for smaller sizes while making
the 8-16 range slower (roughly in line with the other cases).

Tested with glibc test suite.

For example size 3 (most common with vfs namecache) (ops/s):
before:	407086026
after:	461391995

The regressed range of 8-16 (with 8 as example):
before:	540850489
after:	461671032

(cherry picked from commit f1be262ec11c1c35e6485f432415b5b52adb505d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a tradeoff which saves jumps for smaller sizes while making
the 8-16 range slower (roughly in line with the other cases).

Tested with glibc test suite.

For example size 3 (most common with vfs namecache) (ops/s):
before:	407086026
after:	461391995

The regressed range of 8-16 (with 8 as example):
before:	540850489
after:	461671032

(cherry picked from commit f1be262ec11c1c35e6485f432415b5b52adb505d)
</pre>
</div>
</content>
</entry>
<entry>
<title>amd64: add a note about simd to libc memset, memmove and memcmp</title>
<updated>2021-02-04T17:59:05+00:00</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2021-01-31T15:50:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=068f2402d28bf2ddee884c83be1dff3a7631569b'/>
<id>068f2402d28bf2ddee884c83be1dff3a7631569b</id>
<content type='text'>
(cherry picked from commit 0db6aef407f30c138982b8cde43189aad098b337)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 0db6aef407f30c138982b8cde43189aad098b337)
</pre>
</div>
</content>
</entry>
<entry>
<title>amd64: sync up libc memcmp with the kernel version (r357309)</title>
<updated>2020-01-30T19:57:05+00:00</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2020-01-30T19:57:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8291e8874845b258acc349e9ac9c37d0b14046d3'/>
<id>8291e8874845b258acc349e9ac9c37d0b14046d3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>amd64: sync up libc memcmp with the kernel version (r357208)</title>
<updated>2020-01-29T01:57:07+00:00</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2020-01-29T01:57:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4846152a081cb3f0643287dab84c5e2778d9b54e'/>
<id>4846152a081cb3f0643287dab84c5e2778d9b54e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>amd64: reimplement libc memcmp and bcmp with kernel memcmp</title>
<updated>2018-09-27T17:08:29+00:00</updated>
<author>
<name>Mateusz Guzik</name>
<email>mjg@FreeBSD.org</email>
</author>
<published>2018-09-27T17:08:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5bbde333cdbd9054fd9b4257a2a3e51d4a819ab4'/>
<id>5bbde333cdbd9054fd9b4257a2a3e51d4a819ab4</id>
<content type='text'>
Both are significantly slower than hand-coded loops. See r338963 for
kernel commit.

bcmp differs from memcmp by always returning 1 when a difference is
found, as opposed to going for a value bigger or lower than 0
depending on what it is. This means it can do less work. For now the
code is duplicated and modified. This will get deduplicated after
another round of optimization when memcmp will get a longer-term form.

Both tested with the glibc suite. While the suite does not have a test
for bcmp, I created a wrapper routine which verified that values match
(0 vs 0, 1 vs non-zero).

Reviewed by:	kib
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17336
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both are significantly slower than hand-coded loops. See r338963 for
kernel commit.

bcmp differs from memcmp by always returning 1 when a difference is
found, as opposed to going for a value bigger or lower than 0
depending on what it is. This means it can do less work. For now the
code is duplicated and modified. This will get deduplicated after
another round of optimization when memcmp will get a longer-term form.

Both tested with the glibc suite. While the suite does not have a test
for bcmp, I created a wrapper routine which verified that values match
(0 vs 0, 1 vs non-zero).

Reviewed by:	kib
Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17336
</pre>
</div>
</content>
</entry>
<entry>
<title>Add section .note.GNU-stack for assembly files used by 386 and amd64.</title>
<updated>2011-01-07T16:08:40+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2011-01-07T16:08:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=93ab75867017bed8892f9f3b1e1bbd6120d49fcd'/>
<id>93ab75867017bed8892f9f3b1e1bbd6120d49fcd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>We've been lax about matching END() macros in asm code for some time.  This</title>
<updated>2008-11-02T01:10:54+00:00</updated>
<author>
<name>Peter Wemm</name>
<email>peter@FreeBSD.org</email>
</author>
<published>2008-11-02T01:10:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5d053f461caeb73f6de165aa1e07b2003101605c'/>
<id>5d053f461caeb73f6de165aa1e07b2003101605c</id>
<content type='text'>
is used to set the ELF size attribute for functions.  It isn't normally
critical but some things can make use of it (gdb for stack traces).
Valgrind needs it so I'm adding it in.  The problem is present on all
branches and on both i386 and amd64.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
is used to set the ELF size attribute for functions.  It isn't normally
critical but some things can make use of it (gdb for stack traces).
Valgrind needs it so I'm adding it in.  The problem is present on all
branches and on both i386 and amd64.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add machine-specific, optimized implementations of bcmp and memcmp.</title>
<updated>2005-04-08T05:15:55+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alc@FreeBSD.org</email>
</author>
<published>2005-04-08T05:15:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=26f6218be92649295dbb54aa1a18fbd9110631fd'/>
<id>26f6218be92649295dbb54aa1a18fbd9110631fd</id>
<content type='text'>
PR: 73111
Submitted by: Ville-Pertti Keinonen &lt;will@iki.fi&gt; (taken from NetBSD)
MFC after: 3 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR: 73111
Submitted by: Ville-Pertti Keinonen &lt;will@iki.fi&gt; (taken from NetBSD)
MFC after: 3 weeks
</pre>
</div>
</content>
</entry>
</feed>
