summaryrefslogtreecommitdiffstats
path: root/libc/private
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-06-18 13:57:57 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-06-18 13:57:57 -0700
commit13e23302c93fdd8b52c606277f32dec0627ddbbd (patch)
tree938eb4927d3527e91f1045af19f2e6fbd86a86be /libc/private
parentd98d35c5380ce398038d3062d40bc4fe082dce80 (diff)
parentc656d732c7712b0f73d9c560ccf3cb5ae47d219d (diff)
downloadbionic-13e23302c93fdd8b52c606277f32dec0627ddbbd.zip
bionic-13e23302c93fdd8b52c606277f32dec0627ddbbd.tar.gz
bionic-13e23302c93fdd8b52c606277f32dec0627ddbbd.tar.bz2
am c656d732: Merge "Always use v1 for MIPS TLS access."
* commit 'c656d732c7712b0f73d9c560ccf3cb5ae47d219d': Always use v1 for MIPS TLS access.
Diffstat (limited to 'libc/private')
-rw-r--r--libc/private/bionic_tls.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h
index 225a617..61b894f 100644
--- a/libc/private/bionic_tls.h
+++ b/libc/private/bionic_tls.h
@@ -89,7 +89,8 @@ extern int __set_tls(void* ptr);
(volatile void*) __val; })
#elif defined(__mips__)
# define __get_tls() \
- ({ register unsigned int __val; \
+ /* On mips32r1, this goes via a kernel illegal instruction trap that's optimized for v1. */ \
+ ({ register unsigned int __val asm("v1"); \
asm (" .set push\n" \
" .set mips32r2\n" \
" rdhwr %0,$29\n" \