[SPARC] Reimplement LEAF_REG_REMAP macro

Eric Botcazou botcazou@adacore.com
Sun Jun 6 21:58:51 GMT 2021

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.

Tested on SPARC/Solaris, applied on the mainline.

2021-06-06  Eric Botcazou  <ebotcazou@adacore.com>

	* config/sparc/sparc-protos.h (order_regs_for_local_alloc): Rename
	(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.

Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 4698 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210606/b4206431/attachment.bin>

More information about the Gcc-patches mailing list