summaryrefslogtreecommitdiff
path: root/sys/lib/libkern
AgeCommit message (Collapse)Author
2015-06-08At some point arm moved to a unified syntax for arm and thumb instructions.Jonathan Gray
While binutils supports both "unified" and "divided" syntax (defaulting to divided) the integrated assembler in clang only supports unified names so switch some files to unified syntax. Similiar changes were made in bitrig and freebsd. No difference in objdump -d output. tested on zaurus by deraadt@, ok miod@
2015-01-19Make some $OpenBSD$ lines prettier/standardier by eliminatingKenneth R Westerback
superflous '*' after '/*' and adding blank after terminating '$'. Also eases parsing of the lines by simple awk scripts. Aesthetic approval from tedu@.
2015-01-15Sync with libc version.Todd C. Miller
2014-12-30unifdef __APCS_26__ we don't run on anything with a 26 bit program counter.Jonathan Gray
This codepath was removed in the NetBSD code this is derived from back in 2003 and was removed in Bitrig earlier this year. No binary change.
2014-12-20Replacing <machine/endian.h> with <sys/endian.h> does not imply removingMiod Vallat
<sys/types.h>. kthxbye
2014-12-19Use <sys/endian.h> instead of <machine/endian.h>Philip Guenther
ok dlg@ mpi@ bcook@ millert@ miod@
2014-12-19sync with libc, using brnz,pt instead, should be betterTheo de Raadt
ok kettenis
2014-12-09Like libc, also for the kernel: Import new amd64 assembly versions ofReyk Floeter
strchr/index, strrchr/rindex, and strlen that provide a significantly faster performance than our previous .c or .S implementations. Based on NetBSD's code. Tested with different amd64 CPUs. ok deraadt@ mikeb@
2014-11-29it should not be necessary to clear the direction flagTed Unangst
ok deraadt
2014-11-21mask off high bits from 'c', before operation, otherwise the packingTheo de Raadt
logic writes balony. Hunting with tedu, mlarkin, and final bit spotted by naddy in freebsd's version.
2014-11-09typoMiod Vallat
2014-07-13KASSERTMSG(9): New kernel assertion with messageMasao Uebayashi
KASSERT() is annoying as it only prints the expression as a string. If you (developers) want to know a little more information, you have to do: #ifdef DIAGNOSTIC if (bad) panic(...); #endif KASSERTMSG() replaces it into a single line: KASSERTMSG(!bad, ...); Taken from NetBSD. (There is a concern that KASSERT() messages are too long; consume more memory, and not friendly for small monitors. This have to be considered & revisited later.) "Like" from henning@ Man page review & advices from jmc@ and schwarze@
2014-07-01Make normalizeRoundAndPackFloat{32,64} non-static; they will be used outsideMiod Vallat
of softfloat.c shortly.
2014-06-21Protect explicit_bzero() from link-time optimizationMatthew Dempsky
Modern compiler toolchains are capable of optimizing even across translation unit boundaries, so simply moving the memory clearing into a separate function is not guaranteed to clear memory. To avoid this, we take advantage of ELF weak symbol semantics, and insert a call to an empty, weakly named function. The semantics of calling this function aren't determinable until load time, so the compiler and linker need to keep the memset() call. There are still ways a toolchain might defeat this trick (e.g., optimistically expecting the weak symbol to not be overloaded, and only calling memset() if it is; promoting weak symbols to strong symbols at link-time when emitting a static binary because they won't be interposed; implementing load-time optimizations). But at least for the foreseeable future, these seem unlikely. ok deraadt
2014-06-10mop up #ifdef _KERNEL goo; ok miodTheo de Raadt
2014-03-18Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingMiod Vallat
this hardware alive is becoming increasingly difficult, and I should heed the message sent by the three disks which have died on me over the last few days. Noone sane will mourn these ports anyway. So long, and thanks for the fish.
2014-01-19Initialize ci_randseed better using arc4random() + a trick. Remove theTheo de Raadt
libkern srandom() API since it is not suitable for this use. ok kettenis miod
2014-01-09tiny tweak to asm. prefer memcpy and memmove, with bcopy wrapperTed Unangst
ok guenther
2013-07-11add fls/flsl functions to find the last bit set in a valueJonathan Gray
from FreeBSD ok mikeb@ haesbaert@ deraadt@
2013-07-05VAX ELF kernel bits.Miod Vallat
2013-06-17m68k kernel memcpy/memmove/bcopy implementation in libkern, remove ovbcopy, ↵Janne Johansson
fix for larger than 128k size copies. Parts from deraadt@, ok (and off-by-one fix) miod@
2013-06-15Fast memmove() implementation for PowerPC, from NetBSD via martin@; withMiod Vallat
bcopy() and memcpy() wrappers.
2013-06-15Fix evil typo causing the wrong pointer to be returned for < 32 bytesMiod Vallat
memcpy() or memmove().
2013-06-15Preserve %o5 around Lbcopy_doubles; prevents the return value from memcpy()Miod Vallat
and memmove() to be incorrect for copies of 32 bytes or more, when the source and destination addresses are nicely aligned.
2013-06-15Make bcopy() involve memmove(), not memcpy().Miod Vallat
Do not bogusly return NULL if dst == src (spotted by tedu@)
2013-06-15Correctly handle a length of zero in memcpy().Miod Vallat
Return the original destination pointer in memcpy() and memmove().
2013-06-15Don't return garbage in memcpy() but the original destination pointer.Miod Vallat
2013-06-15give bcopy() the ovbcopy() semanticsMiod Vallat
2013-06-14regenMark Kettenis
2013-06-14ovbcopy begoneMark Kettenis
2013-06-14regenMark Kettenis
2013-06-14Fix memcpy/memmove return value.Mark Kettenis
2013-06-14regenMark Kettenis
2013-06-13new integral bcopy/memmove/memcpy, pulled out of sparc locoreTheo de Raadt
tested by beck
2013-06-13syncronize "look in other file" messagesTheo de Raadt
2013-06-13merged bcopy/memmove/memcpyTheo de Raadt
tested by bcallah, proofed by jasper, ok tedu
2013-06-13rework the memcpy family to all use one function body and implementTed Unangst
desired semantics. ok deraadt
2013-06-13Remove pointless instruction in the memcpy path that snuck in with theMark Kettenis
previous commit. ok deraadt@
2013-06-13take libc bcopy, gut the #ifdefs for other modes, and place it here.Theo de Raadt
Now deficient architectures can use this if they need to. conf/files already tries to pull this in (pointed out by mlarkin)
2013-06-13ovbcopy begoneTheo de Raadt
2013-06-13same bcopy/memmove/memcpy methodology for vax.Theo de Raadt
checked over by mlarkin
2013-06-13merge bcopy/memmove/memcpy into one file, with jumps so that it is moreTheo de Raadt
likely to be in the cache (like how the explanation is split between multiple commits?) tested by various
2013-06-13merge memcpy/memmove/bcopy into one file, with sub-jumps.Theo de Raadt
ok .... I guess noone, because it is summer
2013-06-13merge bcopy/memcpy/memmove into one function.Theo de Raadt
ok mlarkin tedu
2013-06-12From now on, the MI libkern memcpy should not do overlap handling.Theo de Raadt
2013-06-11regenMark Kettenis
2013-06-11Optimize memcpy(9) by always doing a forward copy; it should never be usedMark Kettenis
for overlapping copies. Attempt to be instruction cache friendly by turning things around and make memcpy(9) use the forward copy branch of memmove(9), and implement bcopy(9) by swapping its arguments and dropping into memmove(9). Same change as the one just made to for hppa.
2013-06-11remove ovbcopy supportTheo de Raadt
ok kettenis
2013-06-11regenMark Kettenis
2013-06-11Optimize memcpy(9) by always doing a forward copy; it should never be usedMark Kettenis
for overlapping copies. Attempt to be instruction cache friendly by turning things around and make memcpy(9) use the forward copy branch of memmove(9), and implement bcopy(9) by swapping its arguments and dropping into memmove(9). ok deraadt@