[all-commits] [llvm/llvm-project] 2b0f5d: [builtins][Mips] Un-break FreeBSD build of __clear...

Jessica Clarke via All-commits all-commits at lists.llvm.org
Sat Jul 22 15:01:42 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b0f5df7b4e01d5b9b380fd72a19df021b9a3b98
      https://github.com/llvm/llvm-project/commit/2b0f5df7b4e01d5b9b380fd72a19df021b9a3b98
  Author: Jessica Clarke <jrtc27 at jrtc27.com>
  Date:   2023-07-22 (Sat, 22 Jul 2023)

  Changed paths:
    M compiler-rt/lib/builtins/clear_cache.c

  Log Message:
  -----------
  [builtins][Mips] Un-break FreeBSD build of __clear_cache

Commit 674a17e9bbe8 ("MIPS/compiler_rt: use synci to flush icache on
r6") completely removed the OS-specific guards under the guise of "For
pre-r6, we can use cacheflush libc function, which is same on Linux and
FreeBSD." However, the code in question had guards for Linux and
OpenBSD, not Linux and FreeBSD, and FreeBSD does not have a cacheflush
libc function as claimed, so this was neither the statement they
intended to make nor was it sufficient justification for making the code
completely unconditional. Whilst the upcoming FreeBSD 14 release has
dropped support for MIPS, FreeBSD 13 has support for it.

Fix this by only calling cacheflush on the OSes where it was previously
called, and not on other OSes where it either definitely isn't available
(FreeBSD) or is unknown (any other OS than the three mentioned in this
commit).




More information about the All-commits mailing list