aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-09-15 15:49:02 +0200
committerMartin Liska <mliska@suse.cz>2021-10-20 14:27:49 +0200
commit7113f1b54d533526c81459324faea4c100c50497 (patch)
tree2936a60771849d613c6be75e98eeb9c82223db3f /gcc/config/arm
parent25ab851dd333d7369229050536bd7238091139bb (diff)
downloadgcc-7113f1b54d533526c81459324faea4c100c50497.zip
gcc-7113f1b54d533526c81459324faea4c100c50497.tar.gz
gcc-7113f1b54d533526c81459324faea4c100c50497.tar.bz2
Rename asm_out_file function arguments.
As preparation for a new global object that will encapsulate asm_out_file, we would need to live with a macro that will define asm_out_file as casm->out_file and thus the name can't be used in function arguments. gcc/ChangeLog: * config/arm/arm.c (arm_unwind_emit_sequence): Do not declare already declared global variable. (arm_unwind_emit_set): Use out_file as function argument. (arm_unwind_emit): Likewise. * config/darwin.c (machopic_output_data_section_indirection): Likewise. (machopic_output_stub_indirection): Likewise. (machopic_output_indirection): Likewise. (machopic_finish): Likewise. * config/i386/i386.c (ix86_asm_output_function_label): Likewise. * config/i386/winnt.c (i386_pe_seh_unwind_emit): Likewise. * config/ia64/ia64.c (process_epilogue): Likewise. (process_cfa_adjust_cfa): Likewise. (process_cfa_register): Likewise. (process_cfa_offset): Likewise. (ia64_asm_unwind_emit): Likewise. * config/s390/s390.c (s390_asm_output_function_label): Likewise.
Diffstat (limited to 'gcc/config/arm')
-rw-r--r--gcc/config/arm/arm.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index e51f60a..c4ff06b 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -838,8 +838,6 @@ static char * minipool_startobj;
will be conditionalised if possible. */
static int max_insns_skipped = 5;
-extern FILE * asm_out_file;
-
/* True if we are currently building a constant table. */
int making_const_table;
@@ -29408,7 +29406,7 @@ arm_dwarf_register_span (rtx rtl)
epilogue. */
static void
-arm_unwind_emit_sequence (FILE * asm_out_file, rtx p)
+arm_unwind_emit_sequence (FILE * out_file, rtx p)
{
int i;
HOST_WIDE_INT offset;
@@ -29452,14 +29450,14 @@ arm_unwind_emit_sequence (FILE * asm_out_file, rtx p)
padlast = offset - 4;
gcc_assert (padlast == 0 || padlast == 4);
if (padlast == 4)
- fprintf (asm_out_file, "\t.pad #4\n");
+ fprintf (out_file, "\t.pad #4\n");
reg_size = 4;
- fprintf (asm_out_file, "\t.save {");
+ fprintf (out_file, "\t.save {");
}
else if (IS_VFP_REGNUM (reg))
{
reg_size = 8;
- fprintf (asm_out_file, "\t.vsave {");
+ fprintf (out_file, "\t.vsave {");
}
else
/* Unknown register type. */
@@ -29485,13 +29483,13 @@ arm_unwind_emit_sequence (FILE * asm_out_file, rtx p)
gcc_assert (reg >= lastreg);
if (i != 1)
- fprintf (asm_out_file, ", ");
+ fprintf (out_file, ", ");
/* We can't use %r for vfp because we need to use the
double precision register names. */
if (IS_VFP_REGNUM (reg))
- asm_fprintf (asm_out_file, "d%d", (reg - FIRST_VFP_REGNUM) / 2);
+ asm_fprintf (out_file, "d%d", (reg - FIRST_VFP_REGNUM) / 2);
else
- asm_fprintf (asm_out_file, "%r", reg);
+ asm_fprintf (out_file, "%r", reg);
if (flag_checking)
{
@@ -29509,15 +29507,15 @@ arm_unwind_emit_sequence (FILE * asm_out_file, rtx p)
offset += reg_size;
}
}
- fprintf (asm_out_file, "}\n");
+ fprintf (out_file, "}\n");
if (padfirst)
- fprintf (asm_out_file, "\t.pad #%d\n", padfirst);
+ fprintf (out_file, "\t.pad #%d\n", padfirst);
}
/* Emit unwind directives for a SET. */
static void
-arm_unwind_emit_set (FILE * asm_out_file, rtx p)
+arm_unwind_emit_set (FILE * out_file, rtx p)
{
rtx e0;
rtx e1;
@@ -29534,12 +29532,12 @@ arm_unwind_emit_set (FILE * asm_out_file, rtx p)
|| REGNO (XEXP (XEXP (e0, 0), 0)) != SP_REGNUM)
abort ();
- asm_fprintf (asm_out_file, "\t.save ");
+ asm_fprintf (out_file, "\t.save ");
if (IS_VFP_REGNUM (REGNO (e1)))
- asm_fprintf(asm_out_file, "{d%d}\n",
+ asm_fprintf(out_file, "{d%d}\n",
(REGNO (e1) - FIRST_VFP_REGNUM) / 2);
else
- asm_fprintf(asm_out_file, "{%r}\n", REGNO (e1));
+ asm_fprintf(out_file, "{%r}\n", REGNO (e1));
break;
case REG:
@@ -29552,7 +29550,7 @@ arm_unwind_emit_set (FILE * asm_out_file, rtx p)
|| !CONST_INT_P (XEXP (e1, 1)))
abort ();
- asm_fprintf (asm_out_file, "\t.pad #%wd\n",
+ asm_fprintf (out_file, "\t.pad #%wd\n",
-INTVAL (XEXP (e1, 1)));
}
else if (REGNO (e0) == HARD_FRAME_POINTER_REGNUM)
@@ -29566,14 +29564,14 @@ arm_unwind_emit_set (FILE * asm_out_file, rtx p)
abort ();
reg = REGNO (XEXP (e1, 0));
offset = INTVAL (XEXP (e1, 1));
- asm_fprintf (asm_out_file, "\t.setfp %r, %r, #%wd\n",
+ asm_fprintf (out_file, "\t.setfp %r, %r, #%wd\n",
HARD_FRAME_POINTER_REGNUM, reg,
offset);
}
else if (REG_P (e1))
{
reg = REGNO (e1);
- asm_fprintf (asm_out_file, "\t.setfp %r, %r\n",
+ asm_fprintf (out_file, "\t.setfp %r, %r\n",
HARD_FRAME_POINTER_REGNUM, reg);
}
else
@@ -29582,7 +29580,7 @@ arm_unwind_emit_set (FILE * asm_out_file, rtx p)
else if (REG_P (e1) && REGNO (e1) == SP_REGNUM)
{
/* Move from sp to reg. */
- asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0));
+ asm_fprintf (out_file, "\t.movsp %r\n", REGNO (e0));
}
else if (GET_CODE (e1) == PLUS
&& REG_P (XEXP (e1, 0))
@@ -29590,7 +29588,7 @@ arm_unwind_emit_set (FILE * asm_out_file, rtx p)
&& CONST_INT_P (XEXP (e1, 1)))
{
/* Set reg to offset from sp. */
- asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n",
+ asm_fprintf (out_file, "\t.movsp %r, #%d\n",
REGNO (e0), (int)INTVAL(XEXP (e1, 1)));
}
else
@@ -29606,7 +29604,7 @@ arm_unwind_emit_set (FILE * asm_out_file, rtx p)
/* Emit unwind directives for the given insn. */
static void
-arm_unwind_emit (FILE * asm_out_file, rtx_insn *insn)
+arm_unwind_emit (FILE * out_file, rtx_insn *insn)
{
rtx note, pat;
bool handled_one = false;
@@ -29649,7 +29647,7 @@ arm_unwind_emit (FILE * asm_out_file, rtx_insn *insn)
gcc_assert (src == stack_pointer_rtx);
reg = REGNO (dest);
- asm_fprintf (asm_out_file, "\t.unwind_raw 0, 0x%x @ vsp = r%d\n",
+ asm_fprintf (out_file, "\t.unwind_raw 0, 0x%x @ vsp = r%d\n",
reg + 0x90, reg);
}
handled_one = true;
@@ -29682,12 +29680,12 @@ arm_unwind_emit (FILE * asm_out_file, rtx_insn *insn)
switch (GET_CODE (pat))
{
case SET:
- arm_unwind_emit_set (asm_out_file, pat);
+ arm_unwind_emit_set (out_file, pat);
break;
case SEQUENCE:
/* Store multiple. */
- arm_unwind_emit_sequence (asm_out_file, pat);
+ arm_unwind_emit_sequence (out_file, pat);
break;
default: