File: i386-fix.patch

package info (click to toggle)
meep-mpi-default 1.29.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 79,148 kB
  • sloc: cpp: 32,541; python: 31,061; lisp: 1,225; makefile: 516; sh: 249; ansic: 131; javascript: 5
file content (26 lines) | stat: -rw-r--r-- 1,005 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: the CPU baseline for i386 is lower than expected here
             for example there does not have to be SSE available
Author: Thorsten Alteholz <debian@alteholz.de>
Forwarded: not-needed

Index: meep-1.25.0/src/mympi.cpp
===================================================================
--- meep-1.25.0.orig/src/mympi.cpp	2022-12-07 00:06:40.383525856 +0100
+++ meep-1.25.0/src/mympi.cpp	2022-12-07 00:07:32.475477308 +0100
@@ -163,14 +163,8 @@
    which is free software under the GPL-compatible "MIT license" */
 static void _set_zero_subnormals(bool iszero) {
 #if HAVE_IMMINTRIN_H
-  unsigned int flags =
-      0x00008040; // assume a non-ancient processor with SSE2, supporting both FTZ and DAZ flags
-  unsigned int state = _mm_getcsr();
-  if (iszero)
-    state |= flags;
-  else
-    state &= ~flags;
-  _mm_setcsr(state);
+  /* on i386 the baseline is so low that we don't have SSE, so we no nothing here */
+  (void) iszero; // unused
 #else
   (void)iszero; // unused
 #endif