Re: gcc 4.5 and TLS

2010-06-04 Thread Finn Thain
On Sat, 5 Jun 2010, Richard Zidlicky wrote: > I am not sure what happens if the futex is inside a "misaligned struct" > - would that be handled with an attribute of the futex? Is this problem confined to m68k? (All architectures seem to be subject to the same rule for futex offsets.) Finn >

Re: gcc 4.5 and TLS

2010-06-04 Thread Richard Zidlicky
On Fri, Jun 04, 2010 at 10:57:50PM +0200, Geert Uytterhoeven wrote: > On Fri, Jun 4, 2010 at 21:15, Thorsten Glaser wrote: > > Andreas Schwab dixit: > > > >>One cost is ABI breakage. > > > > Hrm, that is true. But then: is that syscall/structure used already? > > I think I get an idea of the troub

Re: gcc 4.5 and TLS

2010-06-04 Thread Thorsten Glaser
Geert Uytterhoeven dixit: >In the past, there's been discussions about changing the alignment of >32-bit quantities >to 4 bytes (as on most other architectures) and reserving a register for TLS >at the same time, as both break the ABI. Ah, ok, sounds possible then. So, the question is whether it

Re: gcc 4.5 and TLS

2010-06-04 Thread Geert Uytterhoeven
On Fri, Jun 4, 2010 at 21:15, Thorsten Glaser wrote: > Andreas Schwab dixit: > >>One cost is ABI breakage. > > Hrm, that is true. But then: is that syscall/structure used already? > I think I get an idea of the trouble though… > > On the other hand, changing gcc’s default alignment may break > the

Re: gcc 4.5 and TLS

2010-06-04 Thread Thorsten Glaser
Andreas Schwab dixit: >One cost is ABI breakage. Hrm, that is true. But then: is that syscall/structure used already? I think I get an idea of the trouble though… On the other hand, changing gcc’s default alignment may break the ABI as well, no? >Also, I'm not yet convinced this works in all >s

Re: gcc 4.5 and TLS

2010-06-04 Thread Andreas Schwab
Finn Thain writes: > When I asked the question, I figured that Andreas would have simply added > the attribute if there was no cost to doing so... One cost is ABI breakage. Also, I'm not yet convinced this works in all situations, like for locks allocated on stack. Andreas. -- Andreas Schwa

Re: gcc 4.5 and TLS

2010-06-04 Thread Finn Thain
On Fri, 4 Jun 2010, Thorsten Glaser wrote: > Finn Thain dixit: > > >Better to adopt the 4 byte alignment rather than relax the requirement? > >Or > > Why? I mean, you can force alignment where it?s needed, at least in gcc > (and clang and pcc and and and?) so there?s no need to waste memory,

Re: gcc 4.5 and TLS

2010-06-04 Thread Thorsten Glaser
Finn Thain dixit: >Better to adopt the 4 byte alignment rather than relax the requirement? Or Why? I mean, you can force alignment where it’s needed, at least in gcc (and clang and pcc and and and…) so there’s no need to waste memory, especially considering the target platform. See my other mail