Current-Users archive

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

Re: Stack alignement with pthreads said:
> (Default for ix86_preferred_stack_boundary is 128, as you would guess
> by now).
> Sounds reasonable to provide the same alignement for threads. 

Afaik the i386 ABI doesn't require an alignment of more
tham 4 bytes or so, so it is generally up to the compiler
to issue some runtime calculations if stack variables need
more. preferred_stack_boundary is just a performance
gcc-4.1 is known to have problems with this. In particular,
sse2 data on the stack don't work well. This is not NetBSD
specific. (You might find related discussion in the
mailinglist of pkgsrc/devel/liboil.)
gcc-4.2 is said to be fixed.
I'd suggest to try with a newer compiler before taking any
further actions. (I'm not saying that alignment of the
thread stack is a bad idea, but it might mask the real

best regards

Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt

Home | Main Index | Thread Index | Old Index