Beaglebone: fix missing clobber in inline assembly.

flush_data_cache uses R0 directly but doesn't list it as a clobbered
register. Compiling with -O3 made this code break, since the function
that calls flush_data_cache already uses r0.

closes #2416.
This commit is contained in:
Marcos Diaz
2015-09-10 10:20:41 -05:00
committed by Joel Sherrill
parent ccebc571d4
commit 44eb9893b5

View File

@@ -111,7 +111,13 @@ static inline void isb(void)
/* flush data cache */
static inline void flush_data_cache(void)
{
asm volatile("mov r0, #0; mcr p15, #0, r0, c7, c10, #4" : : : "memory");
asm volatile(
"mov r0, #0\n"
"mcr p15, #0, r0, c7, c10, #4\n"
: /* No outputs */
: /* No inputs */
: "r0","memory"
);
}
#define __arch_getb(a) (*(volatile unsigned char *)(a))