aboutsummaryrefslogtreecommitdiff
path: root/src/thread/arm/clone.s (follow)
Commit message (Expand)AuthorAgeFilesLines
* fix code path where child function returns in arm __clone built as thumb•••mov lr,pc is not a valid way to save the return address in thumb mode since it omits the thumb bit. use a chain of bl and bx to emulate blx. this could be avoided by converting to a .S file with preprocessor conditions to use blx if available, but the time cost here is dominated by the syscall anyway. while making this change, also remove the remnants of support for pre-bx ISA levels. commit 9f290a49bf9ee247d540d3c83875288a7991699c removed the hack from the parent code paths, but left the unnecessary code in the child. keeping it would require rewriting two code paths rather than one, and is useless for reasons described in that commit. Rich Felker2019-09-111-7/+3
* make arch __clone backends hidden•••these are not a public interface and are not intended to be callable from anywhere but the public clone function or other places in libc. Rich Felker2018-09-121-0/+1
* explicitly assemble all arm asm sources as UAL•••these files are all accepted as legacy arm syntax when producing arm code, but legacy syntax cannot be used for producing thumb2 with access to the full ISA. even after switching to UAL, some asm source files contain instructions which are not valid in thumb mode, so these will need to be addressed separately. Rich Felker2015-11-101-0/+1
* remove non-working pre-armv4t support from arm asm•••the idea of the three-instruction sequence being removed was to be able to return to thumb code when used on armv4t+ from a thumb caller, but also to be able to run on armv4 without the bx instruction available (in which case the low bit of lr would always be 0). however, without compiler support for generating such a sequence from C code, which does not exist and which there is unlikely to be interest in implementing, there is little point in having it in the asm, and it would likely be easier to add pre-armv4t support via enhanced linker handling of R_ARM_V4BX than at the compiler level. removing this code simplifies adding support for building libc in thumb2-only form (for cortex-m). Rich Felker2015-11-091-2/+0
* clone: make clone a wrapper around __clone•••The architecture-specific assembly versions of clone did not set errno on failure, which is inconsistent with glibc. __clone still returns the error via its return value, and clone is now a wrapper that sets errno as needed. The public clone has also been moved to src/linux, as it's not directly related to the pthreads API. __clone is called by pthread_create, which does not report errors via errno. Though not strictly necessary, it's nice to avoid clobbering errno here. Bobby Bingham2014-02-091-3/+0
* fix arm clone syscall bug (no effect unless app uses clone)•••the code to exit the new thread/process after the start function returns was mixed up in its syscall convention. Rich Felker2012-09-271-2/+1
* avoid blx instruction which does not exist on armv4t or armv4Rich Felker2012-07-141-1/+2
* fix typo in arm clone() asmRich Felker2011-10-091-1/+1
* initial commit of the arm port•••this port assumes eabi calling conventions, eabi linux syscall convention, and presence of the kernel helpers at 0xffff0f?0 needed for threads support. otherwise it makes very few assumptions, and the code should work even on armv4 without thumb support, as well as on systems with thumb interworking. the bits headers declare this a little endian system, but as far as i can tell the code should work equally well on big endian. some small details are probably broken; so far, testing has been limited to qemu/aboriginal linux. Rich Felker2011-09-181-0/+35