summaryrefslogtreecommitdiffstats
path: root/lib/libc/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/powerpc')
-rw-r--r--lib/libc/powerpc/gen/_set_tp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/powerpc/gen/_set_tp.c b/lib/libc/powerpc/gen/_set_tp.c
index 045416d..cfedddc 100644
--- a/lib/libc/powerpc/gen/_set_tp.c
+++ b/lib/libc/powerpc/gen/_set_tp.c
@@ -29,7 +29,7 @@
void
_set_tp(void *tpval)
{
- register void* tp __asm__("r2");
+ register void *tp __asm__("r2");
- tp = (char*) tpval + 0x7008;
+ __asm __volatile("mr %0,%1" : "=r"(tp) : "r"((char*)tpval + 0x7008));
}
OpenPOWER on IntegriCloud