Thus spake Don Bowman <[EMAIL PROTECTED]>: > In sys/conf/kern.mk, there is a comment about not aligning > the (x86) stack to 16-byte boundaries, and it overrides the > preferred-stack-boundary to 2. > > .if ${MACHINE_ARCH} == "i386" > CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 > .endif > > This seems to be contradicted by intel's optimisation guide > for the P4/XEON family. > > It seems that the performance is best by making it 4, even for > older chips. > > Is there any hidden pitfall to changing this value? I compiled > a kernel, and all seems to run ok.
I believe it was changed because GCC 2.95 was horribly broken with respect to alignment. It wouldn't generate incorrect code, but it would waste stack space and emit many extraneous alignment instructions. GCC 3 does a much better job, so perhaps the alignment should be reverted to GCC's default. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message