Commit df4bacab by Oleg Endo

sh-protos.h (sh_media_register_for_return): Remove.

gcc/
	* config/sh/sh-protos.h (sh_media_register_for_return): Remove.
	* config/sh/sh.c: Define and declare variables on first use throughout
	the file.
	(current_function_interrupt): Change to bool type.
	(frame_insn): Rename to emit_frame_insn and update users.
	(push_regs): Use bool for 'interrupt_handler' argument.
	(save_schedule_s): Remove.
	(TARGET_ASM_UNALIGNED_DI_OP, TARGET_ASM_ALIGNED_DI_OP): Remove.
	(sh_option_override): Don't nullify targetm.asm_out.aligned_op.di and
	targetm.asm_out.unaligned_op.di.
	(gen_far_branch): Remove redundant forward declaration.
	(sh_media_register_for_return, MAX_SAVED_REGS, save_entry_s, save_entry,
	MAX_TEMPS, save_schedule_ssave_schedule): Remove.
	(sh_set_return_address, sh_function_ok_for_sibcall,
	scavenge_reg): Update comments.
	(sh_builtin_saveregs): Use TRAGET_FPU_ANY condition.
	(sh2a_get_function_vector_number, sh2a_function_vector_p): Use for loop.
	(sh_attr_renesas_p): Remove unnecessary parentheses.
	(branch_dest): Simplify.
	* config/sh/sh.h (sh_args): Remove byref, byref_regs, stack_regs fields.
	Change force_mem, prototype_p, outgoing, renesas_abi fields to bool.
	(CUMULATIVE_ARGS): Change macro to typedef.
	(current_function_interrupt): Change to bool type.
	(sh_arg_class, sh_args, CUMULATIVE_ARGS, current_function_interrupt):
	Surround with __cplusplus ifdef.
	(sh_compare_op0, sh_compare_op1): Remove.
	(EPILOGUE_USES): Use TARGET_FPU_ANY condition.

From-SVN: r236008
parent 5ebbbd3d
2016-05-08 Oleg Endo <olegendo@gcc.gnu.org>
* config/sh/sh-protos.h (sh_media_register_for_return): Remove.
* config/sh/sh.c: Define and declare variables on first use throughout
the file.
(current_function_interrupt): Change to bool type.
(frame_insn): Rename to emit_frame_insn and update users.
(push_regs): Use bool for 'interrupt_handler' argument.
(save_schedule_s): Remove.
(TARGET_ASM_UNALIGNED_DI_OP, TARGET_ASM_ALIGNED_DI_OP): Remove.
(sh_option_override): Don't nullify targetm.asm_out.aligned_op.di and
targetm.asm_out.unaligned_op.di.
(gen_far_branch): Remove redundant forward declaration.
(sh_media_register_for_return, MAX_SAVED_REGS, save_entry_s, save_entry,
MAX_TEMPS, save_schedule_ssave_schedule): Remove.
(sh_set_return_address, sh_function_ok_for_sibcall,
scavenge_reg): Update comments.
(sh_builtin_saveregs): Use TRAGET_FPU_ANY condition.
(sh2a_get_function_vector_number, sh2a_function_vector_p): Use for loop.
(sh_attr_renesas_p): Remove unnecessary parentheses.
(branch_dest): Simplify.
* config/sh/sh.h (sh_args): Remove byref, byref_regs, stack_regs fields.
Change force_mem, prototype_p, outgoing, renesas_abi fields to bool.
(CUMULATIVE_ARGS): Change macro to typedef.
(current_function_interrupt): Change to bool type.
(sh_arg_class, sh_args, CUMULATIVE_ARGS, current_function_interrupt):
Surround with __cplusplus ifdef.
(sh_compare_op0, sh_compare_op1): Remove.
(EPILOGUE_USES): Use TARGET_FPU_ANY condition.
2016-05-07 Jim Wilson <jim.wilson@linaro.org> 2016-05-07 Jim Wilson <jim.wilson@linaro.org>
* config/arm/arm.md: (arch): Add neon. * config/arm/arm.md: (arch): Add neon.
......
...@@ -366,7 +366,6 @@ extern void sh_cpu_cpp_builtins (cpp_reader* pfile); ...@@ -366,7 +366,6 @@ extern void sh_cpu_cpp_builtins (cpp_reader* pfile);
extern const char *output_jump_label_table (void); extern const char *output_jump_label_table (void);
extern rtx get_t_reg_rtx (void); extern rtx get_t_reg_rtx (void);
extern int sh_media_register_for_return (void);
extern void sh_expand_prologue (void); extern void sh_expand_prologue (void);
extern void sh_expand_epilogue (bool); extern void sh_expand_epilogue (bool);
extern void sh_set_return_address (rtx, rtx); extern void sh_set_return_address (rtx, rtx);
......
...@@ -1154,6 +1154,8 @@ extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER]; ...@@ -1154,6 +1154,8 @@ extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
&& (unsigned) (REGNO) < (unsigned) (FIRST_FP_PARM_REG \ && (unsigned) (REGNO) < (unsigned) (FIRST_FP_PARM_REG \
+ NPARM_REGS (SFmode)))) + NPARM_REGS (SFmode))))
#ifdef __cplusplus
/* Define a data type for recording info about an argument list /* Define a data type for recording info about an argument list
during the scan of that argument list. This data type should during the scan of that argument list. This data type should
hold all necessary information about the function itself hold all necessary information about the function itself
...@@ -1164,41 +1166,37 @@ extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER]; ...@@ -1164,41 +1166,37 @@ extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
of arguments scanned so far (including the invisible argument, of arguments scanned so far (including the invisible argument,
if any, which holds the structure-value-address). if any, which holds the structure-value-address).
Thus NARGREGS or more means all following args should go on the stack. */ Thus NARGREGS or more means all following args should go on the stack. */
enum sh_arg_class { SH_ARG_INT = 0, SH_ARG_FLOAT = 1 }; enum sh_arg_class { SH_ARG_INT = 0, SH_ARG_FLOAT = 1 };
struct sh_args {
int arg_count[2]; struct sh_args
int force_mem; {
/* How many SH_ARG_INT and how many SH_ARG_FLOAT args there are. */
int arg_count[2];
bool force_mem;
/* Nonzero if a prototype is available for the function. */ /* Nonzero if a prototype is available for the function. */
int prototype_p; bool prototype_p;
/* The number of an odd floating-point register, that should be used /* The number of an odd floating-point register, that should be used
for the next argument of type float. */ for the next argument of type float. */
int free_single_fp_reg; int free_single_fp_reg;
/* Whether we're processing an outgoing function call. */ /* Whether we're processing an outgoing function call. */
int outgoing; bool outgoing;
/* The number of general-purpose registers that should have been
used to pass partial arguments, that are passed totally on the
stack. On SHcompact, a call trampoline will pop them off the
stack before calling the actual function, and, if the called
function is implemented in SHcompact mode, the incoming arguments
decoder will push such arguments back onto the stack. For
incoming arguments, STACK_REGS also takes into account other
arguments passed by reference, that the decoder will also push
onto the stack. */
int stack_regs;
/* The number of general-purpose registers that should have been
used to pass arguments, if the arguments didn't have to be passed
by reference. */
int byref_regs;
/* Set as by shcompact_byref if the current argument is to be passed
by reference. */
int byref;
/* This is set to nonzero when the call in question must use the Renesas ABI, /* This is set to nonzero when the call in question must use the Renesas ABI,
even without the -mrenesas option. */ even without the -mrenesas option. */
int renesas_abi; bool renesas_abi;
}; };
#define CUMULATIVE_ARGS struct sh_args typedef sh_args CUMULATIVE_ARGS;
/* Set when processing a function with interrupt attribute. */
extern bool current_function_interrupt;
#endif // __cplusplus
#define GET_SH_ARG_CLASS(MODE) \ #define GET_SH_ARG_CLASS(MODE) \
((TARGET_FPU_ANY && (MODE) == SFmode) \ ((TARGET_FPU_ANY && (MODE) == SFmode) \
...@@ -1805,10 +1803,6 @@ struct sh_args { ...@@ -1805,10 +1803,6 @@ struct sh_args {
#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \
final_prescan_insn ((INSN), (OPVEC), (NOPERANDS)) final_prescan_insn ((INSN), (OPVEC), (NOPERANDS))
extern rtx sh_compare_op0;
extern rtx sh_compare_op1;
/* Which processor to schedule for. The elements of the enumeration must /* Which processor to schedule for. The elements of the enumeration must
match exactly the cpu attribute in the sh.md file. */ match exactly the cpu attribute in the sh.md file. */
enum processor_type { enum processor_type {
...@@ -1847,8 +1841,6 @@ extern enum mdep_reorg_phase_e mdep_reorg_phase; ...@@ -1847,8 +1841,6 @@ extern enum mdep_reorg_phase_e mdep_reorg_phase;
extern tree sh_deferred_function_attributes; extern tree sh_deferred_function_attributes;
extern tree *sh_deferred_function_attributes_tail; extern tree *sh_deferred_function_attributes_tail;
/* Set when processing a function with interrupt attribute. */
extern int current_function_interrupt;
/* Instructions with unfilled delay slots take up an /* Instructions with unfilled delay slots take up an
...@@ -1889,8 +1881,7 @@ extern int current_function_interrupt; ...@@ -1889,8 +1881,7 @@ extern int current_function_interrupt;
? (TARGET_FMOVD ? FP_MODE_DOUBLE : FP_MODE_NONE) \ ? (TARGET_FMOVD ? FP_MODE_DOUBLE : FP_MODE_NONE) \
: ACTUAL_NORMAL_MODE (ENTITY)) : ACTUAL_NORMAL_MODE (ENTITY))
#define EPILOGUE_USES(REGNO) ((TARGET_SH2E || TARGET_SH4) \ #define EPILOGUE_USES(REGNO) (TARGET_FPU_ANY && REGNO == FPSCR_REG)
&& (REGNO) == FPSCR_REG)
#define DWARF_FRAME_RETURN_COLUMN (DWARF_FRAME_REGNUM (PR_REG)) #define DWARF_FRAME_RETURN_COLUMN (DWARF_FRAME_REGNUM (PR_REG))
......
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