This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH/m68k] fix incorrect asm_fprintf statements
- From: Gunther Nikl <gni at gecko dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 16 Jul 2003 13:51:07 +0200
- Subject: [PATCH/m68k] fix incorrect asm_fprintf statements
- References: <20030716114124.GA83650@lorien.int.gecko.de>
Hello!
This patch changes one asm_fprintf() statement and converts a fprintf into
asm_fprintf. The first change replaces a "_" character with %U to make the
statement user_label_prefix aware.
The second change replaces fprintf with asm_fprintf and HOST_WIDE_INT_PRINT_DEC
with %wd to make the MIT case match the MOTOROLA case.
Gunther
2003-07-16 Gunther Nikl <gni@gecko.de>
* config/m68k/m68k.c (m68k_output_function_prologue): use %U in
label name
* config/m68k/m68k.c (m68k_output_function_epilogue): replace
HOST_WIDE_INT_PRINT_DEC with %wd
--- m68k.c_ Mon Jul 7 10:25:32 2003
+++ m68k.c Wed Jul 16 13:41:54 2003
@@ -572,7 +572,7 @@ m68k_output_function_prologue (stream, s
asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM]);
#else
- asm_fprintf (stream, "\tmovel %I__GLOBAL_OFFSET_TABLE_, %s\n",
+ asm_fprintf (stream, "\tmovel %I%U_GLOBAL_OFFSET_TABLE_, %s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM]);
asm_fprintf (stream, "\tlea %Rpc@(0,%s:l),%s\n",
reg_names[PIC_OFFSET_TABLE_REGNUM],
@@ -713,10 +713,9 @@ m68k_output_function_epilogue (stream, s
reg_names[FRAME_POINTER_REGNUM],
reg_names[i]);
#else
- fprintf (stream,
- "\tmovel %s@(-" HOST_WIDE_INT_PRINT_DEC "),%s\n",
- reg_names[FRAME_POINTER_REGNUM],
- offset + fsize, reg_names[i]);
+ asm_fprintf (stream, "\tmovel %s@(-%wd),%s\n",
+ reg_names[FRAME_POINTER_REGNUM],
+ offset + fsize, reg_names[i]);
#endif
}
offset = offset - 4;