Skip to content

Commit 81e8edd

Browse files
eustascopybara-github
authored andcommitted
disable BROTLI_MODEL macro for some targets
PiperOrigin-RevId: 825438559
1 parent 028fb5a commit 81e8edd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

c/common/platform.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ To apply compiler hint, enclose the branching condition into macros, like this:
213213
#define BROTLI_TARGET_MIPS64
214214
#endif
215215

216+
#if defined(__ia64__) || defined(_M_IA64)
217+
#define BROTLI_TARGET_IA64
218+
#endif
219+
216220
#if defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8_64) || \
217221
defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64) || \
218222
defined(BROTLI_TARGET_LOONGARCH64) || defined(BROTLI_TARGET_MIPS64)
@@ -665,13 +669,14 @@ BROTLI_UNUSED_FUNCTION void BrotliSuppressUnusedFunctions(void) {
665669
#undef BROTLI_TEST
666670
#endif
667671

668-
#if BROTLI_GNUC_HAS_ATTRIBUTE(model, 3, 0, 3)
672+
#if !defined(BROTLI_MODEL) && BROTLI_GNUC_HAS_ATTRIBUTE(model, 3, 0, 3) && \
673+
!defined(BROTLI_TARGET_IA64) && !defined(BROTLI_TARGET_LOONGARCH64)
669674
#define BROTLI_MODEL(M) __attribute__((model(M)))
670675
#else
671676
#define BROTLI_MODEL(M) /* M */
672677
#endif
673678

674-
#if BROTLI_GNUC_HAS_ATTRIBUTE(cold, 4, 3, 0)
679+
#if !defined(BROTLI_COLD) && BROTLI_GNUC_HAS_ATTRIBUTE(cold, 4, 3, 0)
675680
#define BROTLI_COLD __attribute__((cold))
676681
#else
677682
#define BROTLI_COLD /* cold */

0 commit comments

Comments
 (0)