Re: gcc 4.5 and TLS

2010-06-05 Thread Brad Boyer
On Thu, Jun 03, 2010 at 06:12:29PM +0200, Andreas Schwab wrote: > It is basically working quite well. Unfortunately there is a big > problem which becomes apparent when running the libstdc++ testsuite: the > m68k compiler only guarantees a maximum alignment of 2 bytes, but the > futex syscall requ

Re: gcc 4.5 and TLS

2010-06-05 Thread Andreas Schwab
Richard Zidlicky writes: > so the problem is reduced to alignment on stack and alignment in structs? The problem is alignment. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different

Re: gcc 4.5 and TLS

2010-06-05 Thread Richard Zidlicky
On Sat, Jun 05, 2010 at 11:21:42AM +0200, Andreas Schwab wrote: > Richard Zidlicky writes: > > > As I see it the stack-allocated futex could be automagicaly aligned when > > pushed as > > argument to a function > > Futexes are indexed by address. You cannot move them around. so the problem is

Re: gcc 4.5 and TLS

2010-06-05 Thread Andreas Schwab
Richard Zidlicky writes: > As I see it the stack-allocated futex could be automagicaly aligned when > pushed as > argument to a function Futexes are indexed by address. You cannot move them around. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1

Re: gcc 4.5 and TLS

2010-06-05 Thread Andreas Schwab
Geert Uytterhoeven writes: > IIRC, on Coldfire the stack is always 4-byte aligned. m68k-linux also defines PREFERRED_STACK_BOUNDARY == 32, so there is hope that it actually works. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B

Re: gcc 4.5 and TLS

2010-06-05 Thread Richard Zidlicky
On Sat, Jun 05, 2010 at 12:21:47PM +1000, Finn Thain wrote: > > 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 archit

Re: gcc 4.5 and TLS

2010-06-05 Thread Richard Zidlicky
On Sat, Jun 05, 2010 at 09:19:51AM +0200, Geert Uytterhoeven wrote: > On Sat, Jun 5, 2010 at 00:52, Richard Zidlicky wrote: > > On Fri, Jun 04, 2010 at 10:57:50PM +0200, Geert Uytterhoeven wrote: > > this is the hardware behaviour but the compiler is free to use more > > alignment > > and it d

Re: gcc 4.5 and TLS

2010-06-05 Thread Geert Uytterhoeven
On Sat, Jun 5, 2010 at 04:21, Finn Thain wrote: > 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 su

Re: gcc 4.5 and TLS

2010-06-05 Thread Geert Uytterhoeven
On Sat, Jun 5, 2010 at 00:52, Richard Zidlicky wrote: > 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