diff options
author | ian <ian@FreeBSD.org> | 2016-06-13 16:48:27 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2016-06-13 16:48:27 +0000 |
commit | ccff332313188686e9815f4bc87de01bfa6919fd (patch) | |
tree | df31c0c2fc3cd308c2783e0f6db3c0b60b7a0e1e | |
parent | 7c98c921f9b7e3a200c9a2641f2f3b8723fcd1d7 (diff) | |
download | FreeBSD-src-ccff332313188686e9815f4bc87de01bfa6919fd.zip FreeBSD-src-ccff332313188686e9815f4bc87de01bfa6919fd.tar.gz |
Do not define __NO_STRICT_ALIGNMENT for armv6. While the requirements
are no longer natural-alignment strict, there are still some restrictions.
FreeBSD network code assumes data is naturally-aligned or is running
on a platform with no restrictions; pointers are not annotated to
indicate the data pointed to may be packed or unaligned. The clang
optimizer can sometimes combine the load or store of a pair of adjacent
32-bit values into a single doubleword load/store, and that operation
requires at least 4-byte alignment. __NO_STRICT_ALIGNMENT can lead
to tcp headers being only 2-byte aligned.
Note that alignment faults remain disabled on armv6, this change reverts
only the defining of the symbol which leads to some overly-agressive code
shortcuts when building common/shared drivers and network code for arm.
Approved by: re(kib)
-rw-r--r-- | sys/arm/include/_types.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/arm/include/_types.h b/sys/arm/include/_types.h index 267ea83..b627963 100644 --- a/sys/arm/include/_types.h +++ b/sys/arm/include/_types.h @@ -43,10 +43,6 @@ #error this file needs sys/cdefs.h as a prerequisite #endif -#if __ARM_ARCH >= 6 -#define __NO_STRICT_ALIGNMENT -#endif - /* * Basic types upon which most other types are built. */ |