]> granicus.if.org Git - php/commitdiff
Handle special case when SSE only requested for 32-bit build
authorAnatol Belski <ab@php.net>
Fri, 16 Feb 2018 15:51:11 +0000 (16:51 +0100)
committerAnatol Belski <ab@php.net>
Fri, 16 Feb 2018 15:51:11 +0000 (16:51 +0100)
win32/build/confutils.js

index 2115078bea689219921f5fc7612268dc0ee5747c..1a3ecf041bd762d2c5179126f236188a9ce6b3af 100644 (file)
@@ -3270,6 +3270,17 @@ function toolset_setup_intrinsic_cflags()
                                        }
                                }
                        }
+                       if (!X64) {
+                               /* SSE2 is currently the default on 32-bit. It could change later,
+                                       for now no need to pass it. But, if SSE only was chosen,
+                                       /arch:SSE is required. */
+                               if ("sse" == scale[j]) {
+                                       ADD_FLAG("CFLAGS","/arch:SSE");
+                               }
+                       }
+                       /* There is no explicit way to enable intrinsics between SSE3 and SSE4.2.
+                               The declared macros therefore won't affect the code generation,
+                               but will enable the guarded code parts. */
                        if ("avx2" == scale[j]) {
                                ADD_FLAG("CFLAGS","/arch:AVX2");
                                j -= 2;