From c715d549eebd9f46164ab272c7dbcb128efe78c6 Mon Sep 17 00:00:00 2001 From: hp Date: Sat, 26 Oct 2002 18:06:01 +0000 Subject: [PATCH] * config/mmix/mmix.h (LIBCALL_VALUE): Use MMIX_RETURN_VALUE_REGNUM, not MMIX_OUTGOING_RETURN_VALUE_REGNUM. (FUNCTION_VALUE_REGNO_P): Similar, but move code to... * config/mmix/mmix.c (mmix_function_value_regno_p): New. * config/mmix/mmix-protos.h: Remove needless ifdefs on TREE_CODE and RTX_CODE. (mmix_function_value_regno_p): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58563 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++++ gcc/config/mmix/mmix-protos.h | 33 +++++++++++---------------------- gcc/config/mmix/mmix.c | 9 +++++++++ gcc/config/mmix/mmix.h | 4 ++-- 4 files changed, 30 insertions(+), 24 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fd7466d..b57089d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2002-10-26 Hans-Peter Nilsson + * config/mmix/mmix.h (LIBCALL_VALUE): Use + MMIX_RETURN_VALUE_REGNUM, not MMIX_OUTGOING_RETURN_VALUE_REGNUM. + (FUNCTION_VALUE_REGNO_P): Similar, but move code to... + * config/mmix/mmix.c (mmix_function_value_regno_p): New. + * config/mmix/mmix-protos.h: Remove needless ifdefs on TREE_CODE + and RTX_CODE. + (mmix_function_value_regno_p): Declare. + * config/mmix/mmix.md ("fixuns_truncdfdi2"): Replace unsigned_fix, invalid for floating point mode result, with fix. diff --git a/gcc/config/mmix/mmix-protos.h b/gcc/config/mmix/mmix-protos.h index a6a4e3c..496752c 100644 --- a/gcc/config/mmix/mmix-protos.h +++ b/gcc/config/mmix/mmix-protos.h @@ -57,16 +57,11 @@ extern void mmix_conditional_register_usage PARAMS ((void)); extern int mmix_local_regno PARAMS ((int)); extern int mmix_dbx_register_number PARAMS ((int)); extern int mmix_use_simple_return PARAMS ((void)); - -/* Things that need rtl.h, tree.h or real.h included, or in combination. */ - -/* Need tree.h */ -#ifdef TREE_CODE - extern void mmix_make_decl_one_only PARAMS ((tree)); extern int mmix_function_arg_pass_by_reference PARAMS ((const CUMULATIVE_ARGS *, enum machine_mode, tree, int)); extern rtx mmix_function_outgoing_value PARAMS ((tree, tree)); +extern int mmix_function_value_regno_p PARAMS ((int)); extern int mmix_data_alignment PARAMS ((tree, int)); extern int mmix_constant_alignment PARAMS ((tree, int)); extern int mmix_local_alignment PARAMS ((tree, int)); @@ -80,17 +75,9 @@ extern void mmix_asm_output_aligned_local PARAMS ((FILE *, const char *, int, int)); extern void mmix_asm_declare_register_global PARAMS ((FILE *, tree, int, const char *)); - -/* Need tree.h and rtl.h */ -# ifdef RTX_CODE extern rtx mmix_function_arg PARAMS ((const CUMULATIVE_ARGS *, enum machine_mode, tree, int, int)); extern rtx mmix_expand_builtin_va_arg PARAMS ((tree, tree)); -# endif /* RTX_CODE */ -#endif /* TREE_CODE */ - -/* Need rtl.h */ -#ifdef RTX_CODE extern void mmix_asm_output_addr_diff_elt PARAMS ((FILE *, rtx, int, int)); extern void mmix_asm_output_addr_vec_elt PARAMS ((FILE *, int)); extern enum reg_class mmix_preferred_reload_class @@ -110,24 +97,26 @@ extern void mmix_initialize_trampoline PARAMS ((rtx, rtx, rtx)); extern int mmix_constant_address_p PARAMS ((rtx)); extern int mmix_legitimate_address PARAMS ((enum machine_mode, rtx, int)); extern int mmix_legitimate_constant_p PARAMS ((rtx)); -extern enum machine_mode mmix_select_cc_mode PARAMS ((RTX_CODE, rtx, rtx)); -extern void mmix_canonicalize_comparison PARAMS ((RTX_CODE *, rtx *, rtx *)); -extern int mmix_rtx_cost_recalculated - PARAMS ((rtx, RTX_CODE, RTX_CODE, int *)); extern int mmix_address_cost PARAMS ((rtx)); extern void mmix_print_operand PARAMS ((FILE *, rtx, int)); extern void mmix_print_operand_address PARAMS ((FILE *, rtx)); -extern int mmix_valid_comparison PARAMS ((RTX_CODE, enum machine_mode, rtx)); -extern rtx mmix_gen_compare_reg PARAMS ((enum rtx_code, rtx, rtx)); extern void mmix_machine_dependent_reorg PARAMS ((rtx)); extern void mmix_expand_prologue PARAMS ((void)); extern void mmix_expand_epilogue PARAMS ((void)); extern rtx mmix_get_hard_reg_initial_val PARAMS ((enum machine_mode, int)); -#endif /* RTX_CODE */ - extern int mmix_asm_preferred_eh_data_format PARAMS ((int, int)); extern void mmix_setup_frame_addresses PARAMS ((void)); +#ifdef RTX_CODE +/* Needs to be ifdef:d for sake of enum rtx_code. */ +extern enum machine_mode mmix_select_cc_mode PARAMS ((enum rtx_code, rtx, rtx)); +extern void mmix_canonicalize_comparison PARAMS ((enum rtx_code *, rtx *, rtx *)); +extern int mmix_rtx_cost_recalculated + PARAMS ((rtx, enum rtx_code, enum rtx_code, int *)); +extern int mmix_valid_comparison PARAMS ((enum rtx_code, enum machine_mode, rtx)); +extern rtx mmix_gen_compare_reg PARAMS ((enum rtx_code, rtx, rtx)); +#endif + /* * Local variables: * eval: (c-set-style "gnu") diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index 0cc567d..8aa1d3a 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -660,6 +660,15 @@ mmix_function_outgoing_value (valtype, func) return gen_rtx_PARALLEL (VOIDmode, gen_rtvec_v (nregs, vec)); } +/* FUNCTION_VALUE_REGNO_P. */ + +int +mmix_function_value_regno_p (regno) + int regno; +{ + return regno == MMIX_RETURN_VALUE_REGNUM; +} + /* EH_RETURN_DATA_REGNO. */ int diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h index 05c0531..cfc6d93 100644 --- a/gcc/config/mmix/mmix.h +++ b/gcc/config/mmix/mmix.h @@ -768,10 +768,10 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS; mmix_function_outgoing_value (VALTYPE, FUNC) #define LIBCALL_VALUE(MODE) \ - gen_rtx_REG (MODE, MMIX_OUTGOING_RETURN_VALUE_REGNUM) + gen_rtx_REG (MODE, MMIX_RETURN_VALUE_REGNUM) #define FUNCTION_VALUE_REGNO_P(REGNO) \ - ((REGNO) == MMIX_OUTGOING_RETURN_VALUE_REGNUM) + mmix_function_value_regno_p (REGNO) /* Node: Aggregate Return */ -- 2.7.4