builtins: adjust the clobbers list for android __clear_cache

Adjust the clobbers list.  This use to work with older versions of gcc, but now
will error on newer versions (tested against 5.3) (as well as clang).

Patch by Tee Hao Wei!

llvm-svn: 261821
This commit is contained in:
Saleem Abdulrasool 2016-02-25 04:04:37 +00:00
parent b7a34b608f
commit 2b972dfebb
1 changed files with 3 additions and 2 deletions

View File

@ -103,8 +103,9 @@ void __clear_cache(void *start, void *end) {
const register int end_reg __asm("r1") = (int) (intptr_t) end;
const register int flags __asm("r2") = 0;
const register int syscall_nr __asm("r7") = __ARM_NR_cacheflush;
__asm __volatile("svc 0x0" : "=r"(start_reg)
: "r"(syscall_nr), "r"(start_reg), "r"(end_reg), "r"(flags) : "r0");
__asm __volatile("svc 0x0"
: "=r"(start_reg)
: "r"(syscall_nr), "r"(start_reg), "r"(end_reg));
if (start_reg != 0) {
compilerrt_abort();
}