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]

bunch of small speed patches


These are a collection of small speed patches.  They do make the
compiler faster, but not by a significant amount; they're mostly
cleanups to make understanding certain behaviour easier.

The two 'make X a string' changes combine to reduce the size of the
identifier hash table by about 1% on my testcase.  I'll next see what
happens if you remove all the GIMPLE temporary variables from the
table.

Bootstrapped & tested on powerpc-darwin, except that libjava didn't
build because the Makefile wanted VMFile.java and I don't have one.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-speed-some.patch======================
2004-09-10  Geoffrey Keating  <geoffk@apple.com>

	* gcc/config/rs6000/rs6000.c (print_operand): Use fputs instead
	of fprintf for register names.
	
	* config/darwin.c: Include target.h.
	(struct machopic_indirection): Make ptr_name a string.
	(machopic_indirection_hash): Update for ptr_name a string.
	(machopic_indirection_eq): Likewise.
	(machopic_indirection_name): Likewise.
	(machopic_output_indirection): Likewise.
	(machopic_validate_stub_or_non_lazy_ptr): Update for ptr_name a
	string.  Don't expect stub names to be in the identifier hash table.
	Do call strip_name_encoding before looking up entry in ID hash table.
	* config/t-darwin (darwin.o): Add target.h to dependencies.
	
	* dbxout.c (dbxout_block): Update for
	current_function_func_begin_label a string.
	* dwarf2out.c (dwarf2out_begin_prologue): Likewise.
	* except.c (dw2_output_call_site_table): Likewise.
	* toplev.c (current_function_func_begin_label): Likewise.
	* tree.h (current_function_func_begin_label): Likewise.
	* config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Likewise.

	* output.h (unlikely_section_label): Delete declaration.
	(unlikely_text_section_name): Likewise.
	* varasm.c (unlikely_section_label_printed): Make static.
	(unlikely_section_label): Likewise.
	(unlikely_text_section_name): Likewise.
	(assemble_start_function): Use reconcat.

	* final.c (output_asm_insn): Use strtoul instead of atoi, save a
	loop.

	* rtl.def (REG): Add comment to describe third field.

Index: gcc/dbxout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dbxout.c,v
retrieving revision 1.198
diff -u -p -u -p -r1.198 dbxout.c
--- gcc/dbxout.c	8 Sep 2004 07:47:44 -0000	1.198
+++ gcc/dbxout.c	10 Sep 2004 04:58:02 -0000
@@ -3174,8 +3174,8 @@ static void
 dbxout_block (tree block, int depth, tree args)
 {
   const char *begin_label;
-  if (current_function_func_begin_label != NULL_TREE)
-    begin_label = IDENTIFIER_POINTER (current_function_func_begin_label);
+  if (current_function_func_begin_label != NULL)
+    begin_label = current_function_func_begin_label;
   else
     begin_label = XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0);
 
Index: gcc/dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.544
diff -u -p -u -p -r1.544 dwarf2out.c
--- gcc/dwarf2out.c	8 Sep 2004 07:47:45 -0000	1.544
+++ gcc/dwarf2out.c	10 Sep 2004 04:58:02 -0000
@@ -2334,9 +2334,10 @@ dwarf2out_begin_prologue (unsigned int l
 			  const char *file ATTRIBUTE_UNUSED)
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
+  char * dup_label;
   dw_fde_ref fde;
 
-  current_function_func_begin_label = 0;
+  current_function_func_begin_label = NULL;
 
 #ifdef TARGET_UNWIND_INFO
   /* ??? current_function_func_begin_label is also used by except.c
@@ -2355,7 +2356,8 @@ dwarf2out_begin_prologue (unsigned int l
 			       current_function_funcdef_no);
   ASM_OUTPUT_DEBUG_LABEL (asm_out_file, FUNC_BEGIN_LABEL,
 			  current_function_funcdef_no);
-  current_function_func_begin_label = get_identifier (label);
+  dup_label = xstrdup (label);
+  current_function_func_begin_label = dup_label;
 
 #ifdef TARGET_UNWIND_INFO
   /* We can elide the fde allocation if we're not emitting debug info.  */
@@ -2379,7 +2381,7 @@ dwarf2out_begin_prologue (unsigned int l
   /* Add the new FDE at the end of the fde_table.  */
   fde = &fde_table[fde_table_in_use++];
   fde->decl = current_function_decl;
-  fde->dw_fde_begin = xstrdup (label);
+  fde->dw_fde_begin = dup_label;
   fde->dw_fde_current_label = NULL;
   fde->dw_fde_end = NULL;
   fde->dw_fde_cfi = NULL;
Index: gcc/except.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/except.c,v
retrieving revision 1.285
diff -u -p -u -p -r1.285 except.c
--- gcc/except.c	8 Sep 2004 08:05:13 -0000	1.285
+++ gcc/except.c	10 Sep 2004 04:58:03 -0000
@@ -3476,8 +3476,6 @@ sjlj_size_of_call_site_table (void)
 static void
 dw2_output_call_site_table (void)
 {
-  const char *const function_start_lab
-    = IDENTIFIER_POINTER (current_function_func_begin_label);
   int n = cfun->eh->call_site_data_used;
   int i;
 
@@ -3500,21 +3498,25 @@ dw2_output_call_site_table (void)
       /* ??? Perhaps use attr_length to choose data1 or data2 instead of
 	 data4 if the function is small enough.  */
 #ifdef HAVE_AS_LEB128
-      dw2_asm_output_delta_uleb128 (reg_start_lab, function_start_lab,
+      dw2_asm_output_delta_uleb128 (reg_start_lab,
+				    current_function_func_begin_label,
 				    "region %d start", i);
       dw2_asm_output_delta_uleb128 (reg_end_lab, reg_start_lab,
 				    "length");
       if (cs->landing_pad)
-	dw2_asm_output_delta_uleb128 (landing_pad_lab, function_start_lab,
+	dw2_asm_output_delta_uleb128 (landing_pad_lab,
+				      current_function_func_begin_label,
 				      "landing pad");
       else
 	dw2_asm_output_data_uleb128 (0, "landing pad");
 #else
-      dw2_asm_output_delta (4, reg_start_lab, function_start_lab,
+      dw2_asm_output_delta (4, reg_start_lab,
+			    current_function_func_begin_label,
 			    "region %d start", i);
       dw2_asm_output_delta (4, reg_end_lab, reg_start_lab, "length");
       if (cs->landing_pad)
-	dw2_asm_output_delta (4, landing_pad_lab, function_start_lab,
+	dw2_asm_output_delta (4, landing_pad_lab,
+			      current_function_func_begin_label,
 			      "landing pad");
       else
 	dw2_asm_output_data (4, 0, "landing pad");
Index: gcc/final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.335
diff -u -p -u -p -r1.335 final.c
--- gcc/final.c	8 Sep 2004 15:44:43 -0000	1.335
+++ gcc/final.c	10 Sep 2004 04:58:03 -0000
@@ -3084,61 +3084,66 @@ output_asm_insn (const char *template, r
 	else if (ISALPHA (*p))
 	  {
 	    int letter = *p++;
-	    c = atoi (p);
-
-	    if (! ISDIGIT (*p))
-	      output_operand_lossage ("operand number missing after %%-letter");
-	    else if (this_is_asm_operands
-		     && (c < 0 || (unsigned int) c >= insn_noperands))
+	    unsigned long opnum;
+	    char *endptr;
+	    
+	    opnum = strtoul (p, &endptr, 10);
+
+	    if (endptr == p)
+	      output_operand_lossage ("operand number missing "
+				      "after %%-letter");
+	    else if (this_is_asm_operands && opnum >= insn_noperands)
 	      output_operand_lossage ("operand number out of range");
 	    else if (letter == 'l')
-	      output_asm_label (operands[c]);
+	      output_asm_label (operands[opnum]);
 	    else if (letter == 'a')
-	      output_address (operands[c]);
+	      output_address (operands[opnum]);
 	    else if (letter == 'c')
 	      {
-		if (CONSTANT_ADDRESS_P (operands[c]))
-		  output_addr_const (asm_out_file, operands[c]);
+		if (CONSTANT_ADDRESS_P (operands[opnum]))
+		  output_addr_const (asm_out_file, operands[opnum]);
 		else
-		  output_operand (operands[c], 'c');
+		  output_operand (operands[opnum], 'c');
 	      }
 	    else if (letter == 'n')
 	      {
-		if (GET_CODE (operands[c]) == CONST_INT)
+		if (GET_CODE (operands[opnum]) == CONST_INT)
 		  fprintf (asm_out_file, HOST_WIDE_INT_PRINT_DEC,
-			   - INTVAL (operands[c]));
+			   - INTVAL (operands[opnum]));
 		else
 		  {
 		    putc ('-', asm_out_file);
-		    output_addr_const (asm_out_file, operands[c]);
+		    output_addr_const (asm_out_file, operands[opnum]);
 		  }
 	      }
 	    else
-	      output_operand (operands[c], letter);
+	      output_operand (operands[opnum], letter);
 
-	    if (!opoutput[c])
+	    if (!opoutput[opnum])
 	      oporder[ops++] = c;
-	    opoutput[c] = 1;
+	    opoutput[opnum] = 1;
 
-	    while (ISDIGIT (c = *p))
-	      p++;
+	    p = endptr;
+	    c = *p;
 	  }
 	/* % followed by a digit outputs an operand the default way.  */
 	else if (ISDIGIT (*p))
 	  {
-	    c = atoi (p);
-	    if (this_is_asm_operands
-		&& (c < 0 || (unsigned int) c >= insn_noperands))
+	    unsigned long opnum;
+	    char *endptr;
+	    
+	    opnum = strtoul (p, &endptr, 10);
+	    if (this_is_asm_operands && opnum >= insn_noperands)
 	      output_operand_lossage ("operand number out of range");
 	    else
-	      output_operand (operands[c], 0);
+	      output_operand (operands[opnum], 0);
 
-	    if (!opoutput[c])
+	    if (!opoutput[opnum])
 	      oporder[ops++] = c;
-	    opoutput[c] = 1;
+	    opoutput[opnum] = 1;
 
-	    while (ISDIGIT (c = *p))
-	      p++;
+	    p = endptr;
+	    c = *p;
 	  }
 	/* % followed by punctuation: output something for that
 	   punctuation character alone, with no operand.
Index: gcc/output.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/output.h,v
retrieving revision 1.144
diff -u -p -u -p -r1.144 output.h
--- gcc/output.h	18 Aug 2004 16:21:53 -0000	1.144
+++ gcc/output.h	10 Sep 2004 04:58:03 -0000
@@ -392,10 +392,6 @@ extern const char *first_global_object_n
 /* The first weak object in the file.  */
 extern const char *weak_global_object_name;
 
-/* Label at start of unlikely section, when partitioning hot/cold basic
-   blocks.  */
-extern char *unlikely_section_label;
-
 /* Nonzero if function being compiled doesn't contain any calls
    (ignoring the prologue and epilogue).  This is set prior to
    local register allocation and is valid for the remaining
@@ -442,12 +438,6 @@ extern tree last_assemble_variable_decl;
 extern bool decl_readonly_section (tree, int);
 extern bool decl_readonly_section_1 (tree, int, int);
 
-/* The following global variable indicates the section name to be used
-   for the current cold section, when partitioning hot and cold basic
-   blocks into separate sections.  */
-
-extern char *unlikely_text_section_name;
-
 /* This can be used to compute RELOC for the function above, when
    given a constant expression.  */
 extern int compute_reloc_for_constant (tree);
Index: gcc/rtl.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.def,v
retrieving revision 1.94
diff -u -p -u -p -r1.94 rtl.def
--- gcc/rtl.def	2 Sep 2004 22:26:07 -0000	1.94
+++ gcc/rtl.def	10 Sep 2004 04:58:03 -0000
@@ -338,7 +338,8 @@ DEF_RTL_EXPR(VALUE, "value", "0", RTX_OB
    the REGNO macro.  If this number is less than FIRST_PSEUDO_REGISTER
    than a hardware register is being referred to.  The second operand
    holds the original register number - this will be different for a
-   pseudo register that got turned into a hard register.
+   pseudo register that got turned into a hard register.  The third
+   operand points to a reg_attrs structure.
    This rtx needs to have as many (or more) fields as a MEM, since we
    can change REG rtx's into MEMs during reload.  */
 DEF_RTL_EXPR(REG, "reg", "i00", RTX_OBJ)
Index: gcc/toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.919
diff -u -p -u -p -r1.919 toplev.c
--- gcc/toplev.c	9 Sep 2004 07:54:06 -0000	1.919
+++ gcc/toplev.c	10 Sep 2004 04:58:03 -0000
@@ -221,9 +221,9 @@ int optimize_size = 0;
    or 0 if between functions.  */
 tree current_function_decl;
 
-/* Set to the FUNC_BEGIN label of the current function, or NULL_TREE
+/* Set to the FUNC_BEGIN label of the current function, or NULL
    if none.  */
-tree current_function_func_begin_label;
+const char * current_function_func_begin_label;
 
 /* Temporarily suppress certain warnings.
    This is set while reading code from a system header file.  */
Index: gcc/tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.615
diff -u -p -u -p -r1.615 tree.h
--- gcc/tree.h	9 Sep 2004 16:33:20 -0000	1.615
+++ gcc/tree.h	10 Sep 2004 04:58:03 -0000
@@ -3350,7 +3350,7 @@ extern int pedantic_lvalues;
 extern GTY(()) tree current_function_decl;
 
 /* Nonzero means a FUNC_BEGIN label was emitted.  */
-extern GTY(()) tree current_function_func_begin_label;
+extern GTY(()) const char * current_function_func_begin_label;
 
 /* In tree.c */
 extern unsigned crc32_string (unsigned, const char *);
Index: gcc/varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.447
diff -u -p -u -p -r1.447 varasm.c
--- gcc/varasm.c	31 Aug 2004 22:46:31 -0000	1.447
+++ gcc/varasm.c	10 Sep 2004 04:58:04 -0000
@@ -104,19 +104,19 @@ tree last_assemble_variable_decl;
    partitions hot and cold basic blocks into separate sections of the .o
    file.  */
 
-bool unlikely_section_label_printed = false;
+static bool unlikely_section_label_printed = false;
 
 /* The following global variable indicates the label name to be put at
    the start of the first cold section within each function, when
    partitioning basic blocks into hot and cold sections.  */
 
-char *unlikely_section_label = NULL;
+static char *unlikely_section_label = NULL;
  
 /* The following global variable indicates the section name to be used
    for the current cold section, when partitioning hot and cold basic
    blocks into separate sections.  */
 
-char *unlikely_text_section_name = NULL;
+static char *unlikely_text_section_name = NULL;
 
 /* We give all constants their own alias set.  Perhaps redundant with
    MEM_READONLY_P, but pre-dates it.  */
@@ -1187,10 +1187,8 @@ assemble_start_function (tree decl, cons
   unlikely_section_label_printed = false;
   unlikely_text_section_name = NULL;
   
-  if (unlikely_section_label)
-    free (unlikely_section_label);
-  unlikely_section_label = xmalloc ((strlen (fnname) + 18) * sizeof (char));
-  sprintf (unlikely_section_label, "%s_unlikely_section", fnname);
+  unlikely_section_label = reconcat (unlikely_section_label, 
+				     fnname, ".unlikely_section", NULL);
   
   /* The following code does not need preprocessing in the assembler.  */
 
Index: gcc/config/darwin.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/darwin.c,v
retrieving revision 1.86
diff -u -p -u -p -r1.86 darwin.c
--- gcc/config/darwin.c	1 Sep 2004 17:18:00 -0000	1.86
+++ gcc/config/darwin.c	10 Sep 2004 04:58:11 -0000
@@ -40,6 +40,7 @@ Boston, MA 02111-1307, USA.  */
 #include "function.h"
 #include "ggc.h"
 #include "langhooks.h"
+#include "target.h"
 #include "tm_p.h"
 #include "errors.h"
 #include "hashtab.h"
@@ -245,9 +246,8 @@ typedef struct machopic_indirection GTY 
 {
   /* The SYMBOL_REF for the entity referenced.  */
   rtx symbol;
-  /* The IDENTIFIER_NODE giving the name of the stub or non-lazy
-     pointer.  */
-  tree ptr_name;
+  /* The name of the stub or non-lazy pointer.  */
+  const char * ptr_name;
   /* True iff this entry is for a stub (as opposed to a non-lazy
      pointer).  */
   bool stub_p;
@@ -267,7 +267,7 @@ static hashval_t
 machopic_indirection_hash (const void *slot)
 {
   const machopic_indirection *p = (const machopic_indirection *) slot;
-  return IDENTIFIER_HASH_VALUE (p->ptr_name);
+  return htab_hash_string (p->ptr_name);
 }
 
 /* Returns true if the KEY is the same as that associated with
@@ -276,7 +276,7 @@ machopic_indirection_hash (const void *s
 static int
 machopic_indirection_eq (const void *slot, const void *key)
 {
-  return ((const machopic_indirection *) slot)->ptr_name == (tree) key;
+  return strcmp (((const machopic_indirection *) slot)->ptr_name, key) == 0;
 }
 
 /* Return the name of the non-lazy pointer (if STUB_P is false) or
@@ -287,9 +287,9 @@ machopic_indirection_name (rtx sym_ref, 
 {
   char *buffer;
   const char *name = XSTR (sym_ref, 0);
-  int namelen = strlen (name);
-  tree ptr_name;
+  size_t namelen = strlen (name);
   machopic_indirection *p;
+  void ** slot;
   
   /* Construct the name of the non-lazy pointer or stub.  */
   if (stub_p)
@@ -328,32 +328,29 @@ machopic_indirection_name (rtx sym_ref, 
 		 user_label_prefix, name);
     }
 
-  /* See if we already have it.  */
-  ptr_name = maybe_get_identifier (buffer);
-  /* If not, create a mapping from the non-lazy pointer to the
-     SYMBOL_REF.  */
-  if (!ptr_name)
+  if (!machopic_indirections)
+    machopic_indirections = htab_create_ggc (37, 
+					     machopic_indirection_hash,
+					     machopic_indirection_eq,
+					     /*htab_del=*/NULL);
+  
+  slot = htab_find_slot_with_hash (machopic_indirections, buffer,
+				   htab_hash_string (buffer), INSERT);
+  if (*slot)
+    {
+      p = (machopic_indirection *) *slot;
+    }
+  else
     {
-      void **slot;
-      ptr_name = get_identifier (buffer);
       p = (machopic_indirection *) ggc_alloc (sizeof (machopic_indirection));
       p->symbol = sym_ref;
-      p->ptr_name = ptr_name;
+      p->ptr_name = xstrdup (buffer);
       p->stub_p = stub_p;
-      p->used = 0;
-      if (!machopic_indirections)
-	machopic_indirections 
-	  = htab_create_ggc (37, 
-			     machopic_indirection_hash,
-			     machopic_indirection_eq,
-			     /*htab_del=*/NULL);
-      slot = htab_find_slot_with_hash (machopic_indirections, ptr_name,
-				       IDENTIFIER_HASH_VALUE (ptr_name),
-				       INSERT);
-      *((machopic_indirection **) slot) = p;
+      p->used = false;
+      *slot = p;
     }
   
-  return IDENTIFIER_POINTER (ptr_name);
+  return p->ptr_name;
 }
 
 /* Return the name of the stub for the mcount function.  */
@@ -372,18 +369,24 @@ machopic_mcount_stub_name (void)
 void
 machopic_validate_stub_or_non_lazy_ptr (const char *name)
 {
-  tree ident = get_identifier (name);
-
   machopic_indirection *p;
   
   p = ((machopic_indirection *) 
-       (htab_find_with_hash (machopic_indirections, ident,
-			     IDENTIFIER_HASH_VALUE (ident))));
-  if (p)
-    {
-      p->used = 1;
-      mark_referenced (ident);
-      mark_referenced (get_identifier (XSTR (p->symbol, 0)));
+       (htab_find_with_hash (machopic_indirections, name,
+			     htab_hash_string (name))));
+  if (p && ! p->used)
+    {
+      const char *real_name;
+      tree id;
+      
+      p->used = true;
+
+      /* Do exactly what assemble_name will do when we actually call it.  */
+      real_name = targetm.strip_name_encoding (name);
+      
+      id = maybe_get_identifier (real_name);
+      if (id)
+	mark_referenced (id);
     }
 }
 
@@ -849,7 +852,7 @@ machopic_output_indirection (void **slot
 
   symbol = p->symbol;
   sym_name = XSTR (symbol, 0);
-  ptr_name = IDENTIFIER_POINTER (p->ptr_name);
+  ptr_name = p->ptr_name;
   
   if (p->stub_p)
     {
Index: gcc/config/t-darwin
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/t-darwin,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 t-darwin
--- gcc/config/t-darwin	4 Mar 2004 00:18:53 -0000	1.6
+++ gcc/config/t-darwin	10 Sep 2004 04:58:12 -0000
@@ -1,7 +1,7 @@
 darwin.o: $(srcdir)/config/darwin.c $(CONFIG_H) $(SYSTEM_H) coretypes.h     \
   $(TM_H) $(RTL_H) $(REGS_H) hard-reg-set.h $(REAL_H) insn-config.h         \
   conditions.h insn-flags.h output.h insn-attr.h flags.h $(TREE_H) expr.h   \
-  reload.h function.h $(GGC_H) langhooks.h $(TM_P_H) gt-darwin.h
+  reload.h function.h $(GGC_H) langhooks.h $(TARGET_H) $(TM_P_H) gt-darwin.h
 	$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/config/darwin.c
 
 darwin-c.o: $(srcdir)/config/darwin-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
Index: gcc/config/rs6000/linux64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/linux64.h,v
retrieving revision 1.65
diff -u -p -u -p -r1.65 linux64.h
--- gcc/config/rs6000/linux64.h	8 Sep 2004 00:17:18 -0000	1.65
+++ gcc/config/rs6000/linux64.h	10 Sep 2004 04:58:14 -0000
@@ -499,10 +499,9 @@ while (0)
       fprintf (FILE, "%s%d,0,0,", ASM_STABN_OP, BRAC);			\
       assemble_name (FILE, NAME);					\
       putc ('-', FILE);							\
-      if (current_function_func_begin_label != NULL_TREE)		\
+      if (current_function_func_begin_label != NULL)			\
 	{								\
-	  s = IDENTIFIER_POINTER (current_function_func_begin_label);	\
-	  assemble_name (FILE, s);					\
+	  assemble_name (FILE, current_function_func_begin_label);	\
 	}								\
       else								\
 	{								\
Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.706
diff -u -p -u -p -r1.706 rs6000.c
--- gcc/config/rs6000/rs6000.c	8 Sep 2004 23:19:58 -0000	1.706
+++ gcc/config/rs6000/rs6000.c	10 Sep 2004 04:58:15 -0000
@@ -10062,7 +10062,7 @@ print_operand (FILE *file, rtx x, int co
       /* Write second word of DImode or DFmode reference.  Works on register
 	 or non-indexed memory only.  */
       if (GET_CODE (x) == REG)
-	fprintf (file, "%s", reg_names[REGNO (x) + 1]);
+	fputs (reg_names[REGNO (x) + 1], file);
       else if (GET_CODE (x) == MEM)
 	{
 	  /* Handle possible auto-increment.  Since it is pre-increment and
@@ -10133,7 +10133,7 @@ print_operand (FILE *file, rtx x, int co
 	  || REGNO (XEXP (x, 0)) >= 32)
 	output_operand_lossage ("invalid %%P value");
       else
-	fprintf (file, "%s", reg_names[REGNO (XEXP (x, 0))]);
+	fputs (reg_names[REGNO (XEXP (x, 0))], file);
       return;
 
     case 'q':
@@ -10368,7 +10368,7 @@ print_operand (FILE *file, rtx x, int co
     case 'Y':
       /* Like 'L', for third word of TImode  */
       if (GET_CODE (x) == REG)
-	fprintf (file, "%s", reg_names[REGNO (x) + 2]);
+	fputs (reg_names[REGNO (x) + 2], file);
       else if (GET_CODE (x) == MEM)
 	{
 	  if (GET_CODE (XEXP (x, 0)) == PRE_INC
@@ -10415,7 +10415,7 @@ print_operand (FILE *file, rtx x, int co
     case 'Z':
       /* Like 'L', for last word of TImode.  */
       if (GET_CODE (x) == REG)
-	fprintf (file, "%s", reg_names[REGNO (x) + 3]);
+	fputs (reg_names[REGNO (x) + 3], file);
       else if (GET_CODE (x) == MEM)
 	{
 	  if (GET_CODE (XEXP (x, 0)) == PRE_INC
============================================================


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