summaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2003-06-04 07:21:41 +0200
committerAndreas Jaeger <aj@gcc.gnu.org>2003-06-04 07:21:41 +0200
commitf691dc3b2267082db2ba64e402eb06cd8276fb4c (patch)
treeb1196392c75306801253888ba561cd2f816f1798 /gcc/libgcc2.c
parent6d3a8e3c78e2f90746cd7022c8214cc3076c5dc5 (diff)
downloadgcc-f691dc3b2267082db2ba64e402eb06cd8276fb4c.tar.gz
uwin.h: Remove SUBTARGET_PROLOGUE.
* config/i386/uwin.h: Remove SUBTARGET_PROLOGUE. * config/i386/i386.c (ix86_expand_prologue): Do not use SUBTARGET_PROLOGUE. * system.h: Poision SUBTARGET_PROLOGUE. * config/arm/arm-protos.h: Remove unused rdate_section prototype. * output.h: Remove TDESC_SECTION_ASM_OP and RDATA_SECTION_ASM_OP dependend code. * system.h: Poison TDESC_SECTION_ASM_OP and RDATA_SECTION_ASM_OP. * system.h: Poison INSN_CACHE_DEPTH, INSN_CACHE_SIZE and INSN_CACHE_LINE_WIDTH. * libgcc2.c (INSN_CACHE_PLANE_SIZE): Removed. (__clear_cache): Remove code dependend on INSN_CACHE_DEPTH, INSN_CACHE_SIZE and INSN_CACHE_LINE_WIDTH. * doc/tm.texi (Trampolines): Remove INSN_CACHE_DEPTH, INSN_CACHE_SIZE and INSN_CACHE_LINE_WIDTH. * dbxout.c (dbxout_type): Remove usage of DBX_OUTPUT_ENUM. (dbxout_symbol): Remove usage of DBX_OUTPUT_CONSTANT_SYMBOL. (dbxout_block): Remove usage of DBX_OUTPUT_CATCH. (dbxout_block): Remove usage of DBX_LBRAC_FIRST. (dbxout_source_file): Remove usage of DBX_OUTPUT_SOURCE_FILENAME. (dbxout_init): Remove test for DBX_WORKING_DIRECTORY. * doc/tm.texi (DBX Options): Do not document DBX_LBRAC_FIRST, DBX_OUTPUT_SOURCE_FILENAME and DBX_OUTPUT_ENUM and DBX_WORKING_DIRECTORY. * system.h: Poison DBX_LBRAC_FIRST, DBX_OUTPUT_ENUM, DBX_OUTPUT_SOURCE_FILENAME and DBX_WORKING_DIRECTORY. * config/frv/frv-protos.h: Remove unused const_section declaration. * config/vax/vax-protos.h: Likewise. * output.h: Remove CONST_SECTION_ASM_OP usage. * system.h: Poison CONST_SECTION_ASM_OP. * crtstuff.c (__do_global_dtors_aux): Remove usage of CRT_GET_RFIB_TEXT (frame_dummy): Likewise. * unwind-dw2-fde-glibc.c (_Unwind_IteratePhdrCallback): Likewise. * system.h: Poison CRT_GET_RFIB_TEXT. From-SVN: r67423
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c103
1 files changed, 1 insertions, 102 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 069aedb14c1..a9d8e682a8f 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -1,7 +1,7 @@
/* More subroutines needed by GCC output code on some machines. */
/* Compile this one with gcc. */
/* Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GCC.
@@ -1436,113 +1436,12 @@ __eprintf (const char *string, const char *expression,
#ifdef L_clear_cache
/* Clear part of an instruction cache. */
-#define INSN_CACHE_PLANE_SIZE (INSN_CACHE_SIZE / INSN_CACHE_DEPTH)
-
void
__clear_cache (char *beg __attribute__((__unused__)),
char *end __attribute__((__unused__)))
{
#ifdef CLEAR_INSN_CACHE
CLEAR_INSN_CACHE (beg, end);
-#else
-#ifdef INSN_CACHE_SIZE
- static char array[INSN_CACHE_SIZE + INSN_CACHE_PLANE_SIZE + INSN_CACHE_LINE_WIDTH];
- static int initialized;
- int offset;
- void *start_addr
- void *end_addr;
- typedef (*function_ptr) (void);
-
-#if (INSN_CACHE_SIZE / INSN_CACHE_LINE_WIDTH) < 16
- /* It's cheaper to clear the whole cache.
- Put in a series of jump instructions so that calling the beginning
- of the cache will clear the whole thing. */
-
- if (! initialized)
- {
- int ptr = (((int) array + INSN_CACHE_LINE_WIDTH - 1)
- & -INSN_CACHE_LINE_WIDTH);
- int end_ptr = ptr + INSN_CACHE_SIZE;
-
- while (ptr < end_ptr)
- {
- *(INSTRUCTION_TYPE *)ptr
- = JUMP_AHEAD_INSTRUCTION + INSN_CACHE_LINE_WIDTH;
- ptr += INSN_CACHE_LINE_WIDTH;
- }
- *(INSTRUCTION_TYPE *) (ptr - INSN_CACHE_LINE_WIDTH) = RETURN_INSTRUCTION;
-
- initialized = 1;
- }
-
- /* Call the beginning of the sequence. */
- (((function_ptr) (((int) array + INSN_CACHE_LINE_WIDTH - 1)
- & -INSN_CACHE_LINE_WIDTH))
- ());
-
-#else /* Cache is large. */
-
- if (! initialized)
- {
- int ptr = (((int) array + INSN_CACHE_LINE_WIDTH - 1)
- & -INSN_CACHE_LINE_WIDTH);
-
- while (ptr < (int) array + sizeof array)
- {
- *(INSTRUCTION_TYPE *)ptr = RETURN_INSTRUCTION;
- ptr += INSN_CACHE_LINE_WIDTH;
- }
-
- initialized = 1;
- }
-
- /* Find the location in array that occupies the same cache line as BEG. */
-
- offset = ((int) beg & -INSN_CACHE_LINE_WIDTH) & (INSN_CACHE_PLANE_SIZE - 1);
- start_addr = (((int) (array + INSN_CACHE_PLANE_SIZE - 1)
- & -INSN_CACHE_PLANE_SIZE)
- + offset);
-
- /* Compute the cache alignment of the place to stop clearing. */
-#if 0 /* This is not needed for gcc's purposes. */
- /* If the block to clear is bigger than a cache plane,
- we clear the entire cache, and OFFSET is already correct. */
- if (end < beg + INSN_CACHE_PLANE_SIZE)
-#endif
- offset = (((int) (end + INSN_CACHE_LINE_WIDTH - 1)
- & -INSN_CACHE_LINE_WIDTH)
- & (INSN_CACHE_PLANE_SIZE - 1));
-
-#if INSN_CACHE_DEPTH > 1
- end_addr = (start_addr & -INSN_CACHE_PLANE_SIZE) + offset;
- if (end_addr <= start_addr)
- end_addr += INSN_CACHE_PLANE_SIZE;
-
- for (plane = 0; plane < INSN_CACHE_DEPTH; plane++)
- {
- int addr = start_addr + plane * INSN_CACHE_PLANE_SIZE;
- int stop = end_addr + plane * INSN_CACHE_PLANE_SIZE;
-
- while (addr != stop)
- {
- /* Call the return instruction at ADDR. */
- ((function_ptr) addr) ();
-
- addr += INSN_CACHE_LINE_WIDTH;
- }
- }
-#else /* just one plane */
- do
- {
- /* Call the return instruction at START_ADDR. */
- ((function_ptr) start_addr) ();
-
- start_addr += INSN_CACHE_LINE_WIDTH;
- }
- while ((start_addr % INSN_CACHE_SIZE) != offset);
-#endif /* just one plane */
-#endif /* Cache is large */
-#endif /* Cache exists */
#endif /* CLEAR_INSN_CACHE */
}