aboutsummaryrefslogtreecommitdiffstats
path: root/libc/arch-mips64
Commit message (Collapse)AuthorAgeFilesLines
* Clean up the architecture-specific makefiles.Elliott Hughes2014-10-281-24/+25
| | | | | | | | | | Group things appropriately and name each group. Bug: 18160821 (cherry picked from commit 7c02d9428ca18ac600f7ba7d51bb24ca71e733f6) Change-Id: I863242515af44058154d03e2d8c34678e682d66a
* Add posix_fadvise(3).Elliott Hughes2014-09-101-0/+26
| | | | | Bug: 12449798 Change-Id: I07cbf3f670a0d1304b68148325a774f266b5c433
* Ensure __set_errno is still visible on LP32.Elliott Hughes2014-09-08194-576/+194
| | | | | | | | | | | | | | | | The use of the .hidden directive to avoid going via the PLT for __set_errno had the side-effect of actually making __set_errno hidden (which is odd because assembler directives don't usually affect symbols defined in a different file --- you can't even create a weak reference to a symbol that's defined in a different file). This change switches the system call stubs over to a new always-hidden __set_errno_internal and has a visible __set_errno on LP32 just for binary compatibility with old NDK apps. Bug: 17423135 Change-Id: I6b6d7a05dda85f923d22e5ffd169a91e23499b7b
* Fix pthread_getattr_np for the main thread.Elliott Hughes2014-08-261-34/+0
| | | | | | | | | | | | | | | | | | | | | | | On most architectures the kernel subtracts a random offset to the stack pointer in create_elf_tables by calling arch_align_stack before writing the auxval table and so on. On all but x86 this doesn't cause a problem because the random offset is less than a page, but on x86 it's up to two pages. This means that our old technique of rounding the stack pointer doesn't work. (Our old implementation of that technique was wrong too.) It's also incorrect to assume that the main thread's stack base and size are constant. Likewise to assume that the main thread has a guard page. The main thread is not like other threads. This patch switches to reading /proc/self/maps (and checking RLIMIT_STACK) whenever we're asked. Bug: 17111575 Signed-off-by: Fengwei Yin <fengwei.yin@intel.com> (cherry picked from commit 57b7a6110e7e8b446fc23cce4765ff625ee0a105) Change-Id: I87e679ee1c0db8092f2d1221c8e7c1461545c5a4
* Make __set_errno hidden in asm.Dan Albert2014-08-08191-0/+382
| | | | | | | | This fixes the build after the -Bsymbolic change. Bug: 16853291 Change-Id: I989c9fec3c32e0289ea257a3bd2b7fd2709b6ce2 (cherry picked from commit bc9f9f25bf1247a6a638a2a2df8441bdd9fabad7)
* Revert "Replaces vfork() implementation with fork()"Dan Albert2014-08-062-0/+72
| | | | | | | | | We're getting cold feet on this one... let's put it back. This reverts commit 210331d9762037afb9b5ed8413079c6f65872df9. Change-Id: I6b0d3c2b1dbf7f1dc9566979a91b7504c2189269 (cherry picked from commit 6a918870bab1a55a5f57dd7954abd9a8a27c1bc2)
* Implement <sys/fsuid.h>.Elliott Hughes2014-07-302-0/+50
| | | | | | (cherry picked from commit 79310994d2b3826a10598f7e7795acb5edb42a20) Change-Id: I47688273691e5c95e5e9302eba254ccaaaad40ca
* [MIPSR6] setjmp supports mips32r6 and FP64A/FPXX reg modelsDuane Sand2014-07-232-122/+48
| | | | | | | | | | | | | Save and restore floating point registers via 64-bit load/stores when possible. Use assembler's builtin macro ops to generate pairs of 32-bit load/stores on Mips I cpus. Some cpus or FR modes have only 16 even-numbered dp fp regs. This is exposed by _MIPS_FPSET, defined by existing compilers. (cherry picked from commit dd37251c473e1483faba0fd5aaf30e7a55582e8a) Change-Id: Ibd43653701a363a77af85121d3cbd229d132a06a
* Add splice, tee, and vmsplice.Elliott Hughes2014-06-243-0/+75
| | | | Change-Id: I5f43380b88d776a8bb607b47dbbc5db5a2fe6163
* Cache getpid.Elliott Hughes2014-06-201-2/+3
| | | | | | | | | | | | | | | | | In practice, with this implementation we never need to make a system call. We get the main thread's tid (which is the same as our pid) back from the set_tid_address system call we have to make during initialization. A new pthread will have the same pid as its parent, and a fork child's main (and only) thread will have a pid equal to its tid, which we get for free from the kernel before clone returns. The only time we'd actually have to make a getpid system call now is if we take a signal during fork and the signal handler calls getpid. (That, or we call getpid in the dynamic linker while it's still dealing with its own relocations and hasn't even set up the main thread yet.) Bug: 15387103 Change-Id: I6d4718ed0a5c912fc75b5f738c49a023dbed5189
* Merge "Remove ioprio_get(2) and ioprio_set(2) from LP64."Dan Albert2014-06-122-50/+0
|\
| * Remove ioprio_get(2) and ioprio_set(2) from LP64.Dan Albert2014-06-122-50/+0
| | | | | | | | | | Bug: 11156955 Change-Id: I07b596d85e4bd6347d488d1a92c8d0a00b5ef3b3
* | Remove __memcmp16 from bionic.Elliott Hughes2014-06-122-54/+0
|/ | | | Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
* Merge "Replaces vfork() implementation with fork()"Dan Albert2014-06-102-72/+0
|\
| * Replaces vfork() implementation with fork()Dan Albert2014-06-102-72/+0
| | | | | | | | | | | | | | | | vfork() was removed from POSIX 2008, so this replaces its implementation with a call to fork(). Bug: 13935372 Change-Id: I6d99ac9e52a2efc5ee9bda1cab908774b830cedc
* | Merge "Rename __bionic_clone_entry to __start_thread."Elliott Hughes2014-06-061-2/+2
|\ \
| * | Rename __bionic_clone_entry to __start_thread.Elliott Hughes2014-06-061-2/+2
| |/ | | | | | | | | | | This seems a bit less obscure. Change-Id: I7dc528c253b73c861694f67556ad8f919bf92136
* / Remove getdents from bionic.Elliott Hughes2014-06-063-124/+0
|/ | | | | Bug: 11156955 Change-Id: I6c306989801be552d85fba8a50dcdc79282fb9d2
* Removes index() from bionic.Dan Albert2014-06-051-1/+0
| | | | | | | | | | This function has been removed from POSIX. Unfortunately, we can't leave #define index(a, b) strchr((a), (b)) in its place because defining a preprocessor macro for index() breaks a whole lot of code. Bug: 13935372 Change-Id: Ifda348acde06da61c12e7ee2f8fe6950a3174dd1
* Removes bcopy and bzero from bionic.Dan Albert2014-06-032-43/+0
| | | | | | | | These symbols are still defined for LP32 for binary compatibility, but the declarations have been replaced with the POSIX recommended #defines. Bug: 13935372 Change-Id: Ief7e6ca012db374588ba5839f11e8f3a13a20467
* Avoid a system call in 'gettid'.Elliott Hughes2014-06-021-25/+0
| | | | | | | | | | | | | System calls can be pretty slow. This is mako, which has one of our lowest latencies: iterations ns/op BM_unistd_getpid 10000000 209 BM_unistd_gettid 200000000 8 Bug: 15297299 (kernel panic from too many gettid calls) Bug: 15315766 (excessive gettid overhead in liblogd) Change-Id: I49656c0fc5b5d092390264a59e4f2c0d8a8b1aeb
* Merge "Revert "Revert "Lose the hand-written futex assembler."""Elliott Hughes2014-05-293-90/+0
|\
| * Revert "Revert "Lose the hand-written futex assembler.""Elliott Hughes2014-05-283-90/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with the original patch was that using syscall(3) means that errno can be set, but pthread_create(3) was abusing the TLS errno slot as a pthread_mutex_t for the thread startup handshake. There was also a mistake in the check for syscall failures --- it should have checked against -1 instead of 0 (not just because that's the default idiom, but also here because futex(2) can legitimately return values > 0). This patch stops abusing the TLS errno slot and adds a pthread_mutex_t to pthread_internal_t instead. (Note that for LP64 sizeof(pthread_mutex_t) > sizeof(uintptr_t), so we could potentially clobber other TLS slots too.) I've also rewritten the LP32 compatibility stubs to directly reuse the code from the .h file. This reverts commit 75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4. Bug: 15195455 Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
* | Merge "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"Christopher Ferris2014-05-281-0/+1
|\ \ | |/ |/|
| * Add optimized AArch64 versions of bcopy and wmemmove based on memmoveBernhard Rosenkraenzer2014-05-231-0/+1
| | | | | | | | | | | | | | | | Add optimized versions of bcopy and wmemmove for AArch64 based on the memmove implementation Change-Id: I82fbe8a7221ce224c567ffcfed7a94a53640fca8 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
* | Merge "Revert "Lose the hand-written futex assembler.""Narayan Kamath2014-05-283-0/+90
|\ \
| * | Revert "Lose the hand-written futex assembler."Narayan Kamath2014-05-283-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ced906c849704f379d7191822f6d74993d4fa296. Causes issues on art / dalvik due to a broken return value check and other undiagnosed issues. bug: 15195455 Change-Id: I5d6bbb389ecefb0e33a5237421a9d56d32a9317c
* | | Clear the return address register in __bionic_clone.Elliott Hughes2014-05-271-0/+3
| |/ |/| | | | | | | | | | | | | | | The unwinder will end up on the parent thread's stack if the return address register is not cleared. Bug: 14270816 Bug: 15195760 Change-Id: Iebcdf5cc881cad245643bb193760de35eb7f8b19
* | Revert "Add optimized AArch64 versions of bcopy and wmemmove based on memmove"Christopher Ferris2014-05-241-1/+0
| | | | | | | | | | | | | | | | This reverts commit 8167dd7cb98e87ffe9b40e4993c330b244ca2234. For some reason I thought the bcopy change was bzero. The bcopy code doesn't pass our tests, so reverting until I can figure out what's wrong. Change-Id: Id89fe959ea5105cd58dff6bba8d91a30cc4bcb07
* | Add optimized AArch64 versions of bcopy and wmemmove based on memmoveBernhard Rosenkraenzer2014-05-231-0/+1
|/ | | | | | | | Add optimized versions of bcopy and wmemmove for AArch64 based on the memmove implementation Change-Id: Ie43d0ff4f8ec4edba5b4fb5ccacd941f81ac6557 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
* Lose the hand-written futex assembler.Elliott Hughes2014-05-223-90/+0
| | | | | | | Also stop exporting 'futex'. Bug: 12250341 Change-Id: Icc4fa4296cd04dfe0d1061822c69e2eb40c3433a
* Remove the tkill(2) stub.Elliott Hughes2014-05-221-25/+0
| | | | | | | | | glibc doesn't have tkill or tgkill and says "use syscall(3) instead". I've left tgkill since it's quite widely used, but there's no reason to have tkill as well. Bug: 11156955 Change-Id: Ifc0af750320086f829bc9914551c172b501f3b60
* Hide most of the private futex functions.Elliott Hughes2014-05-211-81/+1
| | | | | | | | | | Also hide part of the system properties compatibility code, since we needed to touch that to keep it building. I'll remove __futex_syscall4 and futex in a later patch. Bug: 11156955 Change-Id: Ibbf42414c5bb07fb9f1c4a169922844778e4eeae
* Merge "Remove __syslog; we have the public klogctl API."Elliott Hughes2014-05-211-26/+0
|\
| * Remove __syslog; we have the public klogctl API.Elliott Hughes2014-05-201-26/+0
| | | | | | | | | | Bug: 11156955 Change-Id: I5c2cc02f39f76dd32984135f5c12c10bf2853796
* | Merge "Hide __get_sp."Elliott Hughes2014-05-211-1/+1
|\ \ | |/ |/|
| * Hide __get_sp.Elliott Hughes2014-05-201-1/+1
| | | | | | | | | | Bug: 11156955 Change-Id: I55d8d320521e80c2085af28933a18b00cf5c714e
* | Remove perf_event_open.Elliott Hughes2014-05-201-25/+0
|/ | | | | | | | | This was accidentally added at a time when you couldn't add a constant to <syscall.h> without generating an assembly stub! (You no longer need to add the constants at all.) Bug: 11156955 Change-Id: I053c17879138787976c744a5ecf7d30ee51dc48f
* Mark sockets on creation (socket()) and accept4().Sreeram Ramachandran2014-05-193-30/+6
| | | | | | Remove the separate syscall for accept() and implement it as accept4(..., 0). Change-Id: Ib0b8f5d7c5013b91eae6bbc3847852eb355c7714
* Hide _exit_with_stack_teardown.Elliott Hughes2014-05-161-1/+1
| | | | | Bug: 11156955 Change-Id: Ida3020343c9975177dc324918cd1f10c455eb173
* Hide __signalfd4, used to implement signalfd(3).Elliott Hughes2014-05-161-2/+3
| | | | | Bug: 11156955 Change-Id: I50842279cb5b32ec8bd45193435574e415cd806e
* Mark sockets on accept().Sreeram Ramachandran2014-05-141-2/+3
| | | | | | (cherry picked from commit 58b1f3f6a30a660ad81637c2b50382c3d279243b) Change-Id: I5d09be413cf720fbed905f96313b007997ada76c
* Introduce netd_client, a dynamic library that talks to netd.Sreeram Ramachandran2014-05-131-2/+3
| | | | | | | | | | | The library exists outside bionic. It is dynamically loaded, to replace selected standard socket syscalls with versions that talk to netd. Change connect() to use the library if available. (cherry picked from commit 3a6b627a14df8111b03e452f2df4b5f4938e0e49) Change-Id: Ib6198e19dbc306521a26fcecfdf6e8424d163fc9
* Merge "Add 32-bit Silvermont-optimized string/memory functions."Christopher Ferris2014-05-131-0/+2
|\
| * Add 32-bit Silvermont-optimized string/memory functions.Varvara Rainchik2014-05-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add following functions: bcopy, memcpy, memmove, memset, bzero, memcmp, wmemcmp, strlen, strcpy, strncpy, stpcpy, stpncpy. Create new directories inside arch-x86 to specify architecture: atom, silvermont and generic (non atom or silvermont architectures are treated like generic). Due to introducing optimized versions of stpcpy and stpncpy, c-implementations of these functions are moved from common for architectures makefile to arm and mips specific makefiles. Change-Id: I990f8061c3e9bca1f154119303da9e781c5d086e Signed-off-by: Varvara Rainchik <varvara.rainchik@intel.com>
* | Remove the useless indirection in mips' __set_tls.Elliott Hughes2014-05-123-39/+3
|/ | | | Change-Id: I12e9d6716c42ccbccc9a186441aca0736bb22d05
* Hide the __bionic_clone and __bionic_clone_entry implementation details.Elliott Hughes2014-05-081-0/+1
| | | | | | | | | clone(2) is the public symbol. Also switch a test from __bionic_clone to clone; testing public API means the test now works on glibc too. Change-Id: If59def26a00c3afadb8a6cf9442094c35a59ffde
* Clean up <machine/ieee.h>.Elliott Hughes2014-04-161-169/+0
| | | | | | | The upstream intention was for this to be architecture-dependent, but it's a lot clearer if we just have one copy. Change-Id: I4e8310496145f9f411cd2e847c8cd023b1d758e9
* Implement _Exit(3).Elliott Hughes2014-04-081-0/+3
| | | | Change-Id: Ida6ac844cc87d38c9645b197dd8188bb73e27dbe
* Merge "Clean up localeconv(3)."Elliott Hughes2014-04-081-5/+0
|\