mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-24 03:14:08 +08:00
rs6000-internal.h (create_TOC_reference): Delete.
2019-07-09 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/rs6000-internal.h (create_TOC_reference): Delete. * config/rs6000/rs6000-logue.c (create_TOC_reference): Move function from rs6000-logue.c back to rs6000.c. * config/rs6000/rs6000.c (create_TOC_reference): Likewise. From-SVN: r273309
This commit is contained in:
parent
6c1dae73cd
commit
18c0ed4b46
@ -1,3 +1,10 @@
|
||||
2019-07-09 Michael Meissner <meissner@linux.ibm.com>
|
||||
|
||||
* config/rs6000/rs6000-internal.h (create_TOC_reference): Delete.
|
||||
* config/rs6000/rs6000-logue.c (create_TOC_reference): Move
|
||||
function from rs6000-logue.c back to rs6000.c.
|
||||
* config/rs6000/rs6000.c (create_TOC_reference): Likewise.
|
||||
|
||||
2019-07-09 Martin Sebor <msebor@redhat.com>
|
||||
|
||||
PR c++/61339
|
||||
|
@ -92,7 +92,6 @@ extern void rs6000_emit_prologue_components (sbitmap components);
|
||||
extern void rs6000_emit_epilogue_components (sbitmap components);
|
||||
extern void rs6000_set_handled_components (sbitmap components);
|
||||
extern rs6000_stack_t * rs6000_stack_info (void);
|
||||
extern rtx create_TOC_reference (rtx symbol, rtx largetoc_reg);
|
||||
extern rtx rs6000_got_sym (void);
|
||||
extern struct machine_function *rs6000_init_machine_status (void);
|
||||
extern bool save_reg_p (int reg);
|
||||
|
@ -1406,41 +1406,6 @@ uses_TOC (void)
|
||||
}
|
||||
#endif
|
||||
|
||||
rtx
|
||||
create_TOC_reference (rtx symbol, rtx largetoc_reg)
|
||||
{
|
||||
rtx tocrel, tocreg, hi;
|
||||
|
||||
if (TARGET_DEBUG_ADDR)
|
||||
{
|
||||
if (SYMBOL_REF_P (symbol))
|
||||
fprintf (stderr, "\ncreate_TOC_reference, (symbol_ref %s)\n",
|
||||
XSTR (symbol, 0));
|
||||
else
|
||||
{
|
||||
fprintf (stderr, "\ncreate_TOC_reference, code %s:\n",
|
||||
GET_RTX_NAME (GET_CODE (symbol)));
|
||||
debug_rtx (symbol);
|
||||
}
|
||||
}
|
||||
|
||||
if (!can_create_pseudo_p ())
|
||||
df_set_regs_ever_live (TOC_REGISTER, true);
|
||||
|
||||
tocreg = gen_rtx_REG (Pmode, TOC_REGISTER);
|
||||
tocrel = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, symbol, tocreg), UNSPEC_TOCREL);
|
||||
if (TARGET_CMODEL == CMODEL_SMALL || can_create_pseudo_p ())
|
||||
return tocrel;
|
||||
|
||||
hi = gen_rtx_HIGH (Pmode, copy_rtx (tocrel));
|
||||
if (largetoc_reg != NULL)
|
||||
{
|
||||
emit_move_insn (largetoc_reg, hi);
|
||||
hi = largetoc_reg;
|
||||
}
|
||||
return gen_rtx_LO_SUM (Pmode, hi, tocrel);
|
||||
}
|
||||
|
||||
/* Issue assembly directives that create a reference to the given DWARF
|
||||
FRAME_TABLE_LABEL from the current function section. */
|
||||
void
|
||||
|
@ -7735,6 +7735,45 @@ constant_pool_expr_p (rtx op)
|
||||
&& ASM_OUTPUT_SPECIAL_POOL_ENTRY_P (get_pool_constant (base), Pmode));
|
||||
}
|
||||
|
||||
/* Create a TOC reference for symbol_ref SYMBOL. If LARGETOC_REG is non-null,
|
||||
use that as the register to put the HIGH value into if register allocation
|
||||
is already done. */
|
||||
|
||||
rtx
|
||||
create_TOC_reference (rtx symbol, rtx largetoc_reg)
|
||||
{
|
||||
rtx tocrel, tocreg, hi;
|
||||
|
||||
if (TARGET_DEBUG_ADDR)
|
||||
{
|
||||
if (SYMBOL_REF_P (symbol))
|
||||
fprintf (stderr, "\ncreate_TOC_reference, (symbol_ref %s)\n",
|
||||
XSTR (symbol, 0));
|
||||
else
|
||||
{
|
||||
fprintf (stderr, "\ncreate_TOC_reference, code %s:\n",
|
||||
GET_RTX_NAME (GET_CODE (symbol)));
|
||||
debug_rtx (symbol);
|
||||
}
|
||||
}
|
||||
|
||||
if (!can_create_pseudo_p ())
|
||||
df_set_regs_ever_live (TOC_REGISTER, true);
|
||||
|
||||
tocreg = gen_rtx_REG (Pmode, TOC_REGISTER);
|
||||
tocrel = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, symbol, tocreg), UNSPEC_TOCREL);
|
||||
if (TARGET_CMODEL == CMODEL_SMALL || can_create_pseudo_p ())
|
||||
return tocrel;
|
||||
|
||||
hi = gen_rtx_HIGH (Pmode, copy_rtx (tocrel));
|
||||
if (largetoc_reg != NULL)
|
||||
{
|
||||
emit_move_insn (largetoc_reg, hi);
|
||||
hi = largetoc_reg;
|
||||
}
|
||||
return gen_rtx_LO_SUM (Pmode, hi, tocrel);
|
||||
}
|
||||
|
||||
/* These are only used to pass through from print_operand/print_operand_address
|
||||
to rs6000_output_addr_const_extra over the intervening function
|
||||
output_addr_const which is not target code. */
|
||||
|
Loading…
Reference in New Issue
Block a user