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]

Patch for redundant code in stormy16.h


While looking at something else, I noticed some redundant code in
stormy16.h.  I made the patch contain enough suffix lines so you can
see that ASM_OUTPUT_LABEL_REF is in fact a duplicate of the explicit
code I eliminated.

Tested by cross-compiling cc1 to xstormy16-unknown-elf.

Ok to install?

		Thanks,
		--Kaveh


2002-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* stormy16.h (ASM_OUTPUT_SYMBOL_REF): Use ASM_OUTPUT_LABEL_REF.
	
diff -ru15p orig/egcc-CVS20020727/gcc/config/stormy16/stormy16.h egcc-CVS20020727/gcc/config/stormy16/stormy16.h
--- orig/egcc-CVS20020727/gcc/config/stormy16/stormy16.h	2002-07-17 22:50:22.000000000 -0400
+++ egcc-CVS20020727/gcc/config/stormy16/stormy16.h	2002-07-27 20:15:24.659897324 -0400
@@ -2786,35 +2786,31 @@ do {							\
    assembler definition of a label named NAME.  Use the expression
    `assemble_name (STREAM, NAME)' to output the name itself; before and after
    that, output the additional assembler syntax for defining the name, and a
    newline.  */
 #define ASM_OUTPUT_LABEL(STREAM, NAME)					\
 do {									\
   assemble_name (STREAM, NAME);						\
   fputs (":\n", STREAM);						\
 } while (0)
 
 /* A C statement to output to the stdio stream STREAM the assembler
    definition of a symbol named SYMBOL.  */
 #define ASM_OUTPUT_SYMBOL_REF(STREAM, SYMBOL)				\
   do {									\
     if (SYMBOL_REF_FLAG (SYMBOL))					\
-      {									\
-        fputs ("@fptr(", STREAM);					\
-	assemble_name (STREAM, XSTR (SYMBOL, 0));			\
-	fputc (')', STREAM);						\
-      }									\
+      ASM_OUTPUT_LABEL_REF ((STREAM), XSTR (SYMBOL, 0));		\
     else								\
       assemble_name (STREAM, XSTR (SYMBOL, 0));				\
   } while (0)
 
 /* A C statement to output to the stdio stream STREAM the assembler
    definition of a label, the textual form is in 'BUF'.  Not used
    for %l.  */
 #define ASM_OUTPUT_LABEL_REF(STREAM, NAME)	\
 do  {						\
   fputs ("@fptr(", STREAM);			\
   assemble_name (STREAM, NAME);			\
   fputc (')', STREAM);				\
 } while (0)
 
 /* A C statement (sans semicolon) to output to the stdio stream STREAM any text


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