File: always-strict-alignment.patch

package info (click to toggle)
hercules 3.13-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,392 kB
  • sloc: ansic: 175,124; sh: 8,792; makefile: 760; perl: 149
file content (30 lines) | stat: -rw-r--r-- 1,210 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
27
28
29
30
Activate OPTION_STRICT_ALIGNMENT to avoid segfault

Access is not always aligned when gcc thinks it is, causing a segfault
when MOVDQA accesses a memory address that is not 16 byte aligned.

Upstream spinhawk commit:
https://github.com/rbowler/spinhawk/commit/a88567da805e945311a42306e7490086274bf8d5

Index: hercules-3.12/machdep.h
===================================================================
--- hercules-3.12.orig/machdep.h
+++ hercules-3.12/machdep.h
@@ -572,14 +572,10 @@ U32  *ptr4, val4, old4, new4;
 #endif
 
 /*-------------------------------------------------------------------
- * Decide if strict alignment is required
+ * Activate OPTION_STRICT_ALIGNMENT to generate different paths
+ * for non-aligned and aligned accesses in certain instructions
  *-------------------------------------------------------------------*/
-#if !defined(OPTION_STRICT_ALIGNMENT) && !defined(OPTION_NO_STRICT_ALIGNMENT)
- #if !defined(_MSVC_) && !defined(_ext_ia32) && !defined(_ext_amd64) \
-  && !defined(_ext_ppc)
-    #define OPTION_STRICT_ALIGNMENT
- #endif
-#endif
+#define OPTION_STRICT_ALIGNMENT
 
 /*-------------------------------------------------------------------
  * fetch_hw_noswap and fetch_hw