Author: brane
Date: Fri Feb 28 16:46:45 2025
New Revision: 1924100

URL: http://svn.apache.org/viewvc?rev=1924100&view=rev
Log:
Summary: Deprecate and disable the SVN_UNALIGNED_ACCESS_IS_OK macro.


Compiler optimizations that generate vector instructions will cause crashes
at least on x86 and probably other architectures if memory access is not
properly aligned. Compiler-generated vectorized code will be faster than
the manually coded optimizations anyway.

* notes/knobs (SVN_UNALIGNED_ACCESS_IS_OK): Note that the macro is deprecated.

* subversion/include/svn_types (SVN_UNALIGNED_ACCESS_IS_OK): Always set the
  value of this macro to 0. We can't remove it because it's part of the
  public API.

Reported by: Sam James <sam at gentoo dot org>

Modified:
    subversion/trunk/notes/knobs
    subversion/trunk/subversion/include/svn_types.h

Modified: subversion/trunk/notes/knobs
URL: 
http://svn.apache.org/viewvc/subversion/trunk/notes/knobs?rev=1924100&r1=1924099&r2=1924100&view=diff
==============================================================================
--- subversion/trunk/notes/knobs (original)
+++ subversion/trunk/notes/knobs Fri Feb 28 16:46:45 2025
@@ -38,7 +38,7 @@ SUFFIX_LINES_TO_KEEP
 SVN_FS_FS_DEFAULT_MAX_FILES_PER_DIR
 SVN_FS_FS_MAX_LINEAR_DELTIFICATION
 SVN_FS_FS_MAX_DELTIFICATION_WALK
-SVN_UNALIGNED_ACCESS_IS_OK
+SVN_UNALIGNED_ACCESS_IS_OK (deprecated)
 
 2.2 Features
 
@@ -164,12 +164,14 @@ SVN_I_LIKE_LATENCY_SO_IGNORE_HTTPV2
 
 3.8 SVN_UNALIGNED_ACCESS_IS_OK
 
+  DEPRECATED, unused. The rest of this entry is historical.
+
   Scope:     (global)
   Purpose:   enable data accesss optimizations.
              If your target CPU supports unaligned memory access without
              significant performance penalties, you should enable this
              optimization as it allows for processing 4 or 8 bytes at
-             once instead of just one byte at a time. 
+             once instead of just one byte at a time.
   Range:     0 1
   Default:   platform dependant (see svn_types.h)
   Suggested: 0

Modified: subversion/trunk/subversion/include/svn_types.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_types.h?rev=1924100&r1=1924099&r2=1924100&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_types.h (original)
+++ subversion/trunk/subversion/include/svn_types.h Fri Feb 28 16:46:45 2025
@@ -124,16 +124,12 @@ extern "C" {
  * if unaligned access is supported for integers.
  *
  * @since New in 1.7.
+ * @deprecated Provided for backward compatibility with the 1.14 API.
  */
-#ifndef SVN_UNALIGNED_ACCESS_IS_OK
-# if defined(_M_IX86) || defined(i386) \
-     || defined(_M_X64) || defined(__x86_64) \
-     || defined(__powerpc__) || defined(__ppc__)
-#  define SVN_UNALIGNED_ACCESS_IS_OK 1
-# else
-#  define SVN_UNALIGNED_ACCESS_IS_OK 0
-# endif
+#ifdef SVN_UNALIGNED_ACCESS_IS_OK
+#  undef SVN_UNALIGNED_ACCESS_IS_OK
 #endif
+#define SVN_UNALIGNED_ACCESS_IS_OK 0
 
 
 


Reply via email to