Module Name: src
Committed By: dsl
Date: Wed Feb 5 18:52:22 UTC 2014
Modified Files:
src/sys/arch/amd64/conf: Makefile.amd64
src/sys/arch/i386/conf: Makefile.i386
Log Message:
Change the compiler options to explicitly specify:
-mno-mmx -mno-sse -mno-avx -mno-80387 -mno-fp-ret-in-387
Since no-sse implies no-sse2 that should ensure that the compiler really
doesn't emit any instructions that might trap trying to use the FPU.
On amd64 at least some of those are needed to stop the compiler
saving the registers to stack on every varargs function.
It might be that -mno-sse did that before.
To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amd64/conf/Makefile.amd64
cvs rdiff -u -r1.179 -r1.180 src/sys/arch/i386/conf/Makefile.i386
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/conf/Makefile.amd64
diff -u src/sys/arch/amd64/conf/Makefile.amd64:1.42 src/sys/arch/amd64/conf/Makefile.amd64:1.43
--- src/sys/arch/amd64/conf/Makefile.amd64:1.42 Wed Jan 15 22:25:22 2014
+++ src/sys/arch/amd64/conf/Makefile.amd64 Wed Feb 5 18:52:22 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.amd64,v 1.42 2014/01/15 22:25:22 joerg Exp $
+# $NetBSD: Makefile.amd64,v 1.43 2014/02/05 18:52:22 dsl Exp $
# Makefile for NetBSD
#
@@ -36,7 +36,10 @@ GENASSYM_CONF= ${AMD64}/amd64/genassym.c
DEFCOPTS= -O2
CPPFLAGS+= -Damd64 -Dx86_64
CFLAGS+= -mcmodel=kernel
-CFLAGS+= -mno-red-zone -mno-sse -mno-sse2 -mno-sse3
+# -mno-sse implies -mno-sse2 (etc) but doesn't stop avx.
+CFLAGS+= -mno-red-zone -mno-mmx -mno-sse -mno-avx
+# make absolutely sure we don't get x87 registers used as well
+CFLAGS+= -mno-80387 -mno-fp-ret-in-387
##
## (3) libkern and compat
Index: src/sys/arch/i386/conf/Makefile.i386
diff -u src/sys/arch/i386/conf/Makefile.i386:1.179 src/sys/arch/i386/conf/Makefile.i386:1.180
--- src/sys/arch/i386/conf/Makefile.i386:1.179 Wed Jan 15 22:25:22 2014
+++ src/sys/arch/i386/conf/Makefile.i386 Wed Feb 5 18:52:22 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.i386,v 1.179 2014/01/15 22:25:22 joerg Exp $
+# $NetBSD: Makefile.i386,v 1.180 2014/02/05 18:52:22 dsl Exp $
# Makefile for NetBSD
#
@@ -34,7 +34,9 @@ GENASSYM_CONF= ${I386}/i386/genassym.cf
## (2) compile settings
##
CPPFLAGS+= -Di386
-CFLAGS+= -mno-sse -mno-sse2 -mno-sse3
+CFLAGS+= -mno-80387 -mno-fp-ret-in-387
+## no-sse implies no-sse2 but not no-avx
+CFLAGS+= -mno-mmx -mno-sse -mno-avx
##
## (3) libkern and compat