Merge branch 'vendor/MDOCML'
[dragonfly.git] / sys / platform / pc32 / conf / kern.mk
1 #
2 # On the i386, do not align the stack to 16-byte boundaries.  Otherwise GCC
3 # adds code to the entry and exit point of every function to align the
4 # stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack
5 # per function call.  While the 16-byte alignment may benefit micro benchmarks, 
6 # it is probably an overall loss as it makes the code bigger (less efficient
7 # use of code cache tag lines) and uses more stack (less efficient use of data
8 # cache tag lines)
9 #
10 # Prohibit the use of FP registers in the kernel.  The user FP state is
11 # only saved and restored under strictly managed conditions and mainline
12 # kernel code cannot safely use the FP system.
13 #
14 CFLAGS+=        -fno-stack-protector
15 CFLAGS+=        -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
16
17 .if ${CCVER:Mgcc*}
18 CFLAGS+=        -mpreferred-stack-boundary=2
19 CFLAGS+=        -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a \
20                 -mno-sse5 
21 CFLAGS+=        -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt
22
23 .if ${CCVER} == "gcc47"
24 CFLAGS+=        -mno-avx2 -mno-fsgsbase -mno-rdrnd -mno-f16c
25 CFLAGS+=        -mno-fma -mno-fma4
26 CFLAGS+=        -mno-bmi -mno-bmi2
27 CFLAGS+=        -mno-xop -mno-lwp -mno-lzcnt -mno-tbm
28 .endif
29 .endif
30
31 CFLAGS+=        -msoft-float
32
33 INLINE_LIMIT=   8000