From 4977bab6ed59f01c73f9c8b9e92298706df9b6d5 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Mon, 16 Dec 2002 18:23:00 +0000 Subject: Merge basic-improvements-branch to trunk From-SVN: r60174 --- gcc/defaults.h | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'gcc/defaults.h') diff --git a/gcc/defaults.h b/gcc/defaults.h index 0c71996..445aa5a 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -54,21 +54,27 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA # define CPP_PREDEFINES "" #endif -/* Store in OUTPUT a string (made with alloca) containing - an assembler-name for a local static variable or function named NAME. +/* 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. */ +#ifndef ASM_PN_FORMAT +# ifndef NO_DOT_IN_LABEL +# define ASM_PN_FORMAT "%s.%lu" +# else +# ifndef NO_DOLLAR_IN_LABEL +# define ASM_PN_FORMAT "%s$%lu" +# else +# define ASM_PN_FORMAT "__%s_%lu" +# endif +# endif +#endif /* ! ASM_PN_FORMAT */ + #ifndef ASM_FORMAT_PRIVATE_NAME -#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); \ +# define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ + do { const char *const name_ = (NAME); \ + char *const output_ = (OUTPUT) = (char *) alloca (strlen (name_) + 32);\ + sprintf (output_, ASM_PN_FORMAT, name_, (unsigned long)(LABELNO)); \ } while (0) #endif @@ -82,7 +88,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #ifndef ASM_OUTPUT_ADDR_VEC_ELT #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ do { fputs (integer_asm_op (POINTER_SIZE / UNITS_PER_WORD, TRUE), FILE); \ - ASM_OUTPUT_INTERNAL_LABEL (FILE, "L", (VALUE)); \ + (*targetm.asm_out.internal_label) (FILE, "L", (VALUE)); \ fputc ('\n', FILE); \ } while (0) #endif @@ -160,7 +166,7 @@ do { fputs (integer_asm_op (POINTER_SIZE / UNITS_PER_WORD, TRUE), FILE); \ #ifndef ASM_OUTPUT_DEBUG_LABEL #define ASM_OUTPUT_DEBUG_LABEL(FILE, PREFIX, NUM) \ - ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM) + (*targetm.asm_out.internal_label) (FILE, PREFIX, NUM) #endif /* This is how we tell the assembler that a symbol is weak. */ -- cgit v1.1