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: [patch i386]: Add support of "hotfix" -feature for x64


On 07/03/2010 02:05 AM, Kai Tietz wrote:
>> The double loop overcomplicates things.  I think you're better off
>> with just a plain for-loop.

+      for (; filler_count > 0;)
+	{
+	  if ((filler_count & 15) == 0)
+	    fprintf (asm_out_file, ASM_LONG " 0x%x", filler_cc);
+	  else
+	    fprintf (asm_out_file, ", 0x%x", filler_cc);
+	  filler_count -= 4;
+	  if ((filler_count & 15) == 0)
+	    fprintf (asm_out_file, "\n");
+	}

Better, but honestly I'd been thinking just to bring one
directive per line, rather than trying to block the output
onto several lines.  I.e.

  for (i = 0; i < filler_count; i += 4)
    fprintf (asm_out_file, ASM_LONG " 0x%x\n", filler_cc);


Ok with that change.


r~


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