diff options
author | gonzo <gonzo@FreeBSD.org> | 2012-08-15 03:09:00 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2012-08-15 03:09:00 +0000 |
commit | 0c19fd41e201fbcbf4ce5cb949c595c01a9ad102 (patch) | |
tree | de7bb8605de873c40e5d63c49ec0d337c9840256 /lib/libc | |
parent | 0761ed25354c932b4754aa6fa130cc9d9d2254c4 (diff) | |
download | FreeBSD-src-0c19fd41e201fbcbf4ce5cb949c595c01a9ad102.zip FreeBSD-src-0c19fd41e201fbcbf4ce5cb949c595c01a9ad102.tar.gz |
Merging of projects/armv6, part 2
Handle TLS for ARMv6 and ARMv7
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/arm/gen/__aeabi_read_tp.S | 6 | ||||
-rw-r--r-- | lib/libc/arm/gen/_set_tp.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/libc/arm/gen/__aeabi_read_tp.S b/lib/libc/arm/gen/__aeabi_read_tp.S index 228acff..c3ea99d 100644 --- a/lib/libc/arm/gen/__aeabi_read_tp.S +++ b/lib/libc/arm/gen/__aeabi_read_tp.S @@ -31,10 +31,16 @@ __FBSDID("$FreeBSD$"); #include <machine/sysarch.h> ENTRY(__aeabi_read_tp) +#ifdef ARM_TP_ADDRESS ldr r0, .Larm_tp_address ldr r0, [r0] +#else + mrc p15, 0, r0, c13, c0, 3 +#endif RET +#ifdef ARM_TP_ADDRESS .Larm_tp_address: .word ARM_TP_ADDRESS +#endif diff --git a/lib/libc/arm/gen/_set_tp.c b/lib/libc/arm/gen/_set_tp.c index 44bbdd8..97cabec 100644 --- a/lib/libc/arm/gen/_set_tp.c +++ b/lib/libc/arm/gen/_set_tp.c @@ -35,5 +35,9 @@ void _set_tp(void *tp) { +#ifdef ARM_TP_ADDRESS *((struct tcb **)ARM_TP_ADDRESS) = tp; +#else + sysarch(ARM_SET_TP, tp); +#endif } |