Commit d482ddcbc0 for openssl.org
commit d482ddcbc0a911220dac2a93f519e677c3fa1a56
Author: Bob Beck <beck@openssl.org>
Date: Thu Nov 27 15:17:00 2025 -0700
Disable clang format around multi-line macros of sparc assembly
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)
diff --git a/include/crypto/sparc_arch.h b/include/crypto/sparc_arch.h
index 447e715bf2..d040219370 100644
--- a/include/crypto/sparc_arch.h
+++ b/include/crypto/sparc_arch.h
@@ -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__)
@@ -98,6 +100,7 @@
# endif
+/* clang-format off */
# ifdef __PIC__
# undef SPARC_LOAD_ADDRESS
# undef SPARC_LOAD_ADDRESS_LEAF
@@ -114,6 +117,7 @@
SPARC_LOAD_ADDRESS(SYM, reg) \
mov tmp, %o7;
# endif
+/* clang-format on */
# ifndef __ASSEMBLER__
extern unsigned int OPENSSL_sparcv9cap_P[2];