home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Bug_Fixes / Net.v7bugs / 0002 < prev    next >
Encoding:
Text File  |  1981-05-28  |  1.3 KB  |  49 lines

  1. Aucbvax.107
  2. NET.v7bugs
  3. utzoo!duke!vax135!ucbvax!mark
  4. Sun May 18 22:54:56 1980
  5. c2
  6. >From uucp Wed Sep 26 13:16:38 1979
  7. >From tom Tue Sep 25 22:01:30 1979 remote from ucsfcgl
  8. To: Bob Kridle, Ed Gould, Bill Joy
  9. Re: Bug in version 7 optimizer of dmr's pdp-11 compiler
  10.  
  11. A bug involving unsigned integers has surfaced in the version 7 C compiler.
  12. After installing the following fix you should recompile:
  13.     mkfs.c
  14.     dcheck.c
  15.     passwd.c
  16.     getty.c
  17.     mail.c
  18.     pstat.c
  19.  
  20. >From uucp Mon Jul 23 22:53:59 1979
  21. >From dmr Mon Jul 23 23:59:07 1979 remote from research
  22. Here is the change needed to fix the optimizer.
  23. The file is /usr/src/cmd/c/c21.c.
  24. This is in routine rmove, after case CBR, the first two
  25. lines in the 'if r==0' clause:
  26.  
  27. 190,191c
  28. <                 p->back->back->forw = p->forw;
  29. <                 p->forw->back = p->back->back;
  30. ---
  31. >                 if (p->forw->op==CBR
  32. >                   || p->forw->op==SXT
  33. >                   || p->forw->op==CFCC) {
  34. >                     p->back->forw = p->forw;
  35. >                     p->forw->back = p->back;
  36. >                 } else {
  37. >                     p->back->back->forw = p->forw;
  38. >                     p->forw->back = p->back->back;
  39. >                 }
  40.  
  41. The old code deleted a test or compare with constant operands
  42. and a following conditional branch that would always fail.
  43. The new code only deletes the branch (leaves the test)
  44. if the combination is followed by another instruction that
  45. needs the condition codes.  The test and second branch are liable
  46. to be deleted later.
  47.  
  48.  
  49.