This is the mail archive of the gcc@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]

egcs-980129, warning patches to alpha.c


	Here's a few fixes for warnings from config/alpha/alpha.c.

		--Kaveh


Thu Feb  5 14:53:05 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * alpha.c (alpha_return_addr): Remove unused variable `first'.
        (alpha_ra_ever_killed): Remove unused variables `ra' and `i'.
        (add_long_const): Use HOST_WIDE_INT_PRINT_DEC as needed.
        (output_prolog): Likewise.
        (output_epilog): Likewise.  Remove unused variable
        `frame_size_from_reg_save'.
 

--- gcc/config/alpha/alpha.c~	Wed Jan 28 19:47:06 1998
+++ gcc/config/alpha/alpha.c	Thu Feb  5 14:35:19 1998
@@ -2058,7 +2058,7 @@
      int count;
      rtx frame;
 {
-  rtx init, first;
+  rtx init;
 
   if (count != 0)
     return const0_rtx;
@@ -2082,8 +2082,6 @@
 static int
 alpha_ra_ever_killed ()
 {
-  rtx i, ra;
-
   if (!alpha_return_addr_rtx)
     return regs_ever_live[REG_RA];
 
@@ -2710,9 +2708,17 @@
       int result_reg = (extra == 0 && high == 0) ? out_reg : temp_reg;
 
       if (low >= 0 && low < 255)
-	fprintf (file, "\taddq $%d,%d,$%d\n", in_reg, low, result_reg);
+	{
+	  fprintf (file, "\taddq $%d,", in_reg);
+	  fprintf (file, HOST_WIDE_INT_PRINT_DEC, low);
+	  fprintf (file, ",$%d\n", result_reg);
+	}
       else
-	fprintf (file, "\tlda $%d,%d($%d)\n", result_reg, low, in_reg);
+	{
+	  fprintf (file, "\tlda $%d,", result_reg);
+	  fprintf (file, HOST_WIDE_INT_PRINT_DEC, low);
+	  fprintf (file, "($%d)\n", in_reg);
+	}
 
       in_reg = result_reg;
     }
@@ -2721,12 +2727,18 @@
     {
       int result_reg = (high == 0) ? out_reg : temp_reg;
 
-      fprintf (file, "\tldah $%d,%d($%d)\n", result_reg, extra, in_reg);
+      fprintf (file, "\tldah $%d,", result_reg);
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC, extra);
+      fprintf (file, "($%d)\n", in_reg);
       in_reg = result_reg;
     }
 
   if (high)
-    fprintf (file, "\tldah $%d,%d($%d)\n", out_reg, high, in_reg);
+    {
+      fprintf (file, "\tldah $%d,", out_reg);
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC, high);
+      fprintf (file, "($%d)\n", in_reg);
+    }
 }
 
 /* Write function prologue.  */
@@ -3176,11 +3188,19 @@
 
 	  /* We only have to do this probe if we aren't saving registers.  */
 	  if (sa_size == 0 && probed + 4096 < frame_size)
-	    fprintf (file, "\tstq $31,-%d($30)\n", frame_size);
+	    {
+	      fprintf (file, "\tstq $31,-");
+	      fprintf (file, HOST_WIDE_INT_PRINT_DEC, frame_size);
+	      fprintf (file, "($30)\n");
+	    }
 	}
 
       if (frame_size != 0)
-	fprintf (file, "\tlda $30,-%d($30)\n", frame_size);
+	{
+	  fprintf (file, "\tlda $30,-");
+	  fprintf (file, HOST_WIDE_INT_PRINT_DEC, frame_size);
+	  fprintf (file, "($30)\n");
+	}
     }
   else
     {
@@ -3210,18 +3230,25 @@
       fprintf (file, "..sc\n");
 
       if (leftover > 4096 && sa_size == 0)
-	fprintf (file, "\tstq $31,-%d($4)\n", leftover);
+	{
+	  fprintf (file, "\tstq $31,-");
+	  fprintf (file, HOST_WIDE_INT_PRINT_DEC, leftover);
+	  fprintf (file, "($4)\n");
+	}
 
-      fprintf (file, "\tlda $30,-%d($4)\n", leftover);
+      fprintf (file, "\tlda $30,-");
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC, leftover);
+      fprintf (file, "($4)\n");
     }
 
   /* Describe our frame.  */
   if (!flag_inhibit_size_directive)
     {
-      fprintf (file, "\t.frame $%d,%d,$26,%d\n", 
+      fprintf (file, "\t.frame $%d,",
 	       (frame_pointer_needed
-	        ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM),
-	       frame_size, current_function_pretend_args_size);
+	        ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM));
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC, frame_size);
+      fprintf (file, ",$26,%d\n", current_function_pretend_args_size);
     }
 
   /* Cope with very large offsets to the register save area.  */
@@ -3246,7 +3273,9 @@
   if (sa_size != 0)
     {
       reg_mask |= 1 << REG_RA;
-      fprintf (file, "\tstq $26,%d($%d)\n", reg_offset, sa_reg);
+      fprintf (file, "\tstq $26,");
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC, reg_offset);
+      fprintf (file, "($%d)\n", sa_reg);
       reg_offset += 8;
       int_reg_save_area_size += 8;
     }
@@ -3257,15 +3286,21 @@
 	&& regs_ever_live[i] && i != REG_RA)
       {
 	reg_mask |= 1 << i;
-	fprintf (file, "\tstq $%d,%d($%d)\n", i, reg_offset, sa_reg);
+	fprintf (file, "\tstq $%d,", i);
+	fprintf (file, HOST_WIDE_INT_PRINT_DEC, reg_offset);
+	fprintf (file, "($%d)\n", sa_reg);
 	reg_offset += 8;
 	int_reg_save_area_size += 8;
       }
 
   /* Print the register mask and do floating-point saves.  */
   if (reg_mask && !flag_inhibit_size_directive)
-    fprintf (file, "\t.mask 0x%x,%d\n", reg_mask,
-	     actual_start_reg_offset - frame_size);
+    {
+      fprintf (file, "\t.mask 0x%x,", reg_mask);
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC,
+	       actual_start_reg_offset - frame_size);
+      fprintf (file, "\n");
+    }
 
   start_reg_offset = reg_offset;
   reg_mask = 0;
@@ -3275,14 +3310,20 @@
 	&& regs_ever_live[i + 32])
       {
 	reg_mask |= 1 << i;
-	fprintf (file, "\tstt $f%d,%d($%d)\n", i, reg_offset, sa_reg);
+	fprintf (file, "\tstt $f%d,", i);
+	fprintf (file, HOST_WIDE_INT_PRINT_DEC, reg_offset);
+	fprintf (file, "($%d)\n", sa_reg);
 	reg_offset += 8;
       }
 
   /* Print the floating-point mask, if we've saved any fp register.  */
   if (reg_mask && !flag_inhibit_size_directive)
-    fprintf (file, "\t.fmask 0x%x,%d\n", reg_mask,
-	     actual_start_reg_offset - frame_size + int_reg_save_area_size);
+    {
+      fprintf (file, "\t.fmask 0x%x,", reg_mask);
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC,
+	       actual_start_reg_offset - frame_size + int_reg_save_area_size);
+      fprintf (file, "\n");
+    }
 
   /* If we need a frame pointer, set it from the stack pointer.  Note that
      this must always be the last instruction in the prologue.  */
@@ -3309,7 +3350,6 @@
     = (out_args_size + sa_size
        + ALPHA_ROUND (size + current_function_pretend_args_size));
   HOST_WIDE_INT reg_offset = out_args_size;
-  HOST_WIDE_INT frame_size_from_reg_save = frame_size - reg_offset;
   int restore_fp
     = frame_pointer_needed && regs_ever_live[HARD_FRAME_POINTER_REGNUM];
   int i;
@@ -3349,7 +3389,9 @@
 	 register.  */
       if (sa_size != 0)
 	{
-	  fprintf (file, "\tldq $26,%d($%d)\n", reg_offset, sa_reg);
+	  fprintf (file, "\tldq $26,");
+	  fprintf (file, HOST_WIDE_INT_PRINT_DEC, reg_offset);
+	  fprintf (file, "($%d)\n", sa_reg);
 	  reg_offset += 8;
 	}
 
@@ -3364,7 +3406,11 @@
 	    if (i == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed)
 	      fp_offset = reg_offset;
 	    else
-	      fprintf (file, "\tldq $%d,%d($%d)\n", i, reg_offset, sa_reg);
+	      {
+		fprintf (file, "\tldq $%d,", i);
+		fprintf (file, HOST_WIDE_INT_PRINT_DEC, reg_offset);
+		fprintf (file, "($%d)\n", sa_reg);
+	      }
 	    reg_offset += 8;
 	  }
 
@@ -3372,7 +3418,9 @@
 	if (! fixed_regs[i + 32] && ! call_used_regs[i + 32]
 	    && regs_ever_live[i + 32])
 	  {
-	    fprintf (file, "\tldt $f%d,%d($%d)\n", i, reg_offset, sa_reg);
+	    fprintf (file, "\tldt $f%d,", i);
+	    fprintf (file, HOST_WIDE_INT_PRINT_DEC, reg_offset);
+	    fprintf (file, "($%d)\n", sa_reg);
 	    reg_offset += 8;
 	  }
 
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		ICon CMT Corp.


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