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
This commit is contained in:
parent
6d3a8e3c78
commit
f691dc3b22
12 changed files with 70 additions and 238 deletions
|
@ -1,5 +1,56 @@
|
|||
2003-06-04 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* 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.
|
||||
|
||||
* collect2.c (is_ctor_dtor): Remove CFRONT_LOSSAGE dependend code.
|
||||
|
||||
* fix-header.c: Remove ADD_MISSING_EXTERN_C dependend variables.
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#ifndef GCC_ARM_PROTOS_H
|
||||
#define GCC_ARM_PROTOS_H
|
||||
|
||||
extern void rdata_section PARAMS ((void));
|
||||
extern void arm_override_options PARAMS ((void));
|
||||
extern int use_return_insn PARAMS ((int));
|
||||
extern int arm_regno_class PARAMS ((int));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Frv prototypes.
|
||||
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Red Hat, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -170,7 +170,6 @@ extern int frv_adjust_field_align PARAMS ((tree, int));
|
|||
extern void fixup_section PARAMS ((void));
|
||||
extern void sdata_section PARAMS ((void));
|
||||
extern void sbss_section PARAMS ((void));
|
||||
extern void const_section PARAMS ((void));
|
||||
extern void data_section PARAMS ((void));
|
||||
|
||||
#ifdef RTX_CODE
|
||||
|
|
|
@ -5162,10 +5162,6 @@ ix86_expand_prologue ()
|
|||
-frame.nregs * UNITS_PER_WORD);
|
||||
}
|
||||
|
||||
#ifdef SUBTARGET_PROLOGUE
|
||||
SUBTARGET_PROLOGUE;
|
||||
#endif
|
||||
|
||||
pic_reg_used = false;
|
||||
if (pic_offset_table_rtx
|
||||
&& (regs_ever_live[REAL_PIC_OFFSET_TABLE_REGNUM]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
hosting on U/WIN (Windows32), using GNU tools and the Windows32 API
|
||||
Library, as distinct from winnt.h, which is used to build GCC for use
|
||||
with a windows style library and tool set and uses the Microsoft tools.
|
||||
Copyright (C) 1999, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Mumit Khan <khan@xraylith.wisc.edu>.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
@ -92,7 +92,3 @@ Boston, MA 02111-1307, USA. */
|
|||
#undef ASM_OUTPUT_EXTERNAL
|
||||
#undef ASM_OUTPUT_EXTERNAL_LIBCALL
|
||||
|
||||
/* Override Cygwin's definition. This is necessary now due to the way
|
||||
Cygwin profiling code is written. Once "fixed", we can remove this. */
|
||||
#undef SUBTARGET_PROLOGUE
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Definitions of target machine for GNU compiler. VAX version.
|
||||
Copyright (C) 2000, 2002 Free Software Foundation, Inc.
|
||||
Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -32,4 +32,3 @@ extern int reg_was_0_p PARAMS ((rtx, rtx));
|
|||
extern int check_float_value PARAMS ((enum machine_mode, REAL_VALUE_TYPE *, int));
|
||||
#endif /* REAL_VALUE_TYPE */
|
||||
|
||||
extern void const_section PARAMS ((void));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Specialized bits of code needed to support construction and
|
||||
destruction of file-scope objects in C++ code.
|
||||
Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998,
|
||||
1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Contributed by Ron Guilmette (rfg@monkeys.com).
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -272,7 +272,7 @@ __do_global_dtors_aux (void)
|
|||
}
|
||||
|
||||
#ifdef USE_EH_FRAME_REGISTRY
|
||||
#if defined(CRT_GET_RFIB_TEXT) || defined(CRT_GET_RFIB_DATA)
|
||||
#ifdef CRT_GET_RFIB_DATA
|
||||
/* If we used the new __register_frame_info_bases interface,
|
||||
make sure that we deregister from the same place. */
|
||||
if (__deregister_frame_info_bases)
|
||||
|
@ -299,24 +299,16 @@ frame_dummy (void)
|
|||
{
|
||||
#ifdef USE_EH_FRAME_REGISTRY
|
||||
static struct object object;
|
||||
#if defined(CRT_GET_RFIB_TEXT) || defined(CRT_GET_RFIB_DATA)
|
||||
void *tbase, *dbase;
|
||||
#ifdef CRT_GET_RFIB_TEXT
|
||||
CRT_GET_RFIB_TEXT (tbase);
|
||||
#else
|
||||
tbase = 0;
|
||||
#endif
|
||||
#ifdef CRT_GET_RFIB_DATA
|
||||
void *tbase, *dbase;
|
||||
tbase = 0;
|
||||
CRT_GET_RFIB_DATA (dbase);
|
||||
#else
|
||||
dbase = 0;
|
||||
#endif
|
||||
if (__register_frame_info_bases)
|
||||
__register_frame_info_bases (__EH_FRAME_BEGIN__, &object, tbase, dbase);
|
||||
#else
|
||||
if (__register_frame_info)
|
||||
__register_frame_info (__EH_FRAME_BEGIN__, &object);
|
||||
#endif
|
||||
#endif /* CRT_GET_RFIB_DATA */
|
||||
#endif /* USE_EH_FRAME_REGISTRY */
|
||||
#ifdef JCR_SECTION_NAME
|
||||
if (__JCR_LIST__[0] && _Jv_RegisterClasses)
|
||||
|
|
34
gcc/dbxout.c
34
gcc/dbxout.c
|
@ -439,10 +439,7 @@ dbxout_init (input_file_name)
|
|||
ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext", 0);
|
||||
|
||||
/* Put the current working directory in an N_SO symbol. */
|
||||
#ifndef DBX_WORKING_DIRECTORY /* Only some versions of DBX want this,
|
||||
but GDB always does. */
|
||||
if (use_gnu_debug_info_extensions)
|
||||
#endif
|
||||
{
|
||||
if (!cwd && (cwd = getpwd ()) && (!*cwd || cwd[strlen (cwd) - 1] != '/'))
|
||||
cwd = concat (cwd, FILE_NAME_JOINER, NULL);
|
||||
|
@ -461,8 +458,6 @@ dbxout_init (input_file_name)
|
|||
}
|
||||
|
||||
#ifdef DBX_OUTPUT_MAIN_SOURCE_FILENAME
|
||||
/* This should NOT be DBX_OUTPUT_SOURCE_FILENAME. That
|
||||
would give us an N_SOL, and we want an N_SO. */
|
||||
DBX_OUTPUT_MAIN_SOURCE_FILENAME (asmfile, input_file_name);
|
||||
#else /* no DBX_OUTPUT_MAIN_SOURCE_FILENAME */
|
||||
/* We include outputting `Ltext:' here,
|
||||
|
@ -612,9 +607,6 @@ dbxout_source_file (file, filename)
|
|||
|
||||
if (filename && (lastfile == 0 || strcmp (filename, lastfile)))
|
||||
{
|
||||
#ifdef DBX_OUTPUT_SOURCE_FILENAME
|
||||
DBX_OUTPUT_SOURCE_FILENAME (file, filename);
|
||||
#else
|
||||
char ltext_label_name[100];
|
||||
|
||||
ASM_GENERATE_INTERNAL_LABEL (ltext_label_name, "Ltext",
|
||||
|
@ -631,7 +623,6 @@ dbxout_source_file (file, filename)
|
|||
text_section ();
|
||||
(*targetm.asm_out.internal_label) (file, "Ltext", source_label_number);
|
||||
source_label_number++;
|
||||
#endif
|
||||
lastfile = filename;
|
||||
}
|
||||
}
|
||||
|
@ -1720,9 +1711,6 @@ dbxout_type (type, full)
|
|||
CHARS (1);
|
||||
return;
|
||||
}
|
||||
#ifdef DBX_OUTPUT_ENUM
|
||||
DBX_OUTPUT_ENUM (asmfile, type);
|
||||
#else
|
||||
if (use_gnu_debug_info_extensions
|
||||
&& TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
|
||||
{
|
||||
|
@ -1752,7 +1740,6 @@ dbxout_type (type, full)
|
|||
|
||||
putc (';', asmfile);
|
||||
CHARS (1);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case POINTER_TYPE:
|
||||
|
@ -2250,13 +2237,9 @@ dbxout_symbol (decl, local)
|
|||
|| TREE_CODE (TREE_TYPE (decl)) == ENUMERAL_TYPE)
|
||||
{
|
||||
HOST_WIDE_INT ival = tree_low_cst (DECL_INITIAL (decl), 0);
|
||||
#ifdef DBX_OUTPUT_CONSTANT_SYMBOL
|
||||
DBX_OUTPUT_CONSTANT_SYMBOL (asmfile, name, ival);
|
||||
#else
|
||||
fprintf (asmfile, "%s\"%s:c=i" HOST_WIDE_INT_PRINT_DEC
|
||||
"\",0x%x,0,0,0\n",
|
||||
ASM_STABS_OP, name, ival, N_LSYM);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
else if (TREE_CODE (TREE_TYPE (decl)) == REAL_TYPE)
|
||||
|
@ -2968,9 +2951,6 @@ dbxout_block (block, depth, args)
|
|||
{
|
||||
int did_output;
|
||||
|
||||
#ifdef DBX_LBRAC_FIRST
|
||||
did_output = 1;
|
||||
#else
|
||||
/* In dbx format, the syms of a block come before the N_LBRAC.
|
||||
If nothing is output, we don't need the N_LBRAC, either. */
|
||||
did_output = 0;
|
||||
|
@ -2978,7 +2958,6 @@ dbxout_block (block, depth, args)
|
|||
did_output = dbxout_syms (BLOCK_VARS (block));
|
||||
if (args)
|
||||
dbxout_reg_parms (args);
|
||||
#endif
|
||||
|
||||
/* Now output an N_LBRAC symbol to represent the beginning of
|
||||
the block. Use the block's tree-walk order to generate
|
||||
|
@ -2996,14 +2975,10 @@ dbxout_block (block, depth, args)
|
|||
tree decl = BLOCK_VARS (block);
|
||||
while (decl)
|
||||
{
|
||||
#ifdef DBX_OUTPUT_CATCH
|
||||
DBX_OUTPUT_CATCH (asmfile, decl, buf);
|
||||
#else
|
||||
fprintf (asmfile, "%s\"%s:C1\",%d,0,0,", ASM_STABS_OP,
|
||||
IDENTIFIER_POINTER (DECL_NAME (decl)), N_CATCH);
|
||||
assemble_name (asmfile, buf);
|
||||
fprintf (asmfile, "\n");
|
||||
#endif
|
||||
decl = TREE_CHAIN (decl);
|
||||
}
|
||||
}
|
||||
|
@ -3021,15 +2996,6 @@ dbxout_block (block, depth, args)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef DBX_LBRAC_FIRST
|
||||
/* On some weird machines, the syms of a block
|
||||
come after the N_LBRAC. */
|
||||
if (debug_info_level != DINFO_LEVEL_TERSE || depth == 0)
|
||||
dbxout_syms (BLOCK_VARS (block));
|
||||
if (args)
|
||||
dbxout_reg_parms (args);
|
||||
#endif
|
||||
|
||||
/* Output the subblocks. */
|
||||
dbxout_block (BLOCK_SUBBLOCKS (block), depth + 1, NULL_TREE);
|
||||
|
||||
|
|
|
@ -4624,39 +4624,15 @@ subroutine. The former technique makes trampoline execution faster; the
|
|||
latter makes initialization faster.
|
||||
|
||||
To clear the instruction cache when a trampoline is initialized, define
|
||||
the following macros which describe the shape of the cache.
|
||||
|
||||
@table @code
|
||||
@findex INSN_CACHE_SIZE
|
||||
@item INSN_CACHE_SIZE
|
||||
The total size in bytes of the cache.
|
||||
|
||||
@findex INSN_CACHE_LINE_WIDTH
|
||||
@item INSN_CACHE_LINE_WIDTH
|
||||
The length in bytes of each cache line. The cache is divided into cache
|
||||
lines which are disjoint slots, each holding a contiguous chunk of data
|
||||
fetched from memory. Each time data is brought into the cache, an
|
||||
entire line is read at once. The data loaded into a cache line is
|
||||
always aligned on a boundary equal to the line size.
|
||||
|
||||
@findex INSN_CACHE_DEPTH
|
||||
@item INSN_CACHE_DEPTH
|
||||
The number of alternative cache lines that can hold any particular memory
|
||||
location.
|
||||
@end table
|
||||
|
||||
Alternatively, if the machine has system calls or instructions to clear
|
||||
the instruction cache directly, you can define the following macro.
|
||||
the following macro.
|
||||
|
||||
@table @code
|
||||
@findex CLEAR_INSN_CACHE
|
||||
@item CLEAR_INSN_CACHE (@var{beg}, @var{end})
|
||||
If defined, expands to a C expression clearing the @emph{instruction
|
||||
cache} in the specified interval. If it is not defined, and the macro
|
||||
@code{INSN_CACHE_SIZE} is defined, some generic code is generated to clear the
|
||||
cache. The definition of this macro would typically be a series of
|
||||
@code{asm} statements. Both @var{beg} and @var{end} are both pointer
|
||||
expressions.
|
||||
cache} in the specified interval. The definition of this macro would
|
||||
typically be a series of @code{asm} statements. Both @var{beg} and
|
||||
@var{end} are both pointer expressions.
|
||||
@end table
|
||||
|
||||
To use a standard subroutine, define the following macro. In addition,
|
||||
|
@ -7949,13 +7925,6 @@ arguments should precede the assembler code for the function. Normally,
|
|||
in DBX format, the debugging information entirely follows the assembler
|
||||
code.
|
||||
|
||||
@findex DBX_LBRAC_FIRST
|
||||
@item DBX_LBRAC_FIRST
|
||||
Define this macro if the @code{N_LBRAC} symbol for a block should
|
||||
precede the debugging information for variables and functions defined in
|
||||
that block. Normally, in DBX format, the @code{N_LBRAC} symbol comes
|
||||
first.
|
||||
|
||||
@findex DBX_BLOCKS_FUNCTION_RELATIVE
|
||||
@item DBX_BLOCKS_FUNCTION_RELATIVE
|
||||
Define this macro if the value of a symbol describing the scope of a
|
||||
|
@ -7995,13 +7964,6 @@ Like @code{DBX_OUTPUT_LBRAC}, but for the end of a scope level.
|
|||
Define this macro if the target machine requires special handling to
|
||||
output an @code{N_FUN} entry for the function @var{decl}.
|
||||
|
||||
@findex DBX_OUTPUT_ENUM
|
||||
@item DBX_OUTPUT_ENUM (@var{stream}, @var{type})
|
||||
Define this macro if the target machine requires special handling to
|
||||
output an enumeration type. The definition should be a C statement
|
||||
(sans semicolon) to output the appropriate information to @var{stream}
|
||||
for the type @var{type}.
|
||||
|
||||
@findex DBX_OUTPUT_FUNCTION_END
|
||||
@item DBX_OUTPUT_FUNCTION_END (@var{stream}, @var{function})
|
||||
Define this macro if the target machine requires special output at the
|
||||
|
@ -8085,14 +8047,6 @@ disturbing the rest of the gdb extensions.
|
|||
This describes file names in DBX format.
|
||||
|
||||
@table @code
|
||||
@findex DBX_WORKING_DIRECTORY
|
||||
@item DBX_WORKING_DIRECTORY
|
||||
Define this if DBX wants to have the current directory recorded in each
|
||||
object file.
|
||||
|
||||
Note that the working directory is always recorded if GDB extensions are
|
||||
enabled.
|
||||
|
||||
@findex DBX_OUTPUT_MAIN_SOURCE_FILENAME
|
||||
@item DBX_OUTPUT_MAIN_SOURCE_FILENAME (@var{stream}, @var{name})
|
||||
A C statement to output DBX debugging information to the stdio stream
|
||||
|
@ -8119,17 +8073,6 @@ compilation of the main source file @var{name}.
|
|||
|
||||
If you don't define this macro, nothing special is output at the end
|
||||
of compilation, which is correct for most machines.
|
||||
|
||||
@findex DBX_OUTPUT_SOURCE_FILENAME
|
||||
@item DBX_OUTPUT_SOURCE_FILENAME (@var{stream}, @var{name})
|
||||
A C statement to output DBX debugging information to the stdio stream
|
||||
@var{stream} which indicates that file @var{name} is the current source
|
||||
file. This output is generated each time input shifts to a different
|
||||
source file as a result of @samp{#include}, the end of an included file,
|
||||
or a @samp{#line} command.
|
||||
|
||||
This macro need not be defined if the standard form of output
|
||||
for DBX debugging information is appropriate.
|
||||
@end table
|
||||
|
||||
@need 2000
|
||||
|
|
103
gcc/libgcc2.c
103
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 */
|
||||
}
|
||||
|
||||
|
|
14
gcc/output.h
14
gcc/output.h
|
@ -1,7 +1,7 @@
|
|||
/* Declarations for insn-output.c. These functions are defined in recog.c,
|
||||
final.c, and varasm.c.
|
||||
Copyright (C) 1987, 1991, 1994, 1997, 1998,
|
||||
1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||
1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
||||
|
@ -183,10 +183,6 @@ extern void dtors_section PARAMS ((void));
|
|||
extern void bss_section PARAMS ((void));
|
||||
#endif
|
||||
|
||||
#ifdef CONST_SECTION_ASM_OP
|
||||
extern void const_section PARAMS ((void));
|
||||
#endif
|
||||
|
||||
#ifdef INIT_SECTION_ASM_OP
|
||||
extern void init_section PARAMS ((void));
|
||||
#endif
|
||||
|
@ -199,10 +195,6 @@ extern void fini_section PARAMS ((void));
|
|||
extern void exports_section PARAMS ((void));
|
||||
#endif
|
||||
|
||||
#ifdef TDESC_SECTION_ASM_OP
|
||||
extern void tdesc_section PARAMS ((void));
|
||||
#endif
|
||||
|
||||
#ifdef DRECTVE_SECTION_ASM_OP
|
||||
extern void drectve_section PARAMS ((void));
|
||||
#endif
|
||||
|
@ -211,10 +203,6 @@ extern void drectve_section PARAMS ((void));
|
|||
extern void sdata_section PARAMS ((void));
|
||||
#endif
|
||||
|
||||
#ifdef RDATA_SECTION_ASM_OP
|
||||
extern void rdata_section PARAMS ((void));
|
||||
#endif
|
||||
|
||||
/* Tell assembler to change to section NAME for DECL.
|
||||
If DECL is NULL, just switch to section NAME.
|
||||
If NAME is NULL, get the name from DECL.
|
||||
|
|
|
@ -642,7 +642,11 @@ typedef char _Bool;
|
|||
MACHINE_STATE_RESTORE SCCS_DIRECTIVE SECTION_ASM_OP \
|
||||
ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL ASM_OUTPUT_INTERNAL_LABEL \
|
||||
OBJC_PROLOGUE ALLOCATE_TRAMPOLINE HANDLE_PRAGMA ROUND_TYPE_SIZE \
|
||||
ROUND_TYPE_SIZE_UNIT
|
||||
ROUND_TYPE_SIZE_UNIT CONST_SECTION_ASM_OP CRT_GET_RFIB_TEXT \
|
||||
DBX_LBRAC_FIRST DBX_OUTPUT_ENUM DBX_OUTPUT_SOURCE_FILENAME \
|
||||
DBX_WORKING_DIRECTORY INSN_CACHE_DEPTH INSN_CACHE_SIZE \
|
||||
INSN_CACHE_LINE_WIDTH TDESC_SECTION_ASM_OP RDATA_SECTION_ASM_OP \
|
||||
SUBTARGET_PROLOGUE
|
||||
|
||||
/* Hooks that are no longer used. */
|
||||
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \
|
||||
|
|
Loading…
Add table
Reference in a new issue