Commit b1474bb7 by Kaveh R. Ghazi Committed by Kaveh Ghazi

calls.c: Include tm_p.h later, so everything we need is defined.

        * calls.c: Include tm_p.h later, so everything we need is defined.
        * expr.c: Likewise.
        * function.c: Likewise.

        * except.c: Include tm_p.h.

        * sparc.c: Likewise.
        (dwarf2out_cfi_label): Don't prototype.
        (check_return_regs, epilogue_renumber,
        ultra_cmove_results_ready_p, ultra_fpmode_conflict_exists,
        ultra_find_type, ultra_build_types_avail, ultra_flush_pipeline,
        ultra_rescan_pipeline_state, set_extends, ultra_code_from_mask,
        ultra_schedule_insn): Add static prototype.
        (data_segment_operand, text_segment_operand): Call itself with the
        proper number of arguments.
        (sparc_flat_save_restore, sparc_v8plus_shift): Constify a char*.

        * sparc.h: Move all declarations to sparc-protos.h.
        (SELECT_RTX_SECTION):  Pass a missing MODE argument to
        symbolic_operand.

        * sparc/sysv4.h (SELECT_RTX_SECTION): Likewise.

        * config/svr4.h (text_section, ctors_section, dtors_section): Add
        Prototypes.
        (ASM_OUTPUT_SECTION_NAME, UNIQUE_SECTION,
        ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING,
        ASM_OUTPUT_ASCII): Constify a char*.

        * sparc-protos.h: New file for sparc prototypes.

cp:
        * expr.c: Include tm_p.h.

From-SVN: r30122
parent ec97b83a
Thu Oct 21 12:49:05 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* calls.c: Include tm_p.h later, so everything we need is defined.
* expr.c: Likewise.
* function.c: Likewise.
* except.c: Include tm_p.h.
* sparc.c: Likewise.
(dwarf2out_cfi_label): Don't prototype.
(check_return_regs, epilogue_renumber,
ultra_cmove_results_ready_p, ultra_fpmode_conflict_exists,
ultra_find_type, ultra_build_types_avail, ultra_flush_pipeline,
ultra_rescan_pipeline_state, set_extends, ultra_code_from_mask,
ultra_schedule_insn): Add static prototype.
(data_segment_operand, text_segment_operand): Call itself with the
proper number of arguments.
(sparc_flat_save_restore, sparc_v8plus_shift): Constify a char*.
* sparc.h: Move all declarations to sparc-protos.h.
(SELECT_RTX_SECTION): Pass a missing MODE argument to
symbolic_operand.
* sparc/sysv4.h (SELECT_RTX_SECTION): Likewise.
* config/svr4.h (text_section, ctors_section, dtors_section): Add
Prototypes.
(ASM_OUTPUT_SECTION_NAME, UNIQUE_SECTION,
ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING,
ASM_OUTPUT_ASCII): Constify a char*.
* sparc-protos.h: New file for sparc prototypes.
Thu Oct 21 12:23:40 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> Thu Oct 21 12:23:40 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* function.c (record_insns, contains): Always declare and define. * function.c (record_insns, contains): Always declare and define.
......
...@@ -22,7 +22,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -22,7 +22,6 @@ Boston, MA 02111-1307, USA. */
#include "system.h" #include "system.h"
#include "rtl.h" #include "rtl.h"
#include "tree.h" #include "tree.h"
#include "tm_p.h"
#include "flags.h" #include "flags.h"
#include "expr.h" #include "expr.h"
#include "function.h" #include "function.h"
...@@ -30,6 +29,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -30,6 +29,7 @@ Boston, MA 02111-1307, USA. */
#include "insn-flags.h" #include "insn-flags.h"
#include "toplev.h" #include "toplev.h"
#include "output.h" #include "output.h"
#include "tm_p.h"
#if !defined PREFERRED_STACK_BOUNDARY && defined STACK_BOUNDARY #if !defined PREFERRED_STACK_BOUNDARY && defined STACK_BOUNDARY
#define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY #define PREFERRED_STACK_BOUNDARY STACK_BOUNDARY
......
/* Prototypes of target machine for GNU compiler, for Sun SPARC.
Copyright (C) 1987, 88, 89, 92, 94-98, 1999 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com).
64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
at Cygnus Support.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef __SPARC_PROTOS_H__
#define __SPARC_PROTOS_H__
#ifdef TREE_CODE
extern struct rtx_def *function_value PARAMS ((tree, enum machine_mode, int));
extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, tree, int));
extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *,
enum machine_mode, tree, int));
extern struct rtx_def *function_arg PARAMS ((const CUMULATIVE_ARGS *,
enum machine_mode,
tree, int, int));
extern int function_arg_partial_nregs PARAMS ((const CUMULATIVE_ARGS *,
enum machine_mode,
tree, int));
extern int function_arg_pass_by_reference PARAMS ((const CUMULATIVE_ARGS *,
enum machine_mode,
tree, int));
extern struct rtx_def *sparc_builtin_saveregs PARAMS ((void));
#ifdef RTX_CODE
extern void sparc_va_start PARAMS ((int, tree, rtx));
#endif
extern struct rtx_def *sparc_va_arg PARAMS ((tree, tree));
extern unsigned long sparc_type_code PARAMS ((tree));
#ifdef ARGS_SIZE_RTX
/* expr.h defines ARGS_SIZE_RTX and `enum direction' */
extern enum direction function_arg_padding PARAMS ((enum machine_mode, tree));
#endif /* ARGS_SIZE_RTX */
#endif /* TREE_CODE */
extern void ultrasparc_sched_init PARAMS ((FILE *, int));
extern void finalize_pic PARAMS ((void));
extern void order_regs_for_local_alloc PARAMS ((void));
extern void output_function_epilogue PARAMS ((FILE *, int, int));
extern void output_function_prologue PARAMS ((FILE *, int, int));
extern void sparc_flat_output_function_epilogue PARAMS ((FILE *, int));
extern void sparc_flat_output_function_prologue PARAMS ((FILE *, int));
extern int compute_frame_size PARAMS ((int, int));
extern int check_pic PARAMS ((int));
extern int short_branch PARAMS ((int, int));
extern int sparc_flat_epilogue_delay_slots PARAMS ((void));
extern int sparc_issue_rate PARAMS ((void));
extern unsigned long sparc_flat_compute_frame_size PARAMS ((int));
extern void sparc_function_profiler PARAMS ((FILE *, int));
extern void sparc_function_block_profiler PARAMS ((FILE *, int));
extern void sparc_block_profiler PARAMS ((FILE *, int));
extern void sparc_function_block_profiler_exit PARAMS ((FILE *));
extern int compute_frame_size PARAMS ((int, int));
extern void sparc_override_options PARAMS ((void));
extern int leaf_return_peephole_ok PARAMS ((void));
extern void sparc_output_scratch_registers PARAMS ((FILE *));
extern void sparc_flat_save_restore PARAMS ((FILE *, const char *,
unsigned int, unsigned long,
unsigned long, const char *,
const char *, unsigned long));
#ifdef RTX_CODE
/* Define the function that build the compare insn for scc and bcc. */
extern rtx gen_compare_reg PARAMS ((enum rtx_code code, rtx, rtx));
/* This function handles all v9 scc insns */
extern int gen_v9_scc PARAMS ((enum rtx_code, rtx *));
extern void sparc_initialize_trampoline PARAMS ((rtx, rtx, rtx));
extern void sparc64_initialize_trampoline PARAMS ((rtx, rtx, rtx));
extern rtx legitimize_pic_address PARAMS ((rtx, enum machine_mode, rtx));
extern void ultrasparc_sched_reorder PARAMS ((FILE *, int, rtx *, int));
extern int ultrasparc_variable_issue PARAMS ((rtx));
extern void sparc_defer_case_vector PARAMS ((rtx, rtx, int));
extern void sparc_emit_set_const32 PARAMS ((rtx, rtx));
extern void sparc_emit_set_const64 PARAMS ((rtx, rtx));
extern void sparc_emit_set_symbolic_const64 PARAMS ((rtx, rtx, rtx));
extern int sparc_splitdi_legitimate PARAMS ((rtx, rtx));
extern int sparc_absnegfloat_split_legitimate PARAMS ((rtx, rtx));
extern char *output_cbranch PARAMS ((rtx, int, int, int, int, rtx));
extern const char *output_return PARAMS ((rtx *));
extern char *output_v9branch PARAMS ((rtx, int, int, int, int, int, rtx));
extern void emit_v9_brxx_insn PARAMS ((enum rtx_code, rtx, rtx));
extern void output_double_int PARAMS ((FILE *, rtx));
extern void print_operand PARAMS ((FILE *, rtx, int));
extern int addrs_ok_for_ldd_peep PARAMS ((rtx, rtx));
extern int arith10_double_operand PARAMS ((rtx, enum machine_mode));
extern int arith10_operand PARAMS ((rtx, enum machine_mode));
extern int arith11_double_operand PARAMS ((rtx, enum machine_mode));
extern int arith11_operand PARAMS ((rtx, enum machine_mode));
extern int arith_double_operand PARAMS ((rtx, enum machine_mode));
extern int arith_double_4096_operand PARAMS ((rtx, enum machine_mode));
extern int arith_double_add_operand PARAMS ((rtx, enum machine_mode));
extern int arith_operand PARAMS ((rtx, enum machine_mode));
extern int arith_4096_operand PARAMS ((rtx, enum machine_mode));
extern int arith_add_operand PARAMS ((rtx, enum machine_mode));
extern int call_operand_address PARAMS ((rtx, enum machine_mode));
extern int input_operand PARAMS ((rtx, enum machine_mode));
extern int zero_operand PARAMS ((rtx, enum machine_mode));
extern int const64_operand PARAMS ((rtx, enum machine_mode));
extern int const64_high_operand PARAMS ((rtx, enum machine_mode));
extern int cc_arithop PARAMS ((rtx, enum machine_mode));
extern int cc_arithopn PARAMS ((rtx, enum machine_mode));
extern int data_segment_operand PARAMS ((rtx, enum machine_mode));
extern int eligible_for_epilogue_delay PARAMS ((rtx, int));
extern int eligible_for_return_delay PARAMS ((rtx));
extern int emit_move_sequence PARAMS ((rtx, enum machine_mode));
extern int extend_op PARAMS ((rtx, enum machine_mode));
extern int fcc_reg_operand PARAMS ((rtx, enum machine_mode));
extern int fp_zero_operand PARAMS ((rtx));
extern int icc_or_fcc_reg_operand PARAMS ((rtx, enum machine_mode));
extern int label_ref_operand PARAMS ((rtx, enum machine_mode));
extern int mem_min_alignment PARAMS ((rtx, int));
extern int noov_compare_op PARAMS ((rtx, enum machine_mode));
extern int pic_address_needs_scratch PARAMS ((rtx));
extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode));
extern int reg_or_nonsymb_mem_operand PARAMS ((rtx, enum machine_mode));
extern int reg_unused_after PARAMS ((rtx, rtx));
extern int register_ok_for_ldd PARAMS ((rtx));
extern int registers_ok_for_ldd_peep PARAMS ((rtx, rtx));
extern int restore_operand PARAMS ((rtx, enum machine_mode));
extern int small_int PARAMS ((rtx, enum machine_mode));
extern int small_int_or_double PARAMS ((rtx, enum machine_mode));
extern int sp64_medium_pic_operand PARAMS ((rtx, enum machine_mode));
extern int sparc_flat_eligible_for_epilogue_delay PARAMS ((rtx, int));
extern int splittable_immediate_memory_operand PARAMS ((rtx, enum machine_mode));
extern int splittable_symbolic_memory_operand PARAMS ((rtx, enum machine_mode));
extern int sparc_adjust_cost PARAMS ((rtx, rtx, rtx, int));
extern int symbolic_memory_operand PARAMS ((rtx, enum machine_mode));
extern int symbolic_operand PARAMS ((rtx, enum machine_mode));
extern int text_segment_operand PARAMS ((rtx, enum machine_mode));
extern int uns_small_int PARAMS ((rtx, enum machine_mode));
extern int v9_regcmp_op PARAMS ((rtx, enum machine_mode));
extern int v9_regcmp_p PARAMS ((enum rtx_code));
extern char *sparc_v8plus_shift PARAMS ((rtx *, rtx, const char *));
/* Function used for V8+ code generation. Returns 1 if the high
32 bits of REG are 0 before INSN. */
extern int sparc_check_64 PARAMS ((rtx, rtx));
extern int sparc_return_peephole_ok PARAMS ((rtx, rtx));
extern int intreg_operand PARAMS ((rtx, enum machine_mode));
extern int call_operand PARAMS ((rtx, enum machine_mode));
extern int eq_or_neq PARAMS ((rtx, enum machine_mode));
extern int normal_comp_operator PARAMS ((rtx, enum machine_mode));
extern int uns_arith_operand PARAMS ((rtx, enum machine_mode));
extern int clobbered_register PARAMS ((rtx, enum machine_mode));
#endif /* RTX_CODE */
#endif /* __SPARC_PROTOS_H__ */
...@@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -39,6 +39,7 @@ Boston, MA 02111-1307, USA. */
#include "recog.h" #include "recog.h"
#include "toplev.h" #include "toplev.h"
#include "ggc.h" #include "ggc.h"
#include "tm_p.h"
/* 1 if the caller has placed an "unimp" insn immediately after the call. /* 1 if the caller has placed an "unimp" insn immediately after the call.
This is used in v8 code when calling a function that returns a structure. This is used in v8 code when calling a function that returns a structure.
...@@ -122,10 +123,15 @@ static void sparc_output_addr_diff_vec PROTO((rtx)); ...@@ -122,10 +123,15 @@ static void sparc_output_addr_diff_vec PROTO((rtx));
static void sparc_output_deferred_case_vectors PROTO((void)); static void sparc_output_deferred_case_vectors PROTO((void));
static void sparc_add_gc_roots PROTO ((void)); static void sparc_add_gc_roots PROTO ((void));
static void mark_ultrasparc_pipeline_state PROTO ((void *)); static void mark_ultrasparc_pipeline_state PROTO ((void *));
static int check_return_regs PROTO ((rtx));
#ifdef DWARF2_DEBUGGING_INFO static void epilogue_renumber PROTO ((rtx *));
extern char *dwarf2out_cfi_label (); static int ultra_cmove_results_ready_p PROTO ((rtx));
#endif static int ultra_fpmode_conflict_exists PROTO ((enum machine_mode));
static rtx *ultra_find_type PROTO ((int, rtx *, int));
static void ultra_build_types_avail PROTO ((rtx *, int));
static void ultra_flush_pipeline PROTO ((void));
static void ultra_rescan_pipeline_state PROTO ((rtx *, int));
static int set_extends PROTO ((rtx, rtx));
/* Option handling. */ /* Option handling. */
...@@ -586,7 +592,7 @@ data_segment_operand (op, mode) ...@@ -586,7 +592,7 @@ data_segment_operand (op, mode)
/* Assume canonical format of symbol + constant. /* Assume canonical format of symbol + constant.
Fall through. */ Fall through. */
case CONST : case CONST :
return data_segment_operand (XEXP (op, 0)); return data_segment_operand (XEXP (op, 0), VOIDmode);
default : default :
return 0; return 0;
} }
...@@ -610,7 +616,7 @@ text_segment_operand (op, mode) ...@@ -610,7 +616,7 @@ text_segment_operand (op, mode)
/* Assume canonical format of symbol + constant. /* Assume canonical format of symbol + constant.
Fall through. */ Fall through. */
case CONST : case CONST :
return text_segment_operand (XEXP (op, 0)); return text_segment_operand (XEXP (op, 0), VOIDmode);
default : default :
return 0; return 0;
} }
...@@ -3615,6 +3621,8 @@ static void function_arg_record_value_3 ...@@ -3615,6 +3621,8 @@ static void function_arg_record_value_3
PROTO((int, struct function_arg_record_value_parms *)); PROTO((int, struct function_arg_record_value_parms *));
static void function_arg_record_value_2 static void function_arg_record_value_2
PROTO((tree, int, struct function_arg_record_value_parms *)); PROTO((tree, int, struct function_arg_record_value_parms *));
static void function_arg_record_value_1
PROTO((tree, int, struct function_arg_record_value_parms *));
static rtx function_arg_record_value static rtx function_arg_record_value
PROTO((tree, enum machine_mode, int, int, int)); PROTO((tree, enum machine_mode, int, int, int));
...@@ -5821,12 +5829,12 @@ void ...@@ -5821,12 +5829,12 @@ void
sparc_flat_save_restore (file, base_reg, offset, gmask, fmask, word_op, sparc_flat_save_restore (file, base_reg, offset, gmask, fmask, word_op,
doubleword_op, base_offset) doubleword_op, base_offset)
FILE *file; FILE *file;
char *base_reg; const char *base_reg;
unsigned int offset; unsigned int offset;
unsigned long gmask; unsigned long gmask;
unsigned long fmask; unsigned long fmask;
char *word_op; const char *word_op;
char *doubleword_op; const char *doubleword_op;
unsigned long base_offset; unsigned long base_offset;
{ {
int regno; int regno;
...@@ -6632,6 +6640,9 @@ enum ultra_code { NONE=0, /* no insn at all */ ...@@ -6632,6 +6640,9 @@ enum ultra_code { NONE=0, /* no insn at all */
SINGLE, /* single issue instructions */ SINGLE, /* single issue instructions */
NUM_ULTRA_CODES }; NUM_ULTRA_CODES };
static enum ultra_code ultra_code_from_mask PROTO ((int));
static void ultra_schedule_insn PROTO ((rtx *, rtx *, int, enum ultra_code));
static const char *ultra_code_names[NUM_ULTRA_CODES] = { static const char *ultra_code_names[NUM_ULTRA_CODES] = {
"NONE", "IEU0", "IEU1", "IEUN", "LSU", "CTI", "NONE", "IEU0", "IEU1", "IEUN", "LSU", "CTI",
"FPM", "FPA", "SINGLE" }; "FPM", "FPA", "SINGLE" };
...@@ -7569,7 +7580,7 @@ char * ...@@ -7569,7 +7580,7 @@ char *
sparc_v8plus_shift (operands, insn, opcode) sparc_v8plus_shift (operands, insn, opcode)
rtx *operands; rtx *operands;
rtx insn; rtx insn;
char *opcode; const char *opcode;
{ {
static char asm_code[60]; static char asm_code[60];
......
...@@ -382,8 +382,6 @@ Unrecognized value in TARGET_CPU_DEFAULT. ...@@ -382,8 +382,6 @@ Unrecognized value in TARGET_CPU_DEFAULT.
code into the rtl. Also, if we are profiling, we cannot eliminate code into the rtl. Also, if we are profiling, we cannot eliminate
the frame pointer (because the return address will get smashed). */ the frame pointer (because the return address will get smashed). */
void sparc_override_options ();
#define OVERRIDE_OPTIONS \ #define OVERRIDE_OPTIONS \
do { \ do { \
if (profile_flag || profile_block_flag || profile_arc_flag) \ if (profile_flag || profile_block_flag || profile_arc_flag) \
...@@ -868,7 +866,7 @@ if (TARGET_ARCH64 \ ...@@ -868,7 +866,7 @@ if (TARGET_ARCH64 \
#define SELECT_RTX_SECTION(MODE, X) \ #define SELECT_RTX_SECTION(MODE, X) \
{ \ { \
if (GET_MODE_BITSIZE (MODE) <= MAX_TEXT_ALIGN \ if (GET_MODE_BITSIZE (MODE) <= MAX_TEXT_ALIGN \
&& ! (flag_pic && (symbolic_operand (X) || SUNOS4_SHARED_LIBRARIES))) \ && ! (flag_pic && (symbolic_operand ((X), (MODE)) || SUNOS4_SHARED_LIBRARIES))) \
text_section (); \ text_section (); \
else \ else \
data_section (); \ data_section (); \
...@@ -1643,7 +1641,6 @@ extern char leaf_reg_remap[]; ...@@ -1643,7 +1641,6 @@ extern char leaf_reg_remap[];
/* On SPARC the value is found in the first "output" register. */ /* On SPARC the value is found in the first "output" register. */
extern struct rtx_def *function_value ();
#define FUNCTION_VALUE(VALTYPE, FUNC) \ #define FUNCTION_VALUE(VALTYPE, FUNC) \
function_value ((VALTYPE), TYPE_MODE (VALTYPE), 1) function_value ((VALTYPE), TYPE_MODE (VALTYPE), 1)
...@@ -1702,7 +1699,6 @@ struct sparc_args { ...@@ -1702,7 +1699,6 @@ struct sparc_args {
for a call to a function whose data type is FNTYPE. for a call to a function whose data type is FNTYPE.
For a library call, FNTYPE is 0. */ For a library call, FNTYPE is 0. */
extern void init_cumulative_args ();
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \ #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \
init_cumulative_args (& (CUM), (FNTYPE), (LIBNAME), (INDIRECT)); init_cumulative_args (& (CUM), (FNTYPE), (LIBNAME), (INDIRECT));
...@@ -1710,7 +1706,6 @@ init_cumulative_args (& (CUM), (FNTYPE), (LIBNAME), (INDIRECT)); ...@@ -1710,7 +1706,6 @@ init_cumulative_args (& (CUM), (FNTYPE), (LIBNAME), (INDIRECT));
of mode MODE and data type TYPE. of mode MODE and data type TYPE.
TYPE is null for libcalls where that information may not be available. */ TYPE is null for libcalls where that information may not be available. */
extern void function_arg_advance ();
#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
function_arg_advance (& (CUM), (MODE), (TYPE), (NAMED)) function_arg_advance (& (CUM), (MODE), (TYPE), (NAMED))
...@@ -1727,7 +1722,6 @@ function_arg_advance (& (CUM), (MODE), (TYPE), (NAMED)) ...@@ -1727,7 +1722,6 @@ function_arg_advance (& (CUM), (MODE), (TYPE), (NAMED))
NAMED is nonzero if this argument is a named parameter NAMED is nonzero if this argument is a named parameter
(otherwise it is an extra parameter matching an ellipsis). */ (otherwise it is an extra parameter matching an ellipsis). */
extern struct rtx_def *function_arg ();
#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
function_arg (& (CUM), (MODE), (TYPE), (NAMED), 0) function_arg (& (CUM), (MODE), (TYPE), (NAMED), 0)
...@@ -1741,7 +1735,6 @@ function_arg (& (CUM), (MODE), (TYPE), (NAMED), 1) ...@@ -1741,7 +1735,6 @@ function_arg (& (CUM), (MODE), (TYPE), (NAMED), 1)
this is the number of registers used. this is the number of registers used.
For args passed entirely in registers or entirely in memory, zero. */ For args passed entirely in registers or entirely in memory, zero. */
extern int function_arg_partial_nregs ();
#define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
function_arg_partial_nregs (& (CUM), (MODE), (TYPE), (NAMED)) function_arg_partial_nregs (& (CUM), (MODE), (TYPE), (NAMED))
...@@ -1751,7 +1744,6 @@ function_arg_partial_nregs (& (CUM), (MODE), (TYPE), (NAMED)) ...@@ -1751,7 +1744,6 @@ function_arg_partial_nregs (& (CUM), (MODE), (TYPE), (NAMED))
The pointer is passed in whatever way is appropriate for passing a pointer The pointer is passed in whatever way is appropriate for passing a pointer
to that type. */ to that type. */
extern int function_arg_pass_by_reference ();
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \ #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
function_arg_pass_by_reference (& (CUM), (MODE), (TYPE), (NAMED)) function_arg_pass_by_reference (& (CUM), (MODE), (TYPE), (NAMED))
...@@ -1780,13 +1772,6 @@ function_arg_padding ((MODE), (TYPE)) ...@@ -1780,13 +1772,6 @@ function_arg_padding ((MODE), (TYPE))
extern struct rtx_def *sparc_compare_op0, *sparc_compare_op1; extern struct rtx_def *sparc_compare_op0, *sparc_compare_op1;
/* Define the function that build the compare insn for scc and bcc. */
extern struct rtx_def *gen_compare_reg ();
/* This function handles all v9 scc insns */
extern int gen_v9_scc ();
/* Generate the special assembly code needed to tell the assembler whatever /* Generate the special assembly code needed to tell the assembler whatever
it might need to know about the return value of a function. it might need to know about the return value of a function.
...@@ -2032,8 +2017,6 @@ LFLGRET"ID":\n\ ...@@ -2032,8 +2017,6 @@ LFLGRET"ID":\n\
FNADDR is an RTX for the address of the function's pure code. FNADDR is an RTX for the address of the function's pure code.
CXT is an RTX for the static chain value for the function. */ CXT is an RTX for the static chain value for the function. */
void sparc_initialize_trampoline ();
void sparc64_initialize_trampoline ();
#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \ #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
if (TARGET_ARCH64) \ if (TARGET_ARCH64) \
sparc64_initialize_trampoline (TRAMP, FNADDR, CXT); \ sparc64_initialize_trampoline (TRAMP, FNADDR, CXT); \
...@@ -2042,15 +2025,12 @@ void sparc64_initialize_trampoline (); ...@@ -2042,15 +2025,12 @@ void sparc64_initialize_trampoline ();
/* Generate necessary RTL for __builtin_saveregs(). */ /* Generate necessary RTL for __builtin_saveregs(). */
extern struct rtx_def *sparc_builtin_saveregs ();
#define EXPAND_BUILTIN_SAVEREGS() sparc_builtin_saveregs () #define EXPAND_BUILTIN_SAVEREGS() sparc_builtin_saveregs ()
extern void sparc_va_start ();
/* Implement `va_start' for varargs and stdarg. */ /* Implement `va_start' for varargs and stdarg. */
#define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \
sparc_va_start (stdarg, valist, nextarg) sparc_va_start (stdarg, valist, nextarg)
extern struct rtx_def *sparc_va_arg ();
/* Implement `va_arg'. */ /* Implement `va_arg'. */
#define EXPAND_BUILTIN_VA_ARG(valist, type) \ #define EXPAND_BUILTIN_VA_ARG(valist, type) \
sparc_va_arg (valist, type) sparc_va_arg (valist, type)
...@@ -2385,7 +2365,6 @@ extern struct rtx_def *sparc_va_arg (); ...@@ -2385,7 +2365,6 @@ extern struct rtx_def *sparc_va_arg ();
opportunities to optimize the output. */ opportunities to optimize the output. */
/* On SPARC, change REG+N into REG+REG, and REG+(X*Y) into REG+REG. */ /* On SPARC, change REG+N into REG+REG, and REG+(X*Y) into REG+REG. */
extern struct rtx_def *legitimize_pic_address ();
#define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \ #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \
{ rtx sparc_x = (X); \ { rtx sparc_x = (X); \
if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == MULT) \ if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == MULT) \
...@@ -2745,10 +2724,6 @@ do { \ ...@@ -2745,10 +2724,6 @@ do { \
#define ADJUST_COST(INSN,LINK,DEP,COST) \ #define ADJUST_COST(INSN,LINK,DEP,COST) \
sparc_adjust_cost(INSN, LINK, DEP, COST) sparc_adjust_cost(INSN, LINK, DEP, COST)
extern void ultrasparc_sched_reorder ();
extern void ultrasparc_sched_init ();
extern int ultrasparc_variable_issue ();
#define MD_SCHED_INIT(DUMP, SCHED_VERBOSE) \ #define MD_SCHED_INIT(DUMP, SCHED_VERBOSE) \
if (sparc_cpu == PROCESSOR_ULTRASPARC) \ if (sparc_cpu == PROCESSOR_ULTRASPARC) \
ultrasparc_sched_init (DUMP, SCHED_VERBOSE) ultrasparc_sched_init (DUMP, SCHED_VERBOSE)
...@@ -2971,8 +2946,6 @@ do { \ ...@@ -2971,8 +2946,6 @@ do { \
/* This is how we hook in and defer the case-vector until the end of /* This is how we hook in and defer the case-vector until the end of
the function. */ the function. */
extern void sparc_defer_case_vector ();
#define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \ #define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \
sparc_defer_case_vector ((LAB),(VEC), 0) sparc_defer_case_vector ((LAB),(VEC), 0)
...@@ -3277,101 +3250,6 @@ do { \ ...@@ -3277,101 +3250,6 @@ do { \
#define DONT_ACCESS_GBLS_AFTER_EPILOGUE (flag_pic) #define DONT_ACCESS_GBLS_AFTER_EPILOGUE (flag_pic)
/* Declare functions defined in sparc.c and used in templates. */
extern void sparc_emit_set_const32 ();
extern void sparc_emit_set_const64 ();
extern void sparc_emit_set_symbolic_const64 ();
extern int sparc_splitdi_legitimate ();
extern int sparc_absnegfloat_split_legitimate ();
extern char *output_cbranch ();
extern const char *output_return ();
extern char *output_v9branch ();
extern void emit_v9_brxx_insn ();
extern void finalize_pic ();
extern void order_regs_for_local_alloc ();
extern void output_double_int ();
extern void output_function_epilogue ();
extern void output_function_prologue ();
extern void print_operand ();
extern void sparc_flat_output_function_epilogue ();
extern void sparc_flat_output_function_prologue ();
extern int addrs_ok_for_ldd_peep ();
extern int arith10_double_operand ();
extern int arith10_operand ();
extern int arith11_double_operand ();
extern int arith11_operand ();
extern int arith_double_operand ();
extern int arith_double_4096_operand ();
extern int arith_double_add_operand ();
extern int arith_operand ();
extern int arith_4096_operand ();
extern int arith_add_operand ();
extern int call_operand_address ();
extern int input_operand ();
extern int zero_operand ();
extern int const64_operand ();
extern int const64_high_operand ();
extern int cc_arithop ();
extern int cc_arithopn ();
extern int check_pic ();
extern int compute_frame_size ();
extern int data_segment_operand ();
extern int eligible_for_epilogue_delay ();
extern int eligible_for_return_delay ();
extern int emit_move_sequence ();
extern int extend_op ();
extern int fcc_reg_operand ();
extern int fp_zero_operand ();
extern int icc_or_fcc_reg_operand ();
extern int label_ref_operand ();
extern int mem_min_alignment ();
extern int noov_compare_op ();
extern int pic_address_needs_scratch ();
extern int reg_or_0_operand ();
extern int reg_or_nonsymb_mem_operand ();
extern int reg_unused_after ();
extern int register_ok_for_ldd ();
extern int registers_ok_for_ldd_peep ();
extern int restore_operand ();
extern int short_branch ();
extern int small_int ();
extern int small_int_or_double ();
extern int sp64_medium_pic_operand ();
extern int sparc_flat_eligible_for_epilogue_delay ();
extern int sparc_flat_epilogue_delay_slots ();
extern int sparc_issue_rate ();
extern int splittable_immediate_memory_operand ();
extern int splittable_symbolic_memory_operand ();
extern int sparc_adjust_cost ();
extern int symbolic_memory_operand ();
extern int symbolic_operand ();
extern int text_segment_operand ();
extern int uns_small_int ();
extern int v9_regcmp_op ();
extern int v9_regcmp_p ();
extern unsigned long sparc_flat_compute_frame_size ();
extern unsigned long sparc_type_code ();
extern void sparc_function_profiler ();
extern void sparc_function_block_profiler ();
extern void sparc_block_profiler ();
extern void sparc_function_block_profiler_exit ();
extern char *sparc_v8plus_shift ();
#ifdef __STDC__
/* Function used for V8+ code generation. Returns 1 if the high
32 bits of REG are 0 before INSN. */
extern int sparc_check_64 (struct rtx_def *, struct rtx_def *);
extern int sparc_return_peephole_ok (struct rtx_def *, struct rtx_def *);
extern int compute_frame_size (int, int);
#endif
/* Defined in flags.h, but insn-emit.c does not include flags.h. */ /* Defined in flags.h, but insn-emit.c does not include flags.h. */
extern int flag_pic; extern int flag_pic;
...@@ -80,7 +80,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -80,7 +80,7 @@ Boston, MA 02111-1307, USA. */
#undef SELECT_RTX_SECTION #undef SELECT_RTX_SECTION
#define SELECT_RTX_SECTION(MODE,RTX) \ #define SELECT_RTX_SECTION(MODE,RTX) \
{ \ { \
if (flag_pic && symbolic_operand (RTX)) \ if (flag_pic && symbolic_operand ((RTX), (MODE))) \
data_section (); \ data_section (); \
else \ else \
const_section (); \ const_section (); \
......
...@@ -486,8 +486,9 @@ do { \ ...@@ -486,8 +486,9 @@ do { \
#define READONLY_DATA_SECTION() const_section () #define READONLY_DATA_SECTION() const_section ()
extern void text_section (); extern void text_section PARAMS ((void));
extern void const_section PARAMS ((void));
#define CONST_SECTION_FUNCTION \ #define CONST_SECTION_FUNCTION \
void \ void \
const_section () \ const_section () \
...@@ -501,6 +502,7 @@ const_section () \ ...@@ -501,6 +502,7 @@ const_section () \
} \ } \
} }
extern void ctors_section PARAMS ((void));
#define CTORS_SECTION_FUNCTION \ #define CTORS_SECTION_FUNCTION \
void \ void \
ctors_section () \ ctors_section () \
...@@ -512,6 +514,7 @@ ctors_section () \ ...@@ -512,6 +514,7 @@ ctors_section () \
} \ } \
} }
extern void dtors_section PARAMS ((void));
#define DTORS_SECTION_FUNCTION \ #define DTORS_SECTION_FUNCTION \
void \ void \
dtors_section () \ dtors_section () \
...@@ -542,7 +545,7 @@ do { \ ...@@ -542,7 +545,7 @@ do { \
enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \ enum sect_enum {SECT_RW, SECT_RO, SECT_EXEC} type; \
} *sections; \ } *sections; \
struct section_info *s; \ struct section_info *s; \
char *mode; \ const char *mode; \
enum sect_enum type; \ enum sect_enum type; \
\ \
for (s = sections; s; s = s->next) \ for (s = sections; s; s = s->next) \
...@@ -580,7 +583,8 @@ do { \ ...@@ -580,7 +583,8 @@ do { \
#define UNIQUE_SECTION(DECL,RELOC) \ #define UNIQUE_SECTION(DECL,RELOC) \
do { \ do { \
int len; \ int len; \
char *name, *string, *prefix; \ const char *name, *prefix; \
char *string; \
\ \
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \ name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \
\ \
...@@ -745,7 +749,7 @@ do { \ ...@@ -745,7 +749,7 @@ do { \
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \ #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
do { \ do { \
char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \ const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \ if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
&& ! AT_END && TOP_LEVEL \ && ! AT_END && TOP_LEVEL \
&& DECL_INITIAL (DECL) == error_mark_node \ && DECL_INITIAL (DECL) == error_mark_node \
...@@ -832,7 +836,8 @@ do { \ ...@@ -832,7 +836,8 @@ do { \
#define ASM_OUTPUT_LIMITED_STRING(FILE, STR) \ #define ASM_OUTPUT_LIMITED_STRING(FILE, STR) \
do \ do \
{ \ { \
register unsigned char *_limited_str = (unsigned char *) (STR); \ register const unsigned char *_limited_str = \
(const unsigned char *) (STR); \
register unsigned ch; \ register unsigned ch; \
fprintf ((FILE), "\t%s\t\"", STRING_ASM_OP); \ fprintf ((FILE), "\t%s\t\"", STRING_ASM_OP); \
for (; (ch = *_limited_str); _limited_str++) \ for (; (ch = *_limited_str); _limited_str++) \
...@@ -867,12 +872,13 @@ do { \ ...@@ -867,12 +872,13 @@ do { \
#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \ #define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \
do \ do \
{ \ { \
register unsigned char *_ascii_bytes = (unsigned char *) (STR); \ register const unsigned char *_ascii_bytes = \
register unsigned char *limit = _ascii_bytes + (LENGTH); \ (const unsigned char *) (STR); \
register const unsigned char *limit = _ascii_bytes + (LENGTH); \
register unsigned bytes_in_chunk = 0; \ register unsigned bytes_in_chunk = 0; \
for (; _ascii_bytes < limit; _ascii_bytes++) \ for (; _ascii_bytes < limit; _ascii_bytes++) \
{ \ { \
register unsigned char *p; \ register const unsigned char *p; \
if (bytes_in_chunk >= 60) \ if (bytes_in_chunk >= 60) \
{ \ { \
fprintf ((FILE), "\"\n"); \ fprintf ((FILE), "\"\n"); \
......
1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* expr.c: Include tm_p.h.
1999-10-21 Mark Mitchell <mark@codesourcery.com> 1999-10-21 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (SCOPE_PARTIAL_P): New macro. * cp-tree.h (SCOPE_PARTIAL_P): New macro.
......
...@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA. */
#include "cp-tree.h" #include "cp-tree.h"
#include "toplev.h" #include "toplev.h"
#include "except.h" #include "except.h"
#include "tm_p.h"
#if 0 #if 0
static tree extract_aggr_init PROTO((tree, tree)); static tree extract_aggr_init PROTO((tree, tree));
......
...@@ -409,6 +409,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -409,6 +409,7 @@ Boston, MA 02111-1307, USA. */
#include "intl.h" #include "intl.h"
#include "obstack.h" #include "obstack.h"
#include "ggc.h" #include "ggc.h"
#include "tm_p.h"
/* One to use setjmp/longjmp method of generating code for exception /* One to use setjmp/longjmp method of generating code for exception
handling. */ handling. */
......
...@@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -24,7 +24,6 @@ Boston, MA 02111-1307, USA. */
#include "machmode.h" #include "machmode.h"
#include "rtl.h" #include "rtl.h"
#include "tree.h" #include "tree.h"
#include "tm_p.h"
#include "obstack.h" #include "obstack.h"
#include "flags.h" #include "flags.h"
#include "regs.h" #include "regs.h"
...@@ -42,6 +41,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,6 +41,7 @@ Boston, MA 02111-1307, USA. */
#include "defaults.h" #include "defaults.h"
#include "toplev.h" #include "toplev.h"
#include "ggc.h" #include "ggc.h"
#include "tm_p.h"
#define CEIL(x,y) (((x) + (y) - 1) / (y)) #define CEIL(x,y) (((x) + (y) - 1) / (y))
......
...@@ -42,7 +42,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -42,7 +42,6 @@ Boston, MA 02111-1307, USA. */
#include "system.h" #include "system.h"
#include "rtl.h" #include "rtl.h"
#include "tree.h" #include "tree.h"
#include "tm_p.h"
#include "flags.h" #include "flags.h"
#include "except.h" #include "except.h"
#include "function.h" #include "function.h"
...@@ -59,6 +58,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -59,6 +58,7 @@ Boston, MA 02111-1307, USA. */
#include "toplev.h" #include "toplev.h"
#include "hash.h" #include "hash.h"
#include "ggc.h" #include "ggc.h"
#include "tm_p.h"
#ifndef TRAMPOLINE_ALIGNMENT #ifndef TRAMPOLINE_ALIGNMENT
#define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY #define TRAMPOLINE_ALIGNMENT FUNCTION_BOUNDARY
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment