[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc 4.5 and TLS



On Fri, Jun 4, 2010 at 21:15, Thorsten Glaser <tg@mirbsd.de> 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 ABI as well, no?
>
>>Also, I'm not yet convinced this works in all
>>situations, like for locks allocated on stack.
>
> That may not work, yes, since gcc is brain-dead and assumes that
> the stack is already aligned “properly”. What is the default stack
> alignment on m68k (in real life, not by some ABI)? If it’s 4, I
> think it shouldn’t be a problem.

It's 2. Even if you push a byte to the stack, the SP will be aligned to
an even address.

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.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


Reply to: