Implement ASM_DECLARE_FUNCTION_NAME using ASM_OUTPUT_FUNCTION_LABEL
commitc659dd8bfb55e02a1b97407c1c28f7a0e8f7f09b
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 7 Dec 2023 12:08:26 +0000 (7 13:08 +0100)
committerIlya Leoshkevich <iii@linux.ibm.com>
Fri, 5 Jan 2024 11:23:53 +0000 (5 12:23 +0100)
treed0d4b21585b5a958ac1288b253e05bc59cf4f522
parent15cc291887dc9dd92b2c93f4545e20eb6c190122
Implement ASM_DECLARE_FUNCTION_NAME using ASM_OUTPUT_FUNCTION_LABEL

gccint recommends using ASM_OUTPUT_FUNCTION_LABEL in
ASM_DECLARE_FUNCTION_NAME, but many implementations use
ASM_OUTPUT_LABEL instead.  It's inconsistent and prevents changes to
ASM_OUTPUT_FUNCTION_LABEL from affecting the respective targets.

Link: https://inbox.sourceware.org/gcc-patches/20240102194511.3171559-2-iii@linux.ibm.com/
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
gcc/ChangeLog:

* config/aarch64/aarch64.cc (aarch64_declare_function_name):
Use ASM_OUTPUT_FUNCTION_LABEL ().
* config/alpha/alpha.cc (alpha_start_function): Likewise.
* config/arm/aout.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
* config/arm/arm.cc (arm_asm_declare_function_name): Likewise.
* config/bfin/bfin.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
* config/c6x/c6x.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
* config/gcn/gcn.cc (gcn_hsa_declare_function_name): Likewise.
* config/h8300/h8300.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
* config/ia64/ia64.cc (ia64_start_function): Likewise.
* config/mcore/mcore-elf.h (ASM_DECLARE_FUNCTION_NAME):
Likewise.
* config/microblaze/microblaze.cc (microblaze_function_prologue):
Likewise.
* config/mips/mips.cc (mips_start_unique_function): Return the
tree.
(mips_start_function_definition): Use
ASM_OUTPUT_FUNCTION_LABEL ().
(mips_finish_stub): Pass the tree to
mips_start_function_definition ().
(mips16_build_function_stub): Likewise.
(mips16_build_call_stub): Likewise.
(mips_output_function_prologue): Likewise.
* config/pa/pa.cc (pa_output_function_label): Use
ASM_OUTPUT_FUNCTION_LABEL ().
* config/riscv/riscv.cc (riscv_declare_function_name): Likewise.
* config/rs6000/rs6000.cc (rs6000_elf_declare_function_name):
Likewise.
(rs6000_xcoff_declare_function_name): Likewise.
15 files changed:
gcc/config/aarch64/aarch64.cc
gcc/config/alpha/alpha.cc
gcc/config/arm/aout.h
gcc/config/arm/arm.cc
gcc/config/bfin/bfin.h
gcc/config/c6x/c6x.h
gcc/config/gcn/gcn.cc
gcc/config/h8300/h8300.h
gcc/config/ia64/ia64.cc
gcc/config/mcore/mcore-elf.h
gcc/config/microblaze/microblaze.cc
gcc/config/mips/mips.cc
gcc/config/pa/pa.cc
gcc/config/riscv/riscv.cc
gcc/config/rs6000/rs6000.cc