Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Side by Side Diff: fusl/arch/arm/pthread_arch.h

Issue 1724903002: [fusl] Remove code for unsupported architectures (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/arch/arm/crt_arch.h ('k') | fusl/arch/arm/reloc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #if ((__ARM_ARCH_6K__ || __ARM_ARCH_6ZK__) && !__thumb__) || \
2 __ARM_ARCH_7A__ || __ARM_ARCH_7R__ || __ARM_ARCH >= 7
3
4 static inline pthread_t __pthread_self() {
5 char* p;
6 __asm__ __volatile__("mrc p15,0,%0,c13,c0,3" : "=r"(p));
7 return (void*)(p + 8 - sizeof(struct pthread));
8 }
9
10 #else
11
12 static inline pthread_t __pthread_self() {
13 #ifdef __clang__
14 char* p;
15 __asm__ __volatile__("bl __a_gettp\n\tmov %0,r0"
16 : "=r"(p)
17 :
18 : "cc", "r0", "lr");
19 #else
20 register char* p __asm__("r0");
21 __asm__ __volatile__("bl __a_gettp" : "=r"(p) : : "cc", "lr");
22 #endif
23 return (void*)(p + 8 - sizeof(struct pthread));
24 }
25
26 #endif
27
28 #define TLS_ABOVE_TP
29 #define TP_ADJ(p) ((char*)(p) + sizeof(struct pthread) - 8)
30
31 #define MC_PC arm_pc
OLDNEW
« no previous file with comments | « fusl/arch/arm/crt_arch.h ('k') | fusl/arch/arm/reloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698