diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2000-01-11 18:37:11 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2000-01-11 18:37:11 +0000 |
commit | 519104fe1ada7514354e982779db4657b8bf85da (patch) | |
tree | a6a4f45d53bcf8369a28de3b2c1917c7ae6135a1 | |
parent | e2d457f192a36ad3968f077ce521523c8f716e96 (diff) | |
download | gcc-519104fe1ada7514354e982779db4657b8bf85da.zip gcc-519104fe1ada7514354e982779db4657b8bf85da.tar.gz gcc-519104fe1ada7514354e982779db4657b8bf85da.tar.bz2 |
pa-protos.h: New file.
* pa-protos.h: New file.
* pa.c: Include recog.h and tm_p.h.
(compute_zdepwi_operands, compute_movstrsi_length,
remove_useless_addtr_insns, store_reg, load_reg, set_reg_plus_d,
find_addr_reg, import_milli): Add static prototypes.
(pa_cpu_string, pa_arch_string): Constify a char*.
(legitimize_pic_address): Pass argument `mode' to pic_label_operand.
(read_only_operand): Add argument `mode'.
(singlemove_string, output_move_double, output_fp_move_double,
output_block_move, output_and, output_ior, output_ascii,
remove_useless_addtr_insns, milli_names, output_mul_insn,
output_div_insn, output_mod_insn, output_arg_descriptor,
output_cbranch, output_bb, output_bvb, output_dbra, ,
output_millicode_call, output_call, hppa_encode_label,
output_parallel_movb, output_parallel_addb): Constify a char*.
(hppa_va_start): Mark parameter `stdarg_p' with ATTRIBUTE_UNUSED.
(output_parallel_addb): Remove extra arg to `constrain_operands'
* pa.h: Move all prototypes to pa-protos.h.
(pa_cpu_string, pa_arch_string): Constify a char*.
(LEGITIMIZE_ADDRESS): Call `symbolic_operand' with mode argument.
* pa.md: Call `function_label_operand' with mode argument.
Likewise for `read_only_operand'.
Fix nesting of parens in call to `symbolic_operand'.
From-SVN: r31331
-rw-r--r-- | gcc/ChangeLog | 29 | ||||
-rw-r--r-- | gcc/config/pa/pa-protos.h | 145 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 88 | ||||
-rw-r--r-- | gcc/config/pa/pa.h | 111 | ||||
-rw-r--r-- | gcc/config/pa/pa.md | 10 |
5 files changed, 232 insertions, 151 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7617e58..e35f8cf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,34 @@ 2000-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + * pa-protos.h: New file. + + * pa.c: Include recog.h and tm_p.h. + (compute_zdepwi_operands, compute_movstrsi_length, + remove_useless_addtr_insns, store_reg, load_reg, set_reg_plus_d, + find_addr_reg, import_milli): Add static prototypes. + (pa_cpu_string, pa_arch_string): Constify a char*. + (legitimize_pic_address): Pass argument `mode' to pic_label_operand. + (read_only_operand): Add argument `mode'. + (singlemove_string, output_move_double, output_fp_move_double, + output_block_move, output_and, output_ior, output_ascii, + remove_useless_addtr_insns, milli_names, output_mul_insn, + output_div_insn, output_mod_insn, output_arg_descriptor, + output_cbranch, output_bb, output_bvb, output_dbra, , + output_millicode_call, output_call, hppa_encode_label, + output_parallel_movb, output_parallel_addb): Constify a char*. + (hppa_va_start): Mark parameter `stdarg_p' with ATTRIBUTE_UNUSED. + (output_parallel_addb): Remove extra arg to `constrain_operands' + + * pa.h: Move all prototypes to pa-protos.h. + (pa_cpu_string, pa_arch_string): Constify a char*. + (LEGITIMIZE_ADDRESS): Call `symbolic_operand' with mode argument. + + * pa.md: Call `function_label_operand' with mode argument. + Likewise for `read_only_operand'. + Fix nesting of parens in call to `symbolic_operand'. + +2000-01-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + * i860-protos.h: New file. * i860.c: Include tm_p.h. Add static prototypes. Fix compile diff --git a/gcc/config/pa/pa-protos.h b/gcc/config/pa/pa-protos.h new file mode 100644 index 0000000..f766e38 --- /dev/null +++ b/gcc/config/pa/pa-protos.h @@ -0,0 +1,145 @@ +/* Prototypes for pa.c functions used in the md file & elsewhere. + Copyright (C) 2000 Free Software Foundation, Inc. + +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. */ + +#ifdef RTX_CODE +/* Prototype function used in MACHINE_DEPENDENT_REORG macro. */ +extern void pa_reorg PARAMS ((rtx)); + +/* Prototype function used in various macros. */ +extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); + +/* Used in insn-*.c. */ +extern int following_call PARAMS ((rtx)); +extern int function_label_operand PARAMS ((rtx, enum machine_mode)); +extern int lhs_lshift_cint_operand PARAMS ((rtx, enum machine_mode)); + +#ifdef TREE_CODE +extern void hppa_va_start PARAMS ((int, tree, rtx)); +extern rtx hppa_va_arg PARAMS ((tree, tree)); +#endif /* TREE_CODE */ +extern rtx hppa_legitimize_address PARAMS ((rtx, rtx, enum machine_mode)); + +/* Define functions in pa.c and used in insn-output.c. */ + +extern const char *output_and PARAMS ((rtx *)); +extern const char *output_ior PARAMS ((rtx *)); +extern const char *output_move_double PARAMS ((rtx *)); +extern const char *output_fp_move_double PARAMS ((rtx *)); +extern const char *output_block_move PARAMS ((rtx *, int)); +extern const char *output_cbranch PARAMS ((rtx *, int, int, int, rtx)); +extern const char *output_bb PARAMS ((rtx *, int, int, int, rtx, int)); +extern const char *output_bvb PARAMS ((rtx *, int, int, int, rtx, int)); +extern const char *output_dbra PARAMS ((rtx *, rtx, int)); +extern const char *output_movb PARAMS ((rtx *, rtx, int, int)); +extern const char *output_parallel_movb PARAMS ((rtx *, int)); +extern const char *output_parallel_addb PARAMS ((rtx *, int)); +extern const char *output_call PARAMS ((rtx, rtx)); +extern const char *output_millicode_call PARAMS ((rtx, rtx)); +extern const char *output_mul_insn PARAMS ((int, rtx)); +extern const char *output_div_insn PARAMS ((rtx *, int, rtx)); +extern const char *output_mod_insn PARAMS ((int, rtx)); +extern const char *singlemove_string PARAMS ((rtx *)); +extern void output_arg_descriptor PARAMS ((rtx)); +extern void output_global_address PARAMS ((FILE *, rtx, int)); +extern void print_operand PARAMS ((FILE *, rtx, int)); +extern rtx legitimize_pic_address PARAMS ((rtx, enum machine_mode, rtx)); +extern struct rtx_def *gen_cmp_fp PARAMS ((enum rtx_code, rtx, rtx)); +extern void hppa_encode_label PARAMS ((rtx, int)); +extern int arith11_operand PARAMS ((rtx, enum machine_mode)); +extern int symbolic_expression_p PARAMS ((rtx)); +extern int hppa_address_cost PARAMS ((rtx)); +extern int symbolic_memory_operand PARAMS ((rtx, enum machine_mode)); +extern int pa_adjust_cost PARAMS ((rtx, rtx, rtx, int)); +extern int pa_adjust_insn_length PARAMS ((rtx, int)); +extern int int11_operand PARAMS ((rtx, enum machine_mode)); +extern int reg_or_cint_move_operand PARAMS ((rtx, enum machine_mode)); +extern int arith5_operand PARAMS ((rtx, enum machine_mode)); +extern int uint5_operand PARAMS ((rtx, enum machine_mode)); +extern int pic_label_operand PARAMS ((rtx, enum machine_mode)); +extern int plus_xor_ior_operator PARAMS ((rtx, enum machine_mode)); +extern int basereg_operand PARAMS ((rtx, enum machine_mode)); +extern int shadd_operand PARAMS ((rtx, enum machine_mode)); +extern int arith_operand PARAMS ((rtx, enum machine_mode)); +extern int read_only_operand PARAMS ((rtx, enum machine_mode)); +extern int move_operand PARAMS ((rtx, enum machine_mode)); +extern int and_operand PARAMS ((rtx, enum machine_mode)); +extern int ior_operand PARAMS ((rtx, enum machine_mode)); +extern int arith32_operand PARAMS ((rtx, enum machine_mode)); +extern int uint32_operand PARAMS ((rtx, enum machine_mode)); +extern int reg_or_nonsymb_mem_operand PARAMS ((rtx, enum machine_mode)); +extern int reg_or_0_operand PARAMS ((rtx, enum machine_mode)); +extern int reg_or_0_or_nonsymb_mem_operand PARAMS ((rtx, enum machine_mode)); +extern int pre_cint_operand PARAMS ((rtx, enum machine_mode)); +extern int post_cint_operand PARAMS ((rtx, enum machine_mode)); +extern int div_operand PARAMS ((rtx, enum machine_mode)); +extern int int5_operand PARAMS ((rtx, enum machine_mode)); +extern int movb_comparison_operator PARAMS ((rtx, enum machine_mode)); +extern int ireg_or_int5_operand PARAMS ((rtx, enum machine_mode)); +extern int fmpyaddoperands PARAMS ((rtx *)); +extern int fmpysuboperands PARAMS ((rtx *)); +extern int call_operand_address PARAMS ((rtx, enum machine_mode)); +extern int ior_operand PARAMS ((rtx, enum machine_mode)); +extern void emit_bcond_fp PARAMS ((enum rtx_code, rtx)); +extern int emit_move_sequence PARAMS ((rtx *, enum machine_mode, rtx)); +extern int emit_hpdiv_const PARAMS ((rtx *, int)); +extern int is_function_label_plus_const PARAMS ((rtx)); +extern int jump_in_call_delay PARAMS ((rtx)); +extern enum reg_class secondary_reload_class PARAMS ((enum reg_class, + enum machine_mode, rtx)); + +/* Declare functions defined in pa.c and used in templates. */ + +extern struct rtx_def *return_addr_rtx PARAMS ((int, rtx)); + +extern int fp_reg_operand PARAMS ((rtx, enum machine_mode)); +extern int arith_double_operand PARAMS ((rtx, enum machine_mode)); +extern int ireg_operand PARAMS ((rtx, enum machine_mode)); +extern int lhs_lshift_operand PARAMS ((rtx, enum machine_mode)); +extern int pc_or_label_operand PARAMS ((rtx, enum machine_mode)); +#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 */ +extern int non_hard_reg_operand PARAMS ((rtx, enum machine_mode)); +extern int eq_neq_comparison_operator PARAMS ((rtx, enum machine_mode)); +extern int insn_refs_are_delayed PARAMS ((rtx)); +#endif /* RTX_CODE */ + +/* Prototype function used in macro CONST_OK_FOR_LETTER_P. */ +extern int zdepi_cint_p PARAMS ((unsigned HOST_WIDE_INT)); + +extern struct rtx_def *hppa_builtin_saveregs PARAMS ((void)); + +extern void output_deferred_plabels PARAMS ((FILE *)); +extern void override_options PARAMS ((void)); +extern void output_ascii PARAMS ((FILE *, const unsigned char *, int)); +extern void output_function_prologue PARAMS ((FILE *, int)); +extern void output_function_epilogue PARAMS ((FILE *, int)); +extern int compute_frame_size PARAMS ((int, int *)); +extern int and_mask_p PARAMS ((unsigned HOST_WIDE_INT)); +extern int cint_ok_for_move PARAMS ((HOST_WIDE_INT)); +extern void hppa_expand_prologue PARAMS ((void)); +extern void hppa_expand_epilogue PARAMS ((void)); +extern int hppa_can_use_return_insn_p PARAMS ((void)); +extern int ior_mask_p PARAMS ((unsigned HOST_WIDE_INT)); + +#ifdef TREE_CODE +extern int reloc_needed PARAMS ((tree)); +#endif /* TREE_CODE */ diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 529015c..4b0a42f 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for HPPA. - Copyright (C) 1992, 93-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1992, 93-99, 2000 Free Software Foundation, Inc. Contributed by Tim Moore (moore@cs.utah.edu), based on sparc.c This file is part of GNU CC. @@ -39,6 +39,8 @@ Boston, MA 02111-1307, USA. */ #include "obstack.h" #include "toplev.h" #include "ggc.h" +#include "recog.h" +#include "tm_p.h" static void restore_unscaled_index_insn_codes PROTO((rtx)); static void record_unscaled_index_insn_codes PROTO((rtx)); @@ -48,6 +50,12 @@ static int forward_branch_p PROTO((rtx)); static int shadd_constant_p PROTO((int)); static void pa_add_gc_roots PROTO((void)); static void mark_deferred_plabels PROTO((void *)); +static void compute_zdepwi_operands PROTO((unsigned HOST_WIDE_INT, unsigned *)); +static int compute_movstrsi_length PROTO((rtx)); +static void remove_useless_addtr_insns PROTO((rtx, int)); +static void store_reg PROTO((int, int, int)); +static void load_reg PROTO((int, int, int)); +static void set_reg_plus_d PROTO((int, int, int)); /* Save the operands last given to a compare for use when we generate a scc or bcc insn. */ @@ -59,13 +67,13 @@ enum cmp_type hppa_branch_type; enum processor_type pa_cpu; /* String to hold which cpu we are scheduling for. */ -char *pa_cpu_string; +const char *pa_cpu_string; /* Which architecture we are generating code for. */ enum architecture_type pa_arch; /* String to hold which architecture we are generating code for. */ -char *pa_arch_string; +const char *pa_arch_string; /* Set by the FUNCTION_PROFILER macro. */ int hp_profile_labelno; @@ -74,7 +82,7 @@ int hp_profile_labelno; registers which were saved by the current function's prologue. */ static int gr_saved, fr_saved; -static rtx find_addr_reg (); +static rtx find_addr_reg PARAMS ((rtx)); /* Keep track of the number of bytes we have output in the CODE subspaces during this compilation so we'll know when to emit inline long-calls. */ @@ -643,12 +651,12 @@ pc_or_label_operand (op, mode) rtx legitimize_pic_address (orig, mode, reg) rtx orig, reg; - enum machine_mode mode ATTRIBUTE_UNUSED; + enum machine_mode mode; { rtx pic_ref = orig; /* Labels need special handling. */ - if (pic_label_operand (orig)) + if (pic_label_operand (orig, mode)) { /* We do not want to go through the movXX expanders here since that would create recursion. @@ -1616,8 +1624,9 @@ reloc_needed (exp) so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true. */ int -read_only_operand (operand) +read_only_operand (operand, mode) rtx operand; + enum machine_mode mode ATTRIBUTE_UNUSED; { if (GET_CODE (operand) == CONST) operand = XEXP (XEXP (operand, 0), 0); @@ -1637,7 +1646,7 @@ read_only_operand (operand) /* Return the best assembler insn template for moving operands[1] into operands[0] as a fullword. */ -char * +const char * singlemove_string (operands) rtx *operands; { @@ -1683,7 +1692,7 @@ singlemove_string (operands) /* Compute position (in OP[1]) and width (in OP[2]) useful for copying IMM to a register using the zdepi instructions. Store the immediate value to insert in OP[0]. */ -void +static void compute_zdepwi_operands (imm, op) unsigned HOST_WIDE_INT imm; unsigned *op; @@ -1722,7 +1731,7 @@ compute_zdepwi_operands (imm, op) /* Output assembler code to perform a doubleword move insn with operands OPERANDS. */ -char * +const char * output_move_double (operands) rtx *operands; { @@ -1999,7 +2008,7 @@ output_move_double (operands) return ""; } -char * +const char * output_fp_move_double (operands) rtx *operands; { @@ -2070,7 +2079,7 @@ find_addr_reg (addr) OPERANDS[5] is the alignment safe to use, as a CONST_INT. OPERANDS[6] is another temporary register. */ -char * +const char * output_block_move (operands, size_is_constant) rtx *operands; int size_is_constant ATTRIBUTE_UNUSED; @@ -2171,7 +2180,7 @@ output_block_move (operands, size_is_constant) Basic structure is the same as emit_block_move, except that we count insns rather than emit them. */ -int +static int compute_movstrsi_length (insn) rtx insn; { @@ -2203,7 +2212,7 @@ compute_movstrsi_length (insn) } -char * +const char * output_and (operands) rtx *operands; { @@ -2254,7 +2263,7 @@ output_and (operands) return "and %1,%2,%0"; } -char * +const char * output_ior (operands) rtx *operands; { @@ -2287,7 +2296,7 @@ output_ior (operands) void output_ascii (file, p, size) FILE *file; - unsigned char *p; + const unsigned char *p; int size; { int i; @@ -2354,7 +2363,7 @@ output_ascii (file, p, size) When CHECK_NOTES is zero we can only eliminate add,tr insns when there's a 1:1 correspondence between fcmp and ftest/fbranch instructions. */ -void +static void remove_useless_addtr_insns (insns, check_notes) rtx insns; int check_notes; @@ -3946,7 +3955,7 @@ output_global_address (file, x, round_constant) if (GET_CODE (x) == HIGH) x = XEXP (x, 0); - if (GET_CODE (x) == SYMBOL_REF && read_only_operand (x)) + if (GET_CODE (x) == SYMBOL_REF && read_only_operand (x, VOIDmode)) assemble_name (file, XSTR (x, 0)); else if (GET_CODE (x) == SYMBOL_REF && !flag_pic) { @@ -3955,7 +3964,7 @@ output_global_address (file, x, round_constant) } else if (GET_CODE (x) == CONST) { - char *sep = ""; + const char *sep = ""; int offset = 0; /* assembler wants -$global$ at end */ rtx base = NULL_RTX; @@ -4004,7 +4013,7 @@ output_global_address (file, x, round_constant) sep = "-"; else abort (); - if (!read_only_operand (base) && !flag_pic) + if (!read_only_operand (base, VOIDmode) && !flag_pic) fputs ("-$global$", file); if (offset) fprintf (file,"%s%d", sep, offset); @@ -4040,8 +4049,9 @@ output_deferred_plabels (file) Keep track of which ones we have used. */ enum millicodes { remI, remU, divI, divU, mulI, mulU, end1000 }; +static void import_milli PROTO((enum millicodes)); static char imported[(int)end1000]; -static char *milli_names[] = {"remI", "remU", "divI", "divU", "mulI", "mulU"}; +static const char * const milli_names[] = {"remI", "remU", "divI", "divU", "mulI", "mulU"}; static char import_string[] = ".IMPORT $$....,MILLICODE"; #define MILLI_START 10 @@ -4063,7 +4073,7 @@ import_milli (code) /* The register constraints have put the operands and return value in the proper registers. */ -char * +const char * output_mul_insn (unsignedp, insn) int unsignedp ATTRIBUTE_UNUSED; rtx insn; @@ -4124,7 +4134,7 @@ emit_hpdiv_const (operands, unsignedp) return 0; } -char * +const char * output_div_insn (operands, unsignedp, insn) rtx *operands; int unsignedp; @@ -4179,7 +4189,7 @@ output_div_insn (operands, unsignedp, insn) /* Output a $$rem millicode to do mod. */ -char * +const char * output_mod_insn (unsignedp, insn) int unsignedp; rtx insn; @@ -4202,7 +4212,7 @@ void output_arg_descriptor (call_insn) rtx call_insn; { - char *arg_regs[4]; + const char *arg_regs[4]; enum machine_mode arg_mode; rtx link; int i, output_flag = 0; @@ -4353,7 +4363,7 @@ secondary_reload_class (class, mode, in) if (!flag_pic && is_symbolic - && read_only_operand (in)) + && read_only_operand (in, VOIDmode)) return NO_REGS; if (class != R1_REGS && is_symbolic) @@ -4439,7 +4449,7 @@ hppa_builtin_saveregs () void hppa_va_start (stdarg_p, valist, nextarg) - int stdarg_p; + int stdarg_p ATTRIBUTE_UNUSED; tree valist; rtx nextarg; { @@ -4511,7 +4521,7 @@ hppa_va_arg (valist, type) output appropriate to emit the branch corresponding to all given parameters. */ -char * +const char * output_cbranch (operands, nullify, length, negated, insn) rtx *operands; int nullify, length, negated; @@ -4690,7 +4700,7 @@ output_cbranch (operands, nullify, length, negated, insn) varying length branches, negated branches and all combinations of the above. it returns the appropriate output template to emit the branch. */ -char * +const char * output_bb (operands, nullify, length, negated, insn, which) rtx *operands ATTRIBUTE_UNUSED; int nullify, length, negated; @@ -4828,7 +4838,7 @@ output_bb (operands, nullify, length, negated, insn, which) of the above. it returns the appropriate output template to emit the branch. */ -char * +const char * output_bvb (operands, nullify, length, negated, insn, which) rtx *operands ATTRIBUTE_UNUSED; int nullify, length, negated; @@ -4964,7 +4974,7 @@ output_bvb (operands, nullify, length, negated, insn, which) Note it may perform some output operations on its own before returning the final output string. */ -char * +const char * output_dbra (operands, insn, which_alternative) rtx *operands; rtx insn; @@ -5069,7 +5079,7 @@ output_dbra (operands, insn, which_alternative) Note it may perform some output operations on its own before returning the final output string. */ -char * +const char * output_movb (operands, insn, which_alternative, reverse_comparison) rtx *operands; rtx insn; @@ -5184,7 +5194,7 @@ output_movb (operands, insn, which_alternative, reverse_comparison) CALL_DEST is the routine we are calling. */ -char * +const char * output_millicode_call (insn, call_dest) rtx insn; rtx call_dest; @@ -5344,7 +5354,7 @@ extern struct obstack *current_obstack; CALL_DEST is the routine we are calling. */ -char * +const char * output_call (insn, call_dest) rtx insn; rtx call_dest; @@ -5437,7 +5447,7 @@ output_call (insn, call_dest) we don't have any direct calls in that case. */ { int i; - char *name = XSTR (call_dest, 0); + const char *name = XSTR (call_dest, 0); /* See if we have already put this function on the list of deferred plabels. This list is generally small, @@ -5602,7 +5612,7 @@ hppa_encode_label (sym, permanent) rtx sym; int permanent; { - char *str = XSTR (sym, 0); + const char *str = XSTR (sym, 0); int len = strlen (str); char *newstr; @@ -5904,7 +5914,7 @@ jump_in_call_delay (insn) /* Output an unconditional move and branch insn. */ -char * +const char * output_parallel_movb (operands, length) rtx *operands; int length; @@ -5935,7 +5945,7 @@ output_parallel_movb (operands, length) /* Output an unconditional add and branch insn. */ -char * +const char * output_parallel_addb (operands, length) rtx *operands; int length; @@ -6518,7 +6528,7 @@ pa_can_combine_p (new, anchor, floater, reversed, dest, src1, src2) INSN_CODE (new) = -1; insn_code_number = recog_memoized (new); if (insn_code_number < 0 - || !constrain_operands (insn_code_number, 1)) + || !constrain_operands (1)) return 0; if (reversed) diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 1794520..1ad4377 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -1,5 +1,5 @@ /* Definitions of target machine for GNU compiler, for the HP Spectrum. - Copyright (C) 1992, 93-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1992, 93-99, 2000 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) of Cygnus Support and Tim Moore (moore@defmacro.cs.utah.edu) of the Center for Software Science at the University of Utah. @@ -44,7 +44,7 @@ enum processor_type }; /* For -mschedule= option. */ -extern char *pa_cpu_string; +extern const char *pa_cpu_string; extern enum processor_type pa_cpu; #define pa_cpu_attr ((enum attr_cpu)pa_cpu) @@ -70,7 +70,7 @@ enum architecture_type }; /* For -march= option. */ -extern char *pa_arch_string; +extern const char *pa_arch_string; extern enum architecture_type pa_arch; /* Print subsidiary information on the compiler version in use. */ @@ -294,17 +294,6 @@ extern int target_flags; /* Machine dependent reorg pass. */ #define MACHINE_DEPENDENT_REORG(X) pa_reorg(X) -/* Prototype function used in MACHINE_DEPENDENT_REORG macro. */ -void pa_reorg (); - -/* Prototype function used in various macros. */ -int symbolic_operand (); - -/* Used in insn-*.c. */ -int following_call (); -int function_label_operand (); -int lhs_lshift_cint_operand (); - /* Names to predefine in the preprocessor for this target machine. */ #define CPP_PREDEFINES "-Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -Dunix -Dhp9000 -Dhp800 -Dspectrum -DREVARGV -Asystem(unix) -Asystem(bsd) -Acpu(hppa) -Amachine(hppa)" @@ -748,9 +737,6 @@ enum reg_class { NO_REGS, R1_REGS, GENERAL_REGS, FPUPPER_REGS, FP_REGS, GENERAL_ : (C) == 'P' ? and_mask_p (VALUE) \ : 0) -/* Prototype function used in macro CONST_OK_FOR_LETTER_P. */ -int zdepi_cint_p (); - /* Similar, but for floating or large integer constants, and defining letters G and H. Here VALUE is the CONST_DOUBLE rtx itself. @@ -1219,18 +1205,15 @@ extern int may_call_alloca; Ordinarily they are not call used registers, but they are for _builtin_saveregs, so we must make this explicit. */ -extern struct rtx_def *hppa_builtin_saveregs (); #define EXPAND_BUILTIN_SAVEREGS() hppa_builtin_saveregs () /* Implement `va_start' for varargs and stdarg. */ -extern void hppa_va_start(); #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \ hppa_va_start (stdarg, valist, nextarg) /* Implement `va_arg'. */ -extern struct rtx_def *hppa_va_arg(); #define EXPAND_BUILTIN_VA_ARG(valist, type) \ hppa_va_arg (valist, type) @@ -1586,7 +1569,6 @@ do { \ It is always safe for this macro to do nothing. It exists to recognize opportunities to optimize the output. */ -extern struct rtx_def *hppa_legitimize_address (); #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \ { rtx orig_x = (X); \ (X) = hppa_legitimize_address (X, OLDX, MODE); \ @@ -2153,7 +2135,7 @@ while (0) fprintf (FILE, "%d(%s)", offset, reg_names [REGNO (base)]); \ break; \ case LO_SUM: \ - if (!symbolic_operand (XEXP (addr, 1))) \ + if (!symbolic_operand (XEXP (addr, 1), VOIDmode)) \ fputs ("R'", FILE); \ else if (flag_pic == 0) \ fputs ("RR'", FILE); \ @@ -2174,91 +2156,6 @@ while (0) }} -/* Define functions in pa.c and used in insn-output.c. */ - -extern char *output_and (); -extern char *output_ior (); -extern char *output_move_double (); -extern char *output_fp_move_double (); -extern char *output_block_move (); -extern char *output_cbranch (); -extern char *output_bb (); -extern char *output_bvb (); -extern char *output_dbra (); -extern char *output_movb (); -extern char *output_parallel_movb (); -extern char *output_parallel_addb (); -extern char *output_return (); -extern char *output_call (); -extern char *output_millicode_call (); -extern char *output_mul_insn (); -extern char *output_div_insn (); -extern char *output_mod_insn (); -extern char *singlemove_string (); -extern void output_arg_descriptor (); -extern void output_deferred_plabels (); -extern void override_options (); -extern void output_ascii (); -extern void output_function_prologue (); -extern void output_function_epilogue (); -extern void output_global_address (); -extern void print_operand (); -extern struct rtx_def *legitimize_pic_address (); -extern struct rtx_def *gen_cmp_fp (); -extern void hppa_encode_label (); -extern int arith11_operand (); -extern int symbolic_expression_p (); -extern int reloc_needed (); -extern int compute_frame_size (); -extern int hppa_address_cost (); -extern int and_mask_p (); -extern int symbolic_memory_operand (); -extern int pa_adjust_cost (); -extern int pa_adjust_insn_length (); -extern int int11_operand (); -extern int reg_or_cint_move_operand (); -extern int arith5_operand (); -extern int uint5_operand (); -extern int pic_label_operand (); -extern int plus_xor_ior_operator (); -extern int basereg_operand (); -extern int shadd_operand (); -extern int arith_operand (); -extern int read_only_operand (); -extern int move_operand (); -extern int and_operand (); -extern int ior_operand (); -extern int arith32_operand (); -extern int uint32_operand (); -extern int reg_or_nonsymb_mem_operand (); -extern int reg_or_0_operand (); -extern int reg_or_0_or_nonsymb_mem_operand (); -extern int pre_cint_operand (); -extern int post_cint_operand (); -extern int div_operand (); -extern int int5_operand (); -extern int movb_comparison_operator (); -extern int ireg_or_int5_operand (); -extern int fmpyaddoperands (); -extern int fmpysuboperands (); -extern int call_operand_address (); -extern int cint_ok_for_move (); -extern int ior_operand (); -extern void emit_bcond_fp (); -extern int emit_move_sequence (); -extern int emit_hpdiv_const (); -extern void hppa_expand_prologue (); -extern void hppa_expand_epilogue (); -extern int hppa_can_use_return_insn_p (); -extern int is_function_label_plus_const (); -extern int jump_in_call_delay (); -extern enum reg_class secondary_reload_class (); -extern int insn_sets_and_refs_are_delayed (); - -/* Declare functions defined in pa.c and used in templates. */ - -extern struct rtx_def *return_addr_rtx (); - /* Find the return address associated with the frame given by FRAMEADDR. */ #define RETURN_ADDR_RTX(COUNT, FRAMEADDR) \ diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index a3ef9c5..29bbac0 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -1,5 +1,5 @@ ;;- Machine description for HP PA-RISC architecture for GNU C compiler -;; Copyright (C) 1992, 93-98, 1999 Free Software Foundation, Inc. +;; Copyright (C) 1992, 93-99, 2000 Free Software Foundation, Inc. ;; Contributed by the Center for Software Science at the University ;; of Utah. @@ -1620,7 +1620,7 @@ (plus:SI (match_operand:SI 1 "register_operand" "r") (high:SI (match_operand 2 "" ""))))] "symbolic_operand (operands[2], Pmode) - && ! function_label_operand (operands[2]) + && ! function_label_operand (operands[2], Pmode) && flag_pic == 2" "addil LT'%G2,%1" [(set_attr "type" "binary") @@ -1652,8 +1652,8 @@ [(set (match_operand:SI 0 "register_operand" "=a") (high:SI (match_operand 1 "" "")))] "symbolic_operand (operands[1], Pmode) - && ! function_label_operand (operands[1]) - && ! read_only_operand (operands[1]) + && ! function_label_operand (operands[1], Pmode) + && ! read_only_operand (operands[1], Pmode) && ! flag_pic" "* { @@ -1688,7 +1688,7 @@ (define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand 1 "" "")))] - "(!flag_pic || !symbolic_operand (operands[1]), Pmode) + "(!flag_pic || !symbolic_operand (operands[1], Pmode)) && !is_function_label_plus_const (operands[1])" "* { |