Protect __TMC_END__ - __TMC_LIST__ == 0
2016-11-20 Marc Glisse <marc.glisse@inria.fr> PR libgcc/77813 * crtstuff.c (deregister_tm_clones, register_tm_clones): Hide __TMC_END__ behind a passthrough asm. From-SVN: r242635
This commit is contained in:
parent
0021284370
commit
62a7df9f59
2 changed files with 15 additions and 3 deletions
|
@ -1,6 +1,12 @@
|
|||
2016-11-20 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
PR libgcc/77813
|
||||
* crtstuff.c (deregister_tm_clones, register_tm_clones): Hide
|
||||
__TMC_END__ behind a passthrough asm.
|
||||
|
||||
2016-11-18 Walter Lee <walt@tilera.com>
|
||||
|
||||
* config.host (tilepro*-*-linux*): Add t-slibgcc-libgcc to tmake_file.
|
||||
* config.host (tilepro*-*-linux*): Add t-slibgcc-libgcc to tmake_file.
|
||||
|
||||
2016-11-17 Andrew Senkevich <andrew.senkevich@intel.com>
|
||||
|
||||
|
|
|
@ -280,7 +280,10 @@ deregister_tm_clones (void)
|
|||
void (*fn) (void *);
|
||||
|
||||
#ifdef HAVE_GAS_HIDDEN
|
||||
if (__TMC_END__ - __TMC_LIST__ == 0)
|
||||
func_ptr *end = __TMC_END__;
|
||||
// Do not optimize the comparison to false.
|
||||
__asm ("" : "+g" (end));
|
||||
if (__TMC_LIST__ == end)
|
||||
return;
|
||||
#else
|
||||
if (__TMC_LIST__[0] == NULL)
|
||||
|
@ -300,7 +303,10 @@ register_tm_clones (void)
|
|||
size_t size;
|
||||
|
||||
#ifdef HAVE_GAS_HIDDEN
|
||||
size = (__TMC_END__ - __TMC_LIST__) / 2;
|
||||
func_ptr *end = __TMC_END__;
|
||||
// Do not optimize the comparison to false.
|
||||
__asm ("" : "+g" (end));
|
||||
size = (end - __TMC_LIST__) / 2;
|
||||
#else
|
||||
for (size = 0; __TMC_LIST__[size * 2] != NULL; size++)
|
||||
continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue