This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gcc-3_4-basic-improvements-branch] Patch to consolidate ASM_FORMAT_PRIVATE_NAME


 > From: Richard Henderson <rth@redhat.com>
 > 
 > > Note it's the only port that would have been okay with the old default
 > > for ASM_FORMAT_PRIVATE_NAME.  But I've changed that now so I'm not
 > > sure whether the call to ASM_GENERATE_INTERNAL_LABEL, the 'L' prefix
 > > and the '_' suffix are necessary.  Is there a definition of
 > > ASM_PN_FORMAT that would make this port happy?
 > 
 >   "*L%s_%lu"
 > 
 > would retain the current behaviour exactly.
 > r~


Thanks.

I installed this patch on the BI branch after recompiling cc1
cross-configured for dsp16xx-unknown-elf.



2002-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* dsp16xx.h (ASM_FORMAT_PRIVATE_NAME): Delete.
	(ASM_PN_FORMAT): Define.

diff -rup orig/egcc-bib-CVS20020916/gcc/config/dsp16xx/dsp16xx.h egcc-bib-CVS20020916/gcc/config/dsp16xx/dsp16xx.h
--- orig/egcc-bib-CVS20020916/gcc/config/dsp16xx/dsp16xx.h	Sat Aug 31 09:50:53 2002
+++ egcc-bib-CVS20020916/gcc/config/dsp16xx/dsp16xx.h	Mon Sep 16 13:56:37 2002
@@ -1642,22 +1642,7 @@ extern struct dsp16xx_frame_info current
   }									      \
   while (0)
 
-/* Store in OUTPUT a string (made with alloca) containing
-   an assembler-name for a local static variable or function
-   named NAME. LABELNO is an integer which is different for
-   each call.  */
-
-#define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)			\
-  do {									\
-    int len = strlen (NAME);						\
-    char *temp = (char *) alloca (len + 3);				\
-    temp[0] = 'L';							\
-    strcpy (&temp[1], (NAME));						\
-    temp[len + 1] = '_';						\
-    temp[len + 2] = 0;							\
-    (OUTPUT) = (char *) alloca (strlen (NAME) + 11);			\
-    ASM_GENERATE_INTERNAL_LABEL (OUTPUT, temp, LABELNO);		\
-  } while (0)
+#define ASM_PN_FORMAT "*L%s_%lu"
 
 /* OUTPUT OF UNINITIALIZED VARIABLES */
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]