mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
Make "-mpreferred-stack-boundary=2" the default on the i386.
This reduces the size of the kernel and modules when compiled with GCC 2.95.
This commit is contained in:
parent
a8d46c3a99
commit
54d477a4f1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=53265
@ -18,6 +18,19 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
|
||||
# of material assistance.
|
||||
#
|
||||
|
||||
#
|
||||
# On the i386, do not align the stack to 16-byte boundaries. Otherwise GCC
|
||||
# 2.95 adds code to the entry and exit point of every function to align the
|
||||
# stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack
|
||||
# per function call. While the 16-byte alignment may benefit micro benchmarks,
|
||||
# it is probably an overall loose as it makes the code bigger (less efficient
|
||||
# use of code cache tag lines) and uses more stack (less efficient use of data
|
||||
# cache tag lines)
|
||||
#
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
CFLAGS+= -mpreferred-stack-boundary=2
|
||||
.endif
|
||||
|
||||
#
|
||||
# On the alpha, make sure that we don't use floating-point registers and
|
||||
# allow the use of EV56 instructions (only needed for low-level i/o).
|
||||
|
@ -18,6 +18,19 @@ CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
|
||||
# of material assistance.
|
||||
#
|
||||
|
||||
#
|
||||
# On the i386, do not align the stack to 16-byte boundaries. Otherwise GCC
|
||||
# 2.95 adds code to the entry and exit point of every function to align the
|
||||
# stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack
|
||||
# per function call. While the 16-byte alignment may benefit micro benchmarks,
|
||||
# it is probably an overall loose as it makes the code bigger (less efficient
|
||||
# use of code cache tag lines) and uses more stack (less efficient use of data
|
||||
# cache tag lines)
|
||||
#
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
CFLAGS+= -mpreferred-stack-boundary=2
|
||||
.endif
|
||||
|
||||
#
|
||||
# On the alpha, make sure that we don't use floating-point registers and
|
||||
# allow the use of EV56 instructions (only needed for low-level i/o).
|
||||
|
Loading…
Reference in New Issue
Block a user