home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / bugs / 2bsd / 78 < prev    next >
Encoding:
Text File  |  1992-08-27  |  4.2 KB  |  248 lines

  1. Newsgroups: comp.bugs.2bsd
  2. Path: sparky!uunet!europa.asd.contel.com!awds.imsd.contel.com!wlbr!sms
  3. From: sms@WLV.IIPO.GTEGSC.COM (Steven M. Schultz)
  4. Subject: screwy opcodes in 'as' overlooked (#71)
  5. Message-ID: <1992Aug28.060543.12313@wlbr.iipo.gtegsc.com>
  6. Sender: news@wlbr.iipo.gtegsc.com (news)
  7. Nntp-Posting-Host: wlv.iipo.gtegsc.com
  8. Organization: GTE Government Systems
  9. Date: Fri, 28 Aug 92 06:05:43 GMT
  10. Lines: 236
  11.  
  12. Subject: screwy opcodes in 'as' overlooked (#71)
  13. Index:    bin/as/{as12,as14,as17,as22,as27}.s 2.11BSD
  14.  
  15. Description:
  16.     When several of the obsolete/deprecated/oddball opcodes were
  17.     removed from the assembler the usage of these in the assembler
  18.     itself was overlooked (the compiler never generates them).
  19.  
  20. Repeat-By:
  21.     Attempt to assemble the assembler.  Note the errors on
  22.     'dvd', 'mpy' and 'als'.  Changing these to 'div', 'mul' and 'ash'
  23.     fixes the problem.
  24.  
  25. Fix:
  26.     Apply the patch below and reinstall the assembler.   Both the old
  27.     and new assemblers recognize the "standard" opcodes, there wasn't
  28.     any risk of the assembler not being able to reconstitute itself.
  29. =========================cut here===============================
  30. *** /usr/src/bin/as/as12.s.old    Wed Dec 13 16:43:06 1989
  31. --- /usr/src/bin/as/as12.s    Thu Aug 27 20:40:36 1992
  32. ***************
  33. *** 26,32 ****
  34.       mov    $4,r1
  35.   2:
  36.       clr    r2
  37. !     dvd    $10.,r2
  38.       add    $'0,r3
  39.       movb    r3,-(r0)
  40.       mov    r2,r3
  41. --- 26,32 ----
  42.       mov    $4,r1
  43.   2:
  44.       clr    r2
  45. !     div    $10.,r2
  46.       add    $'0,r3
  47.       movb    r3,-(r0)
  48.       mov    r2,r3
  49. *** /usr/src/bin/as/as14.s.old    Wed Dec 13 16:43:14 1989
  50. --- /usr/src/bin/as/as14.s    Thu Aug 27 20:41:07 1992
  51. ***************
  52. *** 146,154 ****
  53.       cmp    r0,$'9
  54.       bgt    1f
  55.       sub    $'0,r0
  56. !     mpy    $10.,r5
  57.       add    r0,r5
  58. !     als    $3,r1
  59.       add    r0,r1
  60.       br    1b
  61.   1:
  62. --- 146,154 ----
  63.       cmp    r0,$'9
  64.       bgt    1f
  65.       sub    $'0,r0
  66. !     mul    $10.,r5
  67.       add    r0,r5
  68. !     ash    $3,r1
  69.       add    r0,r1
  70.       br    1b
  71.   1:
  72. *** /usr/src/bin/as/as17.s.old    Wed Dec 13 16:43:25 1989
  73. --- /usr/src/bin/as/as17.s    Thu Aug 27 20:41:43 1992
  74. ***************
  75. *** 143,149 ****
  76.   exlsh:
  77.       clr    r5
  78.       jsr    pc,combin
  79. !     als    r1,r2
  80.       br    eoprnd
  81.   
  82.   exmod:
  83. --- 143,149 ----
  84.   exlsh:
  85.       clr    r5
  86.       jsr    pc,combin
  87. !     ash    r1,r2
  88.       br    eoprnd
  89.   
  90.   exmod:
  91. ***************
  92. *** 152,158 ****
  93.       mov    r1,-(sp)
  94.       mov    r2,r1
  95.       clr    r0
  96. !     dvd    (sp)+,r0
  97.       mov    r1,r2
  98.       br    eoprnd
  99.   
  100. --- 152,158 ----
  101.       mov    r1,-(sp)
  102.       mov    r2,r1
  103.       clr    r0
  104. !     div    (sp)+,r0
  105.       mov    r1,r2
  106.       br    eoprnd
  107.   
  108. ***************
  109. *** 184,190 ****
  110.   exmul:
  111.       clr    r5
  112.       jsr    pc,combin
  113. !     mpy    r2,r1
  114.       mov    r1,r2
  115.       br    eoprnd
  116.   
  117. --- 184,190 ----
  118.   exmul:
  119.       clr    r5
  120.       jsr    pc,combin
  121. !     mul    r2,r1
  122.       mov    r1,r2
  123.       br    eoprnd
  124.   
  125. ***************
  126. *** 194,200 ****
  127.       mov    r1,-(sp)
  128.       mov    r2,r1
  129.       clr    r0
  130. !     dvd    (sp)+,r0
  131.       mov    r0,r2
  132.       br    eoprnd
  133.   
  134. --- 194,200 ----
  135.       mov    r1,-(sp)
  136.       mov    r2,r1
  137.       clr    r0
  138. !     div    (sp)+,r0
  139.       mov    r0,r2
  140.       br    eoprnd
  141.   
  142. *** /usr/src/bin/as/as22.s.old    Sun Dec 24 16:53:18 1989
  143. --- /usr/src/bin/as/as22.s    Thu Aug 27 20:42:41 1992
  144. ***************
  145. *** 144,150 ****
  146.       mov    $4,r1
  147.   2:
  148.       clr    r2
  149. !     dvd    $10.,r2
  150.       add    $'0,r3
  151.       movb    r3,-(r0)
  152.       mov    r2,r3
  153. --- 144,150 ----
  154.       mov    $4,r1
  155.   2:
  156.       clr    r2
  157. !     div    $10.,r2
  158.       add    $'0,r3
  159.       movb    r3,-(r0)
  160.       mov    r2,r3
  161. *** /usr/src/bin/as/as27.s.old    Sun Dec 24 21:29:19 1989
  162. --- /usr/src/bin/as/as27.s    Thu Aug 27 20:43:23 1992
  163. ***************
  164. *** 159,165 ****
  165.   exlsh:
  166.       mov    $relte2,r5
  167.       jsr    pc,combin
  168. !     als    r1,r2
  169.       br    eoprnd
  170.   
  171.   exmod:
  172. --- 159,165 ----
  173.   exlsh:
  174.       mov    $relte2,r5
  175.       jsr    pc,combin
  176. !     ash    r1,r2
  177.       br    eoprnd
  178.   
  179.   exmod:
  180. ***************
  181. *** 168,174 ****
  182.       mov    r3,r0
  183.       mov    r2,r3
  184.       clr    r2
  185. !     dvd    r1,r2
  186.       mov    r3,r2
  187.       mov    r0,r3
  188.       br    eoprnd
  189. --- 168,174 ----
  190.       mov    r3,r0
  191.       mov    r2,r3
  192.       clr    r2
  193. !     div    r1,r2
  194.       mov    r3,r2
  195.       mov    r0,r3
  196.       br    eoprnd
  197. ***************
  198. *** 201,207 ****
  199.   exmul:
  200.       mov    $relte2,r5
  201.       jsr    pc,combin
  202. !     mpy    r2,r1
  203.       mov    r1,r2
  204.       br    eoprnd
  205.   
  206. --- 201,207 ----
  207.   exmul:
  208.       mov    $relte2,r5
  209.       jsr    pc,combin
  210. !     mul    r2,r1
  211.       mov    r1,r2
  212.       br    eoprnd
  213.   
  214. ***************
  215. *** 211,217 ****
  216.       mov    r3,r0
  217.       mov    r2,r3
  218.       clr    r2
  219. !     dvd    r1,r2
  220.       mov    r0,r3
  221.       br    eoprnd
  222.   
  223. --- 211,217 ----
  224.       mov    r3,r0
  225.       mov    r2,r3
  226.       clr    r2
  227. !     div    r1,r2
  228.       mov    r0,r3
  229.       br    eoprnd
  230.   
  231. ***************
  232. *** 258,264 ****
  233.       clr    maxtyp
  234.       jsr    pc,maprel
  235.       mov    r0,r1
  236. !     mpy    $6,r1
  237.       mov    r3,r0
  238.       jsr    pc,maprel
  239.       add    r5,r0
  240. --- 258,264 ----
  241.       clr    maxtyp
  242.       jsr    pc,maprel
  243.       mov    r0,r1
  244. !     mul    $6,r1
  245.       mov    r3,r0
  246.       jsr    pc,maprel
  247.       add    r5,r0
  248.