Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 96c902c

Browse files
committed
Fixed _clearcache implementation
Failed to compile for Android - there was a mess with register variables
1 parent c10fb86 commit 96c902c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/builtins/clear_cache.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ __clear_cache(void* start, void* end)
4949

5050
sysarch(ARM_SYNC_ICACHE, &arg);
5151
#elif defined(ANDROID)
52-
const register int start_reg __asm("r0") = (int) (intptr_t) start;
52+
register int start_reg __asm("r0") = (int) (intptr_t) start;
5353
const register int end_reg __asm("r1") = (int) (intptr_t) end;
5454
const register int flags __asm("r2") = 0;
5555
const register int syscall_nr __asm("r7") = __ARM_NR_cacheflush;
5656
__asm __volatile("svc 0x0" : "=r"(start_reg)
57-
: "r"(syscall_nr), "r"(start_reg), "r"(end_reg), "r"(flags) : "r0");
57+
: "r"(syscall_nr), "r"(start_reg), "r"(end_reg), "r"(flags));
5858
if (start_reg != 0) {
5959
compilerrt_abort();
6060
}

0 commit comments

Comments
 (0)