1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

Prevent dead code elimination for the TP assignmient by using inline

assembly.
This commit is contained in:
Marcel Moolenaar 2006-08-30 00:39:07 +00:00
parent 1b980732bb
commit 7d3f85133a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=161728
2 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,6 @@
void
_set_tp(void *tpval)
{
register void* tp __asm__("r13");
tp = tpval;
__asm __volatile("mov r13 = %0" :: "r"(tpval));
}

View File

@ -594,7 +594,7 @@ init_pltgot(Obj_Entry *obj)
void
allocate_initial_tls(Obj_Entry *list)
{
register Elf_Addr** tp __asm__("r13");
void *tpval;
/*
* Fix the size of the static TLS block by using the maximum
@ -603,7 +603,8 @@ allocate_initial_tls(Obj_Entry *list)
*/
tls_static_space = tls_last_offset + tls_last_size + RTLD_STATIC_TLS_EXTRA;
tp = allocate_tls(list, 0, 16, 16);
tpval = allocate_tls(list, 0, 16, 16);
__asm __volatile("mov r13 = %0" :: "r"(tpval));
}
void *__tls_get_addr(unsigned long module, unsigned long offset)