py/emitglue: Fix clear cache builtin warning on Clang for AArch32.

This commit fixes a warning occurring on Clang when calling
`__builtin___clear_cache` with non-void pointers for its start and end
memory area locations.  The code now uses a char pointer for the end
location, and it still builds without warnings on GCC.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit is contained in:
Alessandro Gatti 2024-11-18 22:04:14 +01:00 committed by Damien George
parent 5784714f73
commit 2a8f6047ff

View file

@ -115,7 +115,7 @@ void mp_emit_glue_assign_native(mp_raw_code_t *rc, mp_raw_code_kind_t kind, cons
#endif
#elif MICROPY_EMIT_ARM
#if (defined(__linux__) && defined(__GNUC__)) || __ARM_ARCH == 7
__builtin___clear_cache((void *)fun_data, (uint8_t *)fun_data + fun_len);
__builtin___clear_cache((void *)fun_data, (char *)fun_data + fun_len);
#elif defined(__arm__)
// Flush I-cache and D-cache.
asm volatile (