This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Local labels for ashrdi (and friends)
- To: egcs-bugs at cygnus dot com
- Subject: Local labels for ashrdi (and friends)
- From: Jesper Skov <jskov at cygnus dot co dot uk>
- Date: 18 Nov 1997 18:58:31 +0000
- Newsgroups: cygnus.egcs.bugs
- Organization: Cygnus Solutions, Cambridge, UK
Hi,
The code in i386.md outputting local labels for the ashrdi code is not
doing it correctly (I think) - the labels are global.
I copied some #ifdef LOCAL_LABEL_PREFIX handling from some other code
in there, but apparently LOCAL_LABEL_PREFIX is not used for i386
targets and thus the patch doesn't work.
I hope someone knows what's going on, and how to fix it properly. At
the momement I just define LOCAL_LABEL_PREFIX "." in i386.h.
Thanks,
JEsper
Index: i386.md
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.4
diff -r1.4 i386.md
4551c4551,4557
< asm_fprintf (asm_out_file, \"\\tje %LLASHLDI%d\\n\", ashldi_label_number);
---
> #ifdef LOCAL_LABEL_PREFIX
> asm_fprintf (asm_out_file, \"\\tje %sLASHLDI%d\\n\",
> LOCAL_LABEL_PREFIX, ashldi_label_number);
> #else
> asm_fprintf (asm_out_file, \"\\tje %sLASHLDI%d\\n\",
> \"\", ashldi_label_number);
> #endif
4554c4560,4566
< asm_fprintf (asm_out_file, \"%LLASHLDI%d:\\n\", ashldi_label_number++);
---
> #ifdef LOCAL_LABEL_PREFIX
> asm_fprintf (asm_out_file, \"%sLASHLDI%d:\\n\",
> LOCAL_LABEL_PREFIX, ashldi_label_number++);
> #else
> asm_fprintf (asm_out_file, \"%sLASHLDI%d:\\n\",
> \"\", ashldi_label_number++);
> #endif
4739c4751,4757
< asm_fprintf (asm_out_file, \"\\tje %LLASHRDI%d\\n\", ashrdi_label_number);
---
> #ifdef LOCAL_LABEL_PREFIX
> asm_fprintf (asm_out_file, \"\\tje %sLASHRDI%d\\n\",
> LOCAL_LABEL_PREFIX, ashrdi_label_number);
> #else
> asm_fprintf (asm_out_file, \"\\tje %sLASHRDI%d\\n\",
> \"\", ashrdi_label_number);
> #endif
4743c4761,4767
< asm_fprintf (asm_out_file, \"%LLASHRDI%d:\\n\", ashrdi_label_number++);
---
> #ifdef LOCAL_LABEL_PREFIX
> asm_fprintf (asm_out_file, \"%sLASHRDI%d:\\n\",
> LOCAL_LABEL_PREFIX, ashrdi_label_number++);
> #else
> asm_fprintf (asm_out_file, \"%sLASHRDI%d:\\n\",
> \"\", ashrdi_label_number++);
> #endif
4894c4918,4924
< asm_fprintf (asm_out_file, \"\\tje %LLLSHRDI%d\\n\", lshrdi_label_number);
---
> #ifdef LOCAL_LABEL_PREFIX
> asm_fprintf (asm_out_file, \"\\tje %sLLSHRDI%d\\n\",
> LOCAL_LABEL_PREFIX, lshrdi_label_number);
> #else
> asm_fprintf (asm_out_file, \"\\tje %sLLSHRDI%d\\n\",
> \"\", lshrdi_label_number);
> #endif
4897c4927,4933
< asm_fprintf (asm_out_file, \"%LLLSHRDI%d:\\n\", lshrdi_label_number++);
---
> #ifdef LOCAL_LABEL_PREFIX
> asm_fprintf (asm_out_file, \"%sLLSHRDI%d:\\n\",
> LOCAL_LABEL_PREFIX, lshrdi_label_number++);
> #else
> asm_fprintf (asm_out_file, \"%sLLSHRDI%d:\\n\",
> \"\", lshrdi_label_number++);
> #endif