Messages in this thread Patch in this message |  | | From | "Ulrich Windl" <> | Date | Thu, 17 Oct 1996 09:27:23 +0200 | Subject | gcc-2.7.2's optimizations |
| |
Hi,
the gcc gurus will probably know already, but maybe it's interesting for some:
Yesterday I tried to "optimize" a piece of code. According to Linus' suggestions I wanted to compare the assembler output, but *surprise* the was not a sigle byte different! I could not believe it and compiled again; no difference. I did not know that gcc is that smart already. Here's the patch that does not make any difference with the default compilation options:
--- time.c 1996/10/15 19:15:18 1.5 +++ time.c 1996/10/16 19:31:05 1.7 @@ -548,10 +548,10 @@ { time_adjust = txc.offset; } - else if ((time_status & STA_PLL)||(time_status & STA_PPSTIME)) + else if ( time_status & (STA_PLL | STA_PPSTIME) ) { - ltemp = (time_status & STA_PPSTIME && - time_status & STA_PPSSIGNAL) ? + ltemp = (time_status & (STA_PPSTIME | STA_PPSSIGNAL)) == + (STA_PPSTIME | STA_PPSSIGNAL) ? pps_offset : txc.offset; /*
Ulrich Windl
|  |