remove obsolete i386 MD memchr implementationbde reports (in a reply to r351700 commit mail): This uses scasb, which was last optimal on the 8086, or perhaps the original i386. On freefall
remove obsolete i386 MD memchr implementationbde reports (in a reply to r351700 commit mail): This uses scasb, which was last optimal on the 8086, or perhaps the original i386. On freefall, it is several times slower than the naive translation of the naive C code.Reported by: bdeReviewed by: kib, markjSponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D21785
show more ...
amd64: depessimize userspace memcpy/memmove/bcopyThe change resembles what was done in r334537 for kernel routines.While here take care of i386 variants. Note that primitives remainsuboptimal.R
amd64: depessimize userspace memcpy/memmove/bcopyThe change resembles what was done in r334537 for kernel routines.While here take care of i386 variants. Note that primitives remainsuboptimal.Reviewed by: kib (previous version)Approved by: re (gjb)Differential Revision: https://reviews.freebsd.org/D17167
Correct MDSRCS use in <arch>/string/Makefile.inc.- Remove .c files which duplicate entries in MISRCS.- Use the same, less merge conflict prone style in all cases.- Use MDSRCS for mips (.c and .S
Correct MDSRCS use in <arch>/string/Makefile.inc.- Remove .c files which duplicate entries in MISRCS.- Use the same, less merge conflict prone style in all cases.- Use MDSRCS for mips (.c and .S files both ended up in SRCS).- Remove pointless sparc64 Makefile.inc.- Remove uninformative foreign VCS ID entries.Reviewed by: emaste, imp, jhbMFC after: 1 weekSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D9841
Renumber copyright clause 4Renumber cluase 4 to 3, per what everybody else did when BSD grantedthem permission to remove clause 3. My insistance on keeping the samenumbering for legal reasons is
Renumber copyright clause 4Renumber cluase 4 to 3, per what everybody else did when BSD grantedthem permission to remove clause 3. My insistance on keeping the samenumbering for legal reasons is too pedantic, so give up on that point.Submitted by: Jan Schaumann <[email protected]>Pull Request: https://github.com/freebsd/freebsd/pull/96
Replace the WEAK_ALIAS() alias with the WEAK_REFERENCE() alias. Use it andget rid of the __CONCAT and CNAME macros.Reviewed by: bde, kib
- Correct mispellings of the word occurrenceSubmitted by: Christoph Mallon <[email protected]> (via private mail)
Change index() and rindex() to a weak alias.This allows people to still write statically linked applications thatcall strchr() or strrchr() and have a local variable or function calledindex.Dis
Change index() and rindex() to a weak alias.This allows people to still write statically linked applications thatcall strchr() or strrchr() and have a local variable or function calledindex.Discussed with: bde@
Merge index() and strchr() together.As I looked through the C library, I noticed the FreeBSD MIPS port has ahand-written version of index(). This is nice, if it weren't for thefact that most appl
Merge index() and strchr() together.As I looked through the C library, I noticed the FreeBSD MIPS port has ahand-written version of index(). This is nice, if it weren't for thefact that most applications call strchr() instead.Also, on the other architectures index() and strchr() are identical,meaning we have two identical pieces of code in the C library andstatically linked applications.Solve this by naming the actual file strchr.[cS] and let it use__strong_reference()/STRONG_ALIAS() to provide the index() routine. Dothe same for rindex()/strrchr().This seems to make the C libraries and static binaries slightly smaller,but this reduction in size seems negligible.
Remove duplicate .note.GNU-stack section declaration. bcopy alreadymade the neccessary provisions.Reported by: arundel
Add section .note.GNU-stack for assembly files used by 386 and amd64.
libc: Remove the i386 assembler version of strlen(3).On anything modern, the C version, which processes a word at a time, is muchfaster. The Intel optimization manual explicitly warns against usin
libc: Remove the i386 assembler version of strlen(3).On anything modern, the C version, which processes a word at a time, is muchfaster. The Intel optimization manual explicitly warns against using REPprefixes with SCAS or CMPS, which is exactly what the assembler versiondoes.A simple test on a Phenom II showed the C version, compiled with -O2, to beabout twice as fast determining the length of 100000 strings between 0 and255 bytes long.MFC after: 2 weeks
Add missing END() macros, as per rev 184547 for amd64. The lack of theseis mostly harmless, but it does upset some of valgrind's functionality.
Per Regents of the University of Calfornia letter, remove advertisingclause.# If I've done so improperly on a file, please let me know.
Eliminate an unpredictable branch from bcmp().Reviewed by: bde
MFp4: Pentium/Athlon-optimised implementation of wcschr().
MFp4: Pentium/Athlon-optimised implementation of wcslen().
MFp4: Reduce code size by 26 bytes by only aligning the jump targets thatare at the top of loops.
MFp4: Pentium/Athlon-optimised implementation of wmemchr().
MFp4: Pentium-optimised implementation of wcscmp(). Performs significantlybetter than the code generated by gcc in many cases.
Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,especially in troff files.
Eliminate superfluous memory access in memcpy(3)/memmove(3).Obtained from: NetBSDMFC after: 1 week
Fix style bugs I added in last commit.Spotted by: bde
Modify bcopy (and memcpy/memmove) so that the length value is notre-read from the stack mid copy. This may help mitigate the recentApache buffer overrun and future overruns of the sort.Reviewed
Modify bcopy (and memcpy/memmove) so that the length value is notre-read from the stack mid copy. This may help mitigate the recentApache buffer overrun and future overruns of the sort.Reviewed by: jdpMFC after: 2 days
Fix typo in the BSD copyright: s/withough/without/Spotted and suggested by: desMFC after: 3 weeks
Standardize on our SCM ID style.
12