about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile6
-rwxr-xr-xbuildtools/configure.pl34
-rw-r--r--config.mk.in8
-rw-r--r--doc/HISTORY2
-rw-r--r--editor/pamflip/pamflip_sse.c6
-rw-r--r--lib/libpbm3.c2
-rw-r--r--pm_config.in.h4
7 files changed, 37 insertions, 25 deletions
diff --git a/GNUmakefile b/GNUmakefile
index eaf81976..035a8ed5 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -161,10 +161,10 @@ ifeq ($(HAVE_INT64),Y)
 else
 	echo "#define HAVE_INT64 0" >>$@
 endif	
-ifeq ($(WANT_MMX),Y)
-	echo "#define WANT_MMX 1" >>$@
+ifeq ($(WANT_SSE),Y)
+	echo "#define WANT_SSE 1" >>$@
 else
-	echo "#define WANT_MMX 0" >>$@
+	echo "#define WANT_SSE 0" >>$@
 endif	
 ifeq ($(DONT_HAVE_PROCESS_MGMT),Y)
 	echo "#define HAVE_FORK 0" >>$@
diff --git a/buildtools/configure.pl b/buildtools/configure.pl
index 9d0e7808..b03630d8 100755
--- a/buildtools/configure.pl
+++ b/buildtools/configure.pl
@@ -983,13 +983,13 @@ sub getInt64($$) {
 
 
 
-sub determineMmxCapability($) {
+sub determineSseCapability($) {
 
     my ($haveEmmintrinR) = @_;
 
     if (defined($testCc)) {
 
-        print("(Doing test compiles to determine if your compiler has MMX " .
+        print("(Doing test compiles to determine if your compiler has SSE " .
               "intrinsics -- ignore errors)\n");
 
         my $cflags = testCflags();
@@ -1006,7 +1006,7 @@ sub determineMmxCapability($) {
             print("It does.\n");
             $$haveEmmintrinR = $TRUE;
         } else {
-            print("It does not.  Programs will not exploit fast MMX " .
+            print("It does not.  Programs will not exploit fast SSE " .
                   "instructions.\n");
             $$haveEmmintrinR = $FALSE;
         }
@@ -1019,20 +1019,32 @@ sub determineMmxCapability($) {
 
 
 
-sub getMmx($) {
+sub getSse($) {
 
-    my ($wantMmxR) = @_;
+    my ($wantSseR) = @_;
 
-    determineMmxCapability(\my $haveEmmintrin);
+    determineSseCapability(\my $haveEmmintrin);
 
     my $gotit;
 
-    print("Use MMX instructions?\n");
+    print("Use SSE instructions?\n");
     print("\n");
 
     my $default = $haveEmmintrin ? "y" : "n";
 
-    $$wantMmxR = promptYesNo($default);
+    $$wantSseR = promptYesNo($default);
+
+    # Another complication in the SSE world is that GNU compiler options
+    # -msse, -msse2, and -march=xxx affect whether the compiler can or will
+    # generate the instructions.  When compiling for older processors, the
+    # default for these options is negative ; for newer processors, it is
+    # affirmative.  -[no]msse2 determines whether macro __SSE2__ macro is
+    # defined.  If it is not, #include <emmintrins.h> fails (<emmintrins.h>
+    # checks __SSE2__.
+
+    # The Netpbm build does not mess with these compiler options.  If the
+    # user wants something other than the default, he can put it in CFLAGS
+    # in config.mk manually or on the make command line on in CFLAGS_PERSONAL.
 }
 
 
@@ -2014,7 +2026,7 @@ getInttypes(\my $inttypesHeaderFile);
 
 getInt64($inttypesHeaderFile, \my $haveInt64);
 
-getMmx(\my $wantMmx);
+getSse(\my $wantSse);
 
 findProcessManagement(\my $dontHaveProcessMgmt);
 
@@ -2442,8 +2454,8 @@ if ($haveInt64 ne 'Y') {
     push(@config_mk, "HAVE_INT64 = $haveInt64\n");
 }
 
-if ($wantMmx) {
-    push(@config_mk, "WANT_MMX = Y\n");
+if ($wantSse) {
+    push(@config_mk, "WANT_SSE = Y\n");
 }
 
 if ($dontHaveProcessMgmt) {
diff --git a/config.mk.in b/config.mk.in
index 9197e956..307c6480 100644
--- a/config.mk.in
+++ b/config.mk.in
@@ -89,13 +89,13 @@ INTTYPES_H = <inttypes.h>
 HAVE_INT64 = Y
 #HAVE_INT64 = N
 
-# WANT_MMX tells whether the build should use MMX instructions, via the the
-# standard MMX intrinsics (operators such as '_mm_movemask_epi8').  MMX
+# WANT_SSE tells whether the build should use SSE instructions, via the the
+# standard SSE intrinsics (operators such as '_mm_movemask_epi8').  SSE
 # instructions are faster than traditional instructions, but aren't available
 # on all CPUs.  Also, the standard intrinsics are not available in all
 # compilers.
-WANT_MMX = N
-#WANT_MMX = Y
+WANT_SSE = N
+#WANT_SSE = Y
 
 # CC and LD are for building the Netpbm programs, which are not necessarily
 # intended to run on the same system on which Make is running.  But when we 
diff --git a/doc/HISTORY b/doc/HISTORY
index d353f154..afc78da0 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -15,7 +15,7 @@ not yet  BJH  Release 10.65.00
               Fix compile failure on system such as OpenBSD that don't have
               SIGWINCH and SIGIO.  Broken since 10.49 (December 2009).
 
-              Build: Use <emmintrins.h> interface for MMX SSE intrinsics
+              Build: Use <emmintrins.h> interface for SSE intrinsics
               instead of GCC-specific versions.  Thanks Prophet of the Way
               <afu@wta.att.ne.jp>.
 
diff --git a/editor/pamflip/pamflip_sse.c b/editor/pamflip/pamflip_sse.c
index edee601e..eccbe965 100644
--- a/editor/pamflip/pamflip_sse.c
+++ b/editor/pamflip/pamflip_sse.c
@@ -28,11 +28,11 @@
 
 #include "pamflip_sse.h"
 
-/* Note that WANT_MMX implies the user expects MMX to be available
+/* Note that WANT_SSE implies the user expects SSE to be available
    (i.e. <emmintrin.h> exists).
 */
 
-#if WANT_MMX && defined(__SSE2__)
+#if WANT_SSE && defined(__SSE2__)
 
 /*----------------------------------------------------------------------------
    This is a specialized routine for row-for-column PBM transformations.
@@ -411,7 +411,7 @@ pamflip_transformRowsToColumnsPbmSse(const struct pam * const inpamP,
     pbm_freearray(outplane, outpamP->height + 7);
     pbm_freearray(inrow, 16);
 }
-#else  /* WANT_MMX */
+#else  /* WANT_SSE */
 
 void
 pamflip_transformRowsToColumnsPbmSse(const struct pam * const inpamP,
diff --git a/lib/libpbm3.c b/lib/libpbm3.c
index d6a953c2..3d846962 100644
--- a/lib/libpbm3.c
+++ b/lib/libpbm3.c
@@ -27,7 +27,7 @@
    to make PBM raster processing faster.  GCC only.
 
    The GNU Compiler -msse2 option makes SSE/SSE2 available.
-   For x86-32 with MMX/SSE, "-msse2" must be explicitly given.
+   For x86-32 with SSE, "-msse2" must be explicitly given.
    For x86-64 and AMD64, "-msse2" is the default (from Gcc v.4.)
 */
 
diff --git a/pm_config.in.h b/pm_config.in.h
index 77e9e693..f79d44c2 100644
--- a/pm_config.in.h
+++ b/pm_config.in.h
@@ -191,9 +191,9 @@
    NO_GCC_BUILTINS.
 
    Before Netpbm 10.65 (December 2013), Netpbm used GCC compiler extensions
-   to generate MMX code in Pamflip.  Starting in 10.65, Netpbm instead uses
+   to generate SSE code in Pamflip.  Starting in 10.65, Netpbm instead uses
    the more standard operators defined in <emmtrins.h>.  To prevent Netpbm
-   from explicitly using any MMX instructions, set WANT_MMX to N in
+   from explicitly using any SSE instructions, set WANT_SSE to N in
    config.mk.
 */