diff options
author | David Lechner <david@pybricks.com> | 2019-07-05 15:42:33 -0500 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-07-12 16:48:37 +1000 |
commit | 82dc9856b06da89463e955abe2ee73a613718430 (patch) | |
tree | b7291b26017cb7302c661fd9c2ad7b03390fd3a1 | |
parent | d6e3038a080adb4024cec9bad89b4883487e12c0 (diff) | |
download | micropython-82dc9856b06da89463e955abe2ee73a613718430.tar.gz micropython-82dc9856b06da89463e955abe2ee73a613718430.zip |
py/asmarm: Use __builtin___clear_cache instead of __clear_cache.
__clear_cache causes a compile error when using clang. Instead use
__builtin___clear_cache which is available under both gcc and clang.
Also replace tabs with spaces in this section of code (introduced by a
previous commit).
-rw-r--r-- | py/asmarm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/py/asmarm.c b/py/asmarm.c index 2a84f985ba..59c661cc04 100644 --- a/py/asmarm.c +++ b/py/asmarm.c @@ -41,9 +41,9 @@ void asm_arm_end_pass(asm_arm_t *as) { if (as->base.pass == MP_ASM_PASS_EMIT) { #if defined(__linux__) && defined(__GNUC__) - char *start = mp_asm_base_get_code(&as->base); - char *end = start + mp_asm_base_get_code_size(&as->base); - __clear_cache(start, end); + char *start = mp_asm_base_get_code(&as->base); + char *end = start + mp_asm_base_get_code_size(&as->base); + __builtin___clear_cache(start, end); #elif defined(__arm__) // flush I- and D-cache asm volatile( |