summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch/powerpc64 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Retguard sigsetjmp on powerpc64.mortimer2020-10-191-5/+10
| | | | ok deraadt@
* add retguard prologue/epiloguederaadt2020-10-191-2/+4
| | | | ok mortimer
* Add powerpc64 retguard macros for setjmp / longjmp.mortimer2020-10-181-5/+10
| | | | ok deraadt@
* SYS___threxit cannot fail, but this integration looks like a gadget.deraadt2020-10-181-1/+2
| | | | | Put a hard-trap instruction after the syscall instruction. ok kettenis mortimer
* Adapt SYS.h to use retguard macros from asm.h, so that generated systemderaadt2020-10-168-46/+77
| | | | | | calls are guarded. Adapt the first few hand-written functions to this model (a few remain) ok kettenis mortimer
* Fix two cases where we shpould compare/store 64-bit values instead ofkettenis2020-07-271-3/+3
| | | | | | 32-bit values. ok gkoehler@, drahn@
* Fix powerpc64's sbrk()gkoehler2020-07-271-3/+5
| | | | | | | Initialize __curbrk = &_end. It's a 64-bit pointer, so use ld/std instead of lwz/stw. ok drahn@
* Fix TIB/TCB on powerpc64. Some bright sould decided that the TCB shouldkettenis2020-07-141-3/+3
| | | | | | | | | | | be 8 bytes in the 64-bit ABI just like in the 32-bit ABI. But that means there is no "spare" word in the TCB that we can use to store a pointer to our struct pthread. So we have to treat powerpc64 special. Also recognize that the thread pointer points 0x7000 bytes after the TCB. Since the TCB is 8 bytes this means that TCB_OFFSET should be 0x7008. Pointed out by guenther@; ok deraadt@
* Add usertc.c.kettenis2020-07-111-0/+1
|
* Add missing usertc.c file.kettenis2020-07-111-0/+21
|
* Use a relative branch to jump from setjmp(3) into _setjmp(4).kettenis2020-07-021-5/+4
| | | | Use correct register to reference the location where we store CR.
* Add missing comparison instruction. Load %r12 with the indirect branchkettenis2020-06-301-1/+3
| | | | address to load the correct TOC address.
* Use C versions of bcopy(3) and memmove(3) for now as the assembly versionkettenis2020-06-291-2/+2
| | | | | | of bcopy(9) doesn't work in its current state. ok deraadt@
* Use std instead of stw to store CR since we use std in sigsetjmp(3) andkettenis2020-06-281-2/+2
| | | | we use ld to load it again in longjmp(3).
* The 2nd and 3rd argument are pointers, so use the appropriate doublewordkettenis2020-06-281-5/+5
| | | | | | instructions. ok drahn@
* Add missing label.kettenis2020-06-271-2/+2
|
* Provide an optimized implementation of ffs(3) in libc onnaddy2020-06-262-2/+17
| | | | | | aarch64/powerpc/powerpc64, making use of the count leading zeros instruction. Also add a brief regression test. ok deraadt@ kettenis@
* Fix TCB_OFFSET_ERRNO. Adjust comments to reflect that powerpc64 uses %r13kettenis2020-06-261-4/+4
| | | | | | as the per-thread register. ok patrick@, drahn@
* Avoid "bare" register numbers.kettenis2020-06-264-26/+26
|
* PowerPC64 libc powerpc sys filesdrahn2020-06-258-0/+368
| | | | | | | | Initial attempt to port powerpc code to powerpc64 Expects TOC loading in ENTRY(), ok kettenis@ (some cleanup required)
* PowerPC64 libc string/net filesdrahn2020-06-252-0/+178
| | | | | | | | | Initial attempt to port powerpc code to powerpc64 Expects TOC loading in ENTRY(), memmove.S is the powerpc 32 bit, optimization is possible for 64 bit and handle len of > 32 bits.
* *** empty log message ***drahn2020-06-251-0/+1
|
* PowerPC64 libc/arch/powerpc/gdtoa filesdrahn2020-06-253-0/+20
| | | | | | This is a almost a direct copy from powerpc with 64 bit mods, with two additions present in 64 arch. NOTE: long double 128 is not supported currently.
* Committed wrong version of file, atomic_lock is 32 bit.drahn2020-06-251-6/+6
|
* PowerPC64 libc gen filesdrahn2020-06-2514-0/+812
| | | | | | | | Initial attempt to port powerpc code to powerpc64 Expects TOC loading in ENTRY(), ok kettenis@
* PowerPC64 libc (libc powerpc top)drahn2020-06-254-0/+176
Expects ELFv2 TOC loading in ENTRY(), build with -gdwarf-4 Split SYS.h into SYS.h and DEFS.h fix tabs after #define