summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/powerpc/string/ffs.S (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add retguard to macppc kernel locore.S, ofwreal.S, setjmp.Sgkoehler2020-11-281-3/+3
| | | | | | | | | 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@
* Retguard asm macros for powerpc libc, ld.sogkoehler2020-10-261-1/+3
| | | | | | | | | | Add retguard to some, but not all, asm functions in libc. Edit SYS.h in libc to remove the PREFIX macros and add SYSENTRY (more like aarch64 and powerpc64), so we can insert RETGUARD_SETUP after SYSENTRY. Some .S files in this commit don't get retguard, but do stop using the old prefix macros. Tested by deraadt@, who put this diff in a macppc snap.
* Provide an optimized implementation of ffs(3) in libc onnaddy2020-06-261-0/+16
aarch64/powerpc/powerpc64, making use of the count leading zeros instruction. Also add a brief regression test. ok deraadt@ kettenis@