diff options
author | Joseph Myers <joseph@codesourcery.com> | 2009-05-28 17:26:23 +0100 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2009-05-28 17:26:23 +0100 |
commit | 8a66e987b576d1eceb199834e526af56accf55cf (patch) | |
tree | f63844b950154685978c57cd4ac7beaeb7fb5b3f | |
parent | b45d27197ff43c93ec0ffbb0303ca9a408e4e555 (diff) | |
download | gcc-8a66e987b576d1eceb199834e526af56accf55cf.zip gcc-8a66e987b576d1eceb199834e526af56accf55cf.tar.gz gcc-8a66e987b576d1eceb199834e526af56accf55cf.tar.bz2 |
lib1funcs.asm (__clear_cache): Define if L_clear_cache.
* config/arm/lib1funcs.asm (__clear_cache): Define if
L_clear_cache.
* config/arm/linux-eabi.h (CLEAR_INSN_CACHE): Define to give an
error if used.
* config/arm/t-linux-eabi (LIB1ASMFUNCS): Add _clear_cache.
From-SVN: r147956
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/arm/lib1funcs.asm | 21 | ||||
-rw-r--r-- | gcc/config/arm/linux-eabi.h | 16 | ||||
-rw-r--r-- | gcc/config/arm/t-linux-eabi | 4 |
4 files changed, 35 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be7e92f..33a9038 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2009-05-28 Joseph Myers <joseph@codesourcery.com> + + * config/arm/lib1funcs.asm (__clear_cache): Define if + L_clear_cache. + * config/arm/linux-eabi.h (CLEAR_INSN_CACHE): Define to give an + error if used. + * config/arm/t-linux-eabi (LIB1ASMFUNCS): Add _clear_cache. + 2009-05-28 Richard Guenther <rguenther@suse.de> * tree-ssa-alias.c (ao_ref_init): New function. diff --git a/gcc/config/arm/lib1funcs.asm b/gcc/config/arm/lib1funcs.asm index b1f2bcc..cc5b94e 100644 --- a/gcc/config/arm/lib1funcs.asm +++ b/gcc/config/arm/lib1funcs.asm @@ -1096,6 +1096,27 @@ LSYM(Lover12): FUNC_END div0 #endif /* L_dvmd_lnx */ +#ifdef L_clear_cache +#if defined __ARM_EABI__ && defined __linux__ +@ EABI GNU/Linux call to cacheflush syscall. + FUNC_START clear_cache + push {r7} +#if __ARM_ARCH__ >= 7 || defined(__ARM_ARCH_6T2__) + movw r7, #2 + movt r7, #0xf +#else + mov r7, #0xf0000 + add r7, r7, #2 +#endif + mov r2, #0 + swi 0 + pop {r7} + RET + FUNC_END clear_cache +#else +#error "This is only for ARM EABI GNU/Linux" +#endif +#endif /* L_clear_cache */ /* ------------------------------------------------------------------------ */ /* Dword shift operations. */ /* All the following Dword shift variants rely on the fact that diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h index 4174d70..85410c0 100644 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h @@ -72,16 +72,8 @@ do not use -lfloat. */ #undef LIBGCC_SPEC -/* Clear the instruction cache from `beg' to `end'. This makes an - inline system call to SYS_cacheflush. */ +/* Clear the instruction cache from `beg' to `end'. This is + implemented in lib1funcs.asm, so ensure an error if this definition + is used. */ #undef CLEAR_INSN_CACHE -#define CLEAR_INSN_CACHE(BEG, END) \ -{ \ - register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ - register unsigned long _end __asm ("a2") = (unsigned long) (END); \ - register unsigned long _flg __asm ("a3") = 0; \ - register unsigned long _scno __asm ("r7") = 0xf0002; \ - __asm __volatile ("swi 0 @ sys_cacheflush" \ - : "=r" (_beg) \ - : "0" (_beg), "r" (_end), "r" (_flg), "r" (_scno)); \ -} +#define CLEAR_INSN_CACHE(BEG, END) not used diff --git a/gcc/config/arm/t-linux-eabi b/gcc/config/arm/t-linux-eabi index ebd177b..b8a5ce0 100644 --- a/gcc/config/arm/t-linux-eabi +++ b/gcc/config/arm/t-linux-eabi @@ -24,8 +24,8 @@ TARGET_LIBGCC2_CFLAGS = -fPIC MULTILIB_OPTIONS = MULTILIB_DIRNAMES = -# Use a version of div0 which raises SIGFPE. -LIB1ASMFUNCS := $(filter-out _dvmd_tls,$(LIB1ASMFUNCS)) _dvmd_lnx +# Use a version of div0 which raises SIGFPE, and a special __clear_cache. +LIB1ASMFUNCS := $(filter-out _dvmd_tls,$(LIB1ASMFUNCS)) _dvmd_lnx _clear_cache # Multilib the standard Linux files. Don't include crti.o or crtn.o, # which are provided by glibc. |