8/16bit oddities on avr-gcc

Michael Kukat michael@kukat.de
Fri Mar 2 13:27:00 GMT 2007


Even more funny with the variant using ctr % 64:

test ()
{
  unsigned int ivtmp.28;
  int pretmp.27;
  int pretmp.26;
  uint8_t pretmp.25;
  uint8_t ctr;
  int D.1293;
  int D.1292;

<bb 0>:
  ctr = 0;

<L0>:;
  __asm__ __volatile__("nop"::);
  xx = ctr;
  ctr = ctr + 1;
  if (ctr != 64) goto <L0>; else goto <L1>;

<L1>:;
  return;

}

Lots of variables ivtmp.*, but the counter handling and modulo is done
on the ctr, compared to the less-than, where counter handling and
comparison is done on one of the ivtmp.* variables.

...Michael



More information about the Gcc-help mailing list