Hello Bruno,

Am Mo., 6. Nov. 2023 um 19:33 Uhr schrieb Bruno Haible <br...@clisp.org>:

[...]

I can provide such a thing easily. In fact, I have it already sitting
> around on my disk since 2021 :-)
>

This is great!


> > GNU
> > lightning currently calls libgcc's `__clear_cache' directly ([1]), but
> this
> > will fail on systems that do not have libgcc.
>
> And also, libgcc's __clear_cache does not always work. My comments say:
>
>   /* GCC >= 4.3 has a GCC built-in.
>      <https://gcc.gnu.org/onlinedocs/gcc-4.3.6/gcc/Other-Builtins.html>
>      But it's sometimes not correctly implemented.
>
> So, I can provide the module's code. Can you provide a unit test for it?
>

I only have access to x86_64 systems, for which `clear_cache ()' can be a
no-op.  Emulators aren't of much help because they usually do not implement
the need for cache invalidation faithfully.  We would need the help of
someone with, say, an Aarch64 system.

If we want to support a wider variety of systems, the code of Chez Scheme
may be helpful.  The `S_doflush' function ([1]) does the cache clearing.

--

[1]
https://github.com/search?q=repo%3Acisco%2FChezScheme%20S_doflush&type=code

Reply via email to