diff options
author | Walter Lee <walt@tilera.com> | 2016-06-28 16:20:58 +0000 |
---|---|---|
committer | Walter Lee <walt@gcc.gnu.org> | 2016-06-28 16:20:58 +0000 |
commit | ba6be749f94e6033b8b5bcc23939b7b2f68b7c3f (patch) | |
tree | 638f376e9acfc023865e875b759805bc82409281 /gcc/config/tilegx | |
parent | 77d93c476d047864789829fc6d05a224aee5e85c (diff) | |
download | gcc-ba6be749f94e6033b8b5bcc23939b7b2f68b7c3f.zip gcc-ba6be749f94e6033b8b5bcc23939b7b2f68b7c3f.tar.gz gcc-ba6be749f94e6033b8b5bcc23939b7b2f68b7c3f.tar.bz2 |
linux.h: Do not include arch/icache.h
gcc/ChangeLog
* config/tilegx/linux.h: Do not include arch/icache.h
(CLEAR_INSN_CACHE): Provide inlined definition directly.
* config/tilepro/linux.h: Do not include arch/icache.h
(CLEAR_INSN_CACHE): Provide inlined definition directly.
libgcc/ChangeLog
* config/tilepro/atomic.h: Do not include arch/spr_def.h and
asm/unistd.h.
(SPR_CMPEXCH_VALUE): Define for tilegx.
(__NR_FAST_cmpxchg): Define for tilepro.
(__NR_FAST_atomic_update): Define for tilepro.
(__NR_FAST_cmpxchg64): Define for tilepro.
From-SVN: r237824
Diffstat (limited to 'gcc/config/tilegx')
-rw-r--r-- | gcc/config/tilegx/linux.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/config/tilegx/linux.h b/gcc/config/tilegx/linux.h index f68b044..8ed3d02 100644 --- a/gcc/config/tilegx/linux.h +++ b/gcc/config/tilegx/linux.h @@ -55,12 +55,23 @@ /* For __clear_cache in libgcc2.c. */ #ifdef IN_LIBGCC2 -#include <arch/icache.h> - /* Use the minimum page size of 4K. Alternatively we can call - getpagesize() but it introduces a libc dependence. */ + getpagesize() but it introduces a libc dependence. + See Linux arch/tile/include/uapi/arch/icache.h for more commentary. */ #undef CLEAR_INSN_CACHE -#define CLEAR_INSN_CACHE(beg, end) invalidate_icache (beg, end - beg, 4096) +#define CLEAR_INSN_CACHE(BEG, END) \ +{ \ + long size = (long) (END) - (long) (BEG); \ + if (size) \ + { \ + const char *p = (const char *) ((unsigned long) (BEG) & -64L); \ + const char *end = p + (size < 4096 ? size : 4096) - 1; \ + __insn_mf (); \ + for (; p <= end; p += 64) \ + __insn_icoh (p); \ + __insn_drain (); \ + } \ +} #else |