This is the mail archive of the 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: Remove bad comment in scan_paradoxical_subregs in reload1.c

Ian Lance Taylor wrote:
I'm pretty sure that this documented restriction no longer exists.
I'm pretty sure that the current compiler will use such a register for
reload when it can.  But I don't know how to prove it, so I'm not
going to propose modifying the documentation.

I don't think it is hard to prove this. I wrote an x86 testcase that uses 6 register variables, compiled it with -O2, and 2 of them got used for spill registers in reload. I think that clearly proves that the restriction no longer exists.

	* reload1.c (reload): Correct comment.
	(scan_paradoxical_subregs): Remove #if 0 and old comment.


Please also delete the one sentence in extend.texi that claims these registers are not used by reload.
Jim Wilson, GNU Tools Support,
int array[10][10][10];

int ga, gb, gc, gd, ges, ged;

sub (void)
  register int a __asm__ ("%eax");
  register int b __asm__ ("%ebx");
  register int c __asm__ ("%ecx");
  register int d __asm__ ("%edx");
  register int es __asm__ ("%esi");
  register int ed __asm__ ("%edi");

  a = ga;
  b = gb;
  c = gc;
  d = gd;
  es = ges;
  ed = ged;

  array[a][b][c] = array[d][es][ed];

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