From fed94fc9e704b0de228499495b7ca4d4c79ef76b Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 6 Jun 2021 23:54:24 +0200 Subject: Reimplement LEAF_REG_REMAP macro for the SPARC The current implementation as an array of chars is indeed a bit awkward so this reimplements it as a function taking and returning an int. gcc/ * config/sparc/sparc-protos.h (order_regs_for_local_alloc): Rename to... (sparc_order_regs_for_local_alloc): ...this. (sparc_leaf_reg_remap): Declare. * config/sparc/sparc.h (ADJUST_REG_ALLOC_ORDER): Adjust. (LEAF_REG_REMAP): Reimplement as call to sparc_leaf_reg_remap. * config/sparc/sparc.c (leaf_reg_remap): Delete. (order_regs_for_local_alloc): Rename to... (sparc_order_regs_for_local_alloc): ...this. (sparc_leaf_reg_remap): New function. (sparc_conditional_register_usage): Do not modify leaf_reg_remap. --- gcc/config/sparc/sparc-protos.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/config/sparc/sparc-protos.h') diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h index ad875cc..8879ac3 100644 --- a/gcc/config/sparc/sparc-protos.h +++ b/gcc/config/sparc/sparc-protos.h @@ -30,7 +30,8 @@ extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree); extern unsigned long sparc_type_code (tree); #endif /* TREE_CODE */ -extern void order_regs_for_local_alloc (void); +extern void sparc_order_regs_for_local_alloc (void); +extern int sparc_leaf_reg_remap (int); extern int sparc_initial_elimination_offset (int); extern void sparc_expand_prologue (void); extern void sparc_flat_expand_prologue (void); -- cgit v1.1