<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/amd64/string/bcmp.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: 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>Eliminate a conditional branch and as a side-effect eliminate a branch to</title>
<updated>2005-04-10T18:12:07+00:00</updated>
<author>
<name>Alan Cox</name>
<email>alc@FreeBSD.org</email>
</author>
<published>2005-04-10T18:12:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fb41e047872b0a25b526e2873d9d15b7a338036c'/>
<id>fb41e047872b0a25b526e2873d9d15b7a338036c</id>
<content type='text'>
a return instruction.  (The latter is discouraged by the Opteron
optimization manual because it disables branch prediction for the return
instruction.)

Reviewed by: bde
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
a return instruction.  (The latter is discouraged by the Opteron
optimization manual because it disables branch prediction for the return
instruction.)

Reviewed by: bde
</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>
