diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2019-05-16 17:38:29 +0000 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gcc.gnu.org> | 2019-05-16 17:38:29 +0000 |
commit | f7430263c07b4a1bcf3deb708c8c691f233fcb40 (patch) | |
tree | 41d308d65398f5a9a8a6d8e2ad807d0fa3ba5112 /gcc/config/epiphany | |
parent | 6727c729849dc2feca833ecc874b6a0aef520acd (diff) | |
download | gcc-f7430263c07b4a1bcf3deb708c8c691f233fcb40.zip gcc-f7430263c07b4a1bcf3deb708c8c691f233fcb40.tar.gz gcc-f7430263c07b4a1bcf3deb708c8c691f233fcb40.tar.bz2 |
gcc: move assemble_start_function / assemble_end_function to output_mi_thunk
Let backends call assemble_start_function after they have generated
thunk function body so that a constant pool could be output if it is
required. This may help backends to avoid implementing custom constant
loading code specifically for the MI thunk and reuse existing
functionality.
gcc/
2019-05-16 Max Filippov <jcmvbkbc@gmail.com>
* cgraphunit.c (cgraph_node::expand_thunk): Remove
assemble_start_function and assemble_end_function calls.
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Call
assemble_start_function and assemble_end_function.
* config/arc/arc.c (arc_output_mi_thunk): Likewise.
* config/arm/arm.c (arm_output_mi_thunk): Likewise.
* config/bfin/bfin.c (bfin_output_mi_thunk): Likewise.
* config/c6x/c6x.c (c6x_output_mi_thunk): Likewise.
* config/cris/cris.c (cris_asm_output_mi_thunk): Likewise.
* config/csky/csky.c (csky_output_mi_thunk): Likewise.
* config/epiphany/epiphany.c (epiphany_output_mi_thunk): Likewise.
* config/frv/frv.c (frv_asm_output_mi_thunk): Likewise.
* config/i386/i386.c (x86_output_mi_thunk): Likewise.
* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
* config/m68k/m68k.c (m68k_output_mi_thunk): Likewise.
* config/microblaze/microblaze.c (microblaze_asm_output_mi_thunk):
Likewise.
* config/mips/mips.c (mips_output_mi_thunk): Likewise.
* config/mmix/mmix.c (mmix_asm_output_mi_thunk): Likewise.
* config/mn10300/mn10300.c (mn10300_asm_output_mi_thunk): Likewise.
* config/nds32/nds32.c (nds32_asm_output_mi_thunk): Likewise.
* config/nios2/nios2.c (nios2_asm_output_mi_thunk): Likewise.
* config/or1k/or1k.c (or1k_output_mi_thunk): Likewise.
* config/pa/pa.c (pa_asm_output_mi_thunk): Likewise.
* config/riscv/riscv.c (riscv_output_mi_thunk): Likewise.
* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
* config/s390/s390.c (s390_output_mi_thunk): Likewise.
* config/sh/sh.c (sh_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
* config/spu/spu.c (spu_output_mi_thunk): Likewise.
* config/stormy16/stormy16.c (xstormy16_asm_output_mi_thunk):
Likewise.
* config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise.
* config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise.
* config/vax/vax.c (vax_output_mi_thunk): Likewise.
From-SVN: r271293
Diffstat (limited to 'gcc/config/epiphany')
-rw-r--r-- | gcc/config/epiphany/epiphany.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c index 68b9db9..657a888 100644 --- a/gcc/config/epiphany/epiphany.c +++ b/gcc/config/epiphany/epiphany.c @@ -2892,11 +2892,13 @@ epiphany_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, HOST_WIDE_INT vcall_offset, tree function) { + const char *fnname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (thunk)); int this_regno = aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function) ? 1 : 0; const char *this_name = reg_names[this_regno]; const char *fname; + assemble_start_function (thunk, fnname); /* We use IP and R16 as a scratch registers. */ gcc_assert (call_used_regs [GPR_IP]); gcc_assert (call_used_regs [GPR_16]); @@ -2954,6 +2956,7 @@ epiphany_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, assemble_name (file, fname); fputc ('\n', file); } + assemble_end_function (thunk, fnname); } void |