summaryrefslogtreecommitdiffstats
path: root/sys/lib/libkern/arch (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add retguard to macppc kernel locore.S, ofwreal.S, setjmp.Sgkoehler2020-11-282-7/+7
| | | | | | | | | This changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12) and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12) to show that r11 and r12 are in use between setup and check, and to pick registers other than r11 and r12 in some kernel functions. ok mortimer@ deraadt@
* Retguared asm macros for powerpc libkerngkoehler2020-10-272-7/+12
| | | | | This was in the macppc snap, but I forgot to include it in my last commit "Retguard asm macros for powerpc libc, ld.so"
* Use the retguard macros from asm.h to protect the function.deraadt2020-10-161-1/+3
| | | | ok mortimer kettenis
* The kernel and bootblocks never reference this file...deraadt2020-07-181-41/+0
|
* Provide an optimized implementation of ffs(3) in the kernel onnaddy2020-06-103-0/+47
| | | | | | | arm64/powerpc/powerpc64, making use of the count leading zeros instruction. powerpc testing by cwen@; ok kettenis@ deraadt@
* Give some END()s to assembly symbols.mpi2019-11-054-4/+8
| | | | ok kettenis@, jca@
* Add movstrSI12_i4 for linking -Os/-Oz kernels. Sadly however itderaadt2019-04-251-0/+19
| | | | fails and locks early in boot.
* Use _ALIGN_TRAPS instead of _ALIGN_TEXT where nops aren't needed.guenther2018-07-133-6/+6
| | | | ok deraadt@
* In asm.h ensure NENTRY uses the old-school nop-sled align, but change standardderaadt2018-07-103-5/+5
| | | | | | | ENTRY is a trapsled. Fix a few functions which fall-through into an ENTRY macro. amd64 binaries now are free of double+-nop sequences (except for one assember nit in aes-586.pl). Previous changes by guenther got us here. ok mortimer kettenis
* Add retguard macros for libkernmortimer2018-07-0315-12/+43
| | | | ok deraadt
* Add aliases for __aeabi_idivmod and __aeabi_uidivmod calls clang emits.jsg2017-10-261-1/+3
| | | | | Remainder of the division is already stored in r1 in __divsi3/__udivsi3. ok kettenis@
* Fix the __sync_* functions to make them work properlyvisa2017-08-201-1/+21
| | | | as full memory barriers.
* Enable radeondrm(4) on loongson to get accelerated graphicsvisa2017-05-211-0/+317
| | | | | | with the RS780E chipset. OK kettenis@, jsg@
* Copy data by using 64-bit loads and stores rather than 32-bitvisa2016-11-141-1/+53
| | | | | | | operations. This about doubles the routine's throughput. No binary change on the 32-bit bootblocks Discussed with miod@ long ago
* Add an implementation of __aeabi_ldivmode() and __aeabi_uldivmod(); clangkettenis2016-09-242-0/+183
| | | | | | | | | generates calls to these functions when compiling an armv7 kernel. Code from NetBSD's unified userland+kernel implementation, with lots of irrelevant (for us) #ifdefs removed. ok patrick@, guenther@
* Add aeabi aliases.kettenis2016-09-221-1/+4
| | | | ok guenther@, patrick@
* retire sparctedu2016-09-0121-3422/+0
|
* remove hppa64 port, which we never got going beyond broken single users.deraadt2016-05-117-2035/+0
| | | | | | hppa reverse-stack gives us a valuable test case, but most developers don't have a 2nd one to proceed further with this. ok kettenis
* " the the " -> " the ", or in a couple of cases replace the superfluouskrw2016-03-201-2/+2
| | | | | | "the" with the obviously intended word. Started with a "the the" spotted by Mihal Mazurek.
* more pieces of vaxderaadt2016-03-107-319/+0
|
* Sync no-argument function declaration and definition by adding (void).naddy2016-03-071-2/+2
| | | | ok mpi@ millert@
* At some point arm moved to a unified syntax for arm and thumb instructions.jsg2015-06-082-39/+43
| | | | | | | | | 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@
* Make some $OpenBSD$ lines prettier/standardier by eliminatingkrw2015-01-191-1/+1
| | | | | | | superflous '*' after '/*' and adding blank after terminating '$'. Also eases parsing of the lines by simple awk scripts. Aesthetic approval from tedu@.
* unifdef __APCS_26__ we don't run on anything with a 26 bit program counter.jsg2014-12-305-61/+5
| | | | | 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.
* sync with libc, using brnz,pt instead, should be betterderaadt2014-12-191-5/+4
| | | | ok kettenis
* Like libc, also for the kernel: Import new amd64 assembly versions ofreyk2014-12-094-93/+442
| | | | | | | | | | 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@
* it should not be necessary to clear the direction flagtedu2014-11-2916-26/+8
| | | | ok deraadt
* mask off high bits from 'c', before operation, otherwise the packingderaadt2014-11-211-0/+1
| | | | | logic writes balony. Hunting with tedu, mlarkin, and final bit spotted by naddy in freebsd's version.
* typomiod2014-11-091-2/+2
|
* Retire hp300, mvme68k and mvme88k ports. These ports have no users, keepingmiod2014-03-1818-1046/+0
| | | | | | | 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.
* tiny tweak to asm. prefer memcpy and memmove, with bcopy wrappertedu2014-01-092-29/+28
| | | | ok guenther
* VAX ELF kernel bits.miod2013-07-055-79/+79
|
* m68k kernel memcpy/memmove/bcopy implementation in libkern, remove ovbcopy, fix for larger than 128k size copies. Parts from deraadt@, ok (and off-by-one fix) miod@jj2013-06-173-3/+134
|
* Fast memmove() implementation for PowerPC, from NetBSD via martin@; withmiod2013-06-153-1/+170
| | | | bcopy() and memcpy() wrappers.
* Fix evil typo causing the wrong pointer to be returned for < 32 bytesmiod2013-06-151-2/+2
| | | | memcpy() or memmove().
* Preserve %o5 around Lbcopy_doubles; prevents the return value from memcpy()miod2013-06-151-4/+5
| | | | | and memmove() to be incorrect for copies of 32 bytes or more, when the source and destination addresses are nicely aligned.
* Make bcopy() involve memmove(), not memcpy().miod2013-06-152-4/+3
| | | | Do not bogusly return NULL if dst == src (spotted by tedu@)
* Correctly handle a length of zero in memcpy().miod2013-06-151-7/+14
| | | | Return the original destination pointer in memcpy() and memmove().
* Don't return garbage in memcpy() but the original destination pointer.miod2013-06-151-0/+1
|
* give bcopy() the ovbcopy() semanticsmiod2013-06-151-1/+2
|
* regenkettenis2013-06-142-2/+0
|
* ovbcopy begonekettenis2013-06-142-4/+2
|
* regenkettenis2013-06-142-0/+4
|
* Fix memcpy/memmove return value.kettenis2013-06-142-2/+6
|
* new integral bcopy/memmove/memcpy, pulled out of sparc locorederaadt2013-06-133-3/+421
| | | | tested by beck
* syncronize "look in other file" messagesderaadt2013-06-134-4/+4
|
* merged bcopy/memmove/memcpyderaadt2013-06-133-129/+142
| | | | tested by bcallah, proofed by jasper, ok tedu
* rework the memcpy family to all use one function body and implementtedu2013-06-133-272/+248
| | | | desired semantics. ok deraadt
* Remove pointless instruction in the memcpy path that snuck in with thekettenis2013-06-131-2/+0
| | | | | | previous commit. ok deraadt@
* ovbcopy begonederaadt2013-06-131-4/+1
|