qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 11/19] util/cacheflush.c: Update cache flushing mechanism for


From: Kohei Tokunaga
Subject: Re: [PATCH 11/19] util/cacheflush.c: Update cache flushing mechanism for Emscripten
Date: Thu, 17 Apr 2025 18:27:22 +0900

Hi Philippe,

> The "why?" isn't clearly described.

Although __builtin___clear_cache is used to flush the instruction cache for
a specified memory region[1], this operation doesn't apply to wasm, as its
memory isn't executable. Moreover, Emscripten does not support this builtin
and fails to compile it with the following error.

> fatal error: error in backend: llvm.clear_cache is not supported on wasm

To resolve this, I've removed the call to __builtin___clear_cache.

I'll update this patch to include an explicit "#elif" branch with an
explanation, like the following:

+#elif defined(EMSCRIPTEN)
+
+/* Wasm does not have an executable memory region. */
+

Please let me know if I'm missing something or if there is a preferred way
to handle this case.

[1] https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005f_005f_005fclear_005fcache


reply via email to

[Prev in Thread] Current Thread [Next in Thread]