On 03/27/2015 16:49, Rui Paulo wrote:
>
> Regarding your patch, I think we should disable even more, if possible.  How 
> about:
>
> CFLAGS+=        -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3

Yes, I was considering copying all of the similar flags that we use in the
kernel.  That seems wise.  According to comments in sys/conf/kern.mk, only
no-mmx and no-sse would be necessary, as they imply the others.

dim@ raised the possibility of CPUTYPE=foo on i386, so I would also apply this
change to i386.

An updated patch is below.

Eric


Index: base/head/lib/libthr/arch/amd64/Makefile.inc
===================================================================
--- base/head/lib/libthr/arch/amd64/Makefile.inc    (revision 280703)
+++ base/head/lib/libthr/arch/amd64/Makefile.inc    (working copy)
@@ -1,3 +1,8 @@
 #$FreeBSD$
 
 SRCS+=    _umtx_op_err.S
+
+# Using SSE incurs extra overhead per context switch,
+# which measurably impacts performance when the application
+# does not otherwise use FP/SSE.
+CFLAGS+=-mno-sse -mno-mmx
Index: base/head/lib/libthr/arch/i386/Makefile.inc
===================================================================
--- base/head/lib/libthr/arch/i386/Makefile.inc    (revision 280703)
+++ base/head/lib/libthr/arch/i386/Makefile.inc    (working copy)
@@ -1,3 +1,8 @@
 # $FreeBSD$
 
 SRCS+=    _umtx_op_err.S
+
+# Using SSE incurs extra overhead per context switch,
+# which measurably impacts performance when the application
+# does not otherwise use FP/SSE.
+CFLAGS+=-mno-sse -mno-mmx

_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to