Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Change the compiler options to explicitly specify:



details:   https://anonhg.NetBSD.org/src/rev/0fe737544539
branches:  trunk
changeset: 793329:0fe737544539
user:      dsl <dsl%NetBSD.org@localhost>
date:      Wed Feb 05 18:52:22 2014 +0000

description:
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.

diffstat:

 sys/arch/amd64/conf/Makefile.amd64 |  7 +++++--
 sys/arch/i386/conf/Makefile.i386   |  6 ++++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 83879a62095c -r 0fe737544539 sys/arch/amd64/conf/Makefile.amd64
--- a/sys/arch/amd64/conf/Makefile.amd64        Wed Feb 05 11:32:15 2014 +0000
+++ b/sys/arch/amd64/conf/Makefile.amd64        Wed Feb 05 18:52:22 2014 +0000
@@ -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 @@
 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
diff -r 83879a62095c -r 0fe737544539 sys/arch/i386/conf/Makefile.i386
--- a/sys/arch/i386/conf/Makefile.i386  Wed Feb 05 11:32:15 2014 +0000
+++ b/sys/arch/i386/conf/Makefile.i386  Wed Feb 05 18:52:22 2014 +0000
@@ -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 @@
 ## (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



Home | Main Index | Thread Index | Old Index