Avoid dead code elimination of the assignment to TP by using inline

assembly.
This commit is contained in:
Marcel Moolenaar 2006-08-30 00:57:35 +00:00
parent 7d3f85133a
commit f3cec68877

View File

@ -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));
}