From b93949ef6a5dea2b22987f2aa3028068e751a7e4 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 20 Aug 2013 14:22:50 -0700 Subject: tcg: Change flush_icache_range arguments to uintptr_t Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'tcg/sparc/tcg-target.h') diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h index 1a696bc97a..c0d3abcc7d 100644 --- a/tcg/sparc/tcg-target.h +++ b/tcg/sparc/tcg-target.h @@ -142,16 +142,12 @@ typedef enum { #define TCG_AREG0 TCG_REG_I0 -static inline void flush_icache_range(tcg_target_ulong start, - tcg_target_ulong stop) +static inline void flush_icache_range(uintptr_t start, uintptr_t stop) { - unsigned long p; - - p = start & ~(8UL - 1UL); - stop = (stop + (8UL - 1UL)) & ~(8UL - 1UL); - - for (; p < stop; p += 8) + uintptr_t p; + for (p = start & -8; p < (stop + 7) & -8; p += 8) { __asm__ __volatile__("flush\t%0" : : "r" (p)); + } } #endif -- cgit v1.2.3