]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Disable clang format around multi-line macros of sparc assembly
authorBob Beck <beck@openssl.org>
Thu, 27 Nov 2025 22:17:00 +0000 (15:17 -0700)
committerTomas Mraz <tomas@openssl.org>
Wed, 3 Dec 2025 13:40:56 +0000 (14:40 +0100)
They are not asm, but spit out stuff that is not C

Clang-format gets confused and does bad things with them.

Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29241)

include/crypto/sparc_arch.h

index 447e715bf205127ba2751aa0ccc6ab5aa49172da..d04021937034d32af39d6fe6d19c5c9cc97b12c3 100644 (file)
@@ -54,6 +54,7 @@
 #  define __arch64__
 # endif
 
+/* clang-format off */
 # define SPARC_PIC_THUNK(reg)    \
         .align  32;             \
 .Lpic_thunk:                    \
@@ -74,6 +75,7 @@
         or      reg,%lo(_GLOBAL_OFFSET_TABLE_+4), reg;  \
         add     %o7, reg, reg
 # endif
+/* clang-format on */
 
 # if defined(__arch64__)
 
 
 # endif
 
+/* clang-format off */
 # ifdef __PIC__
 #  undef SPARC_LOAD_ADDRESS
 #  undef SPARC_LOAD_ADDRESS_LEAF
         SPARC_LOAD_ADDRESS(SYM, reg)            \
         mov     tmp, %o7;
 # endif
+/* clang-format on */
 
 # ifndef __ASSEMBLER__
 extern unsigned int OPENSSL_sparcv9cap_P[2];