home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!usc!news
- From: addison@pollux.usc.edu (Richard Addison)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Yet Another SAS/C thread
- Date: 31 Aug 1992 15:36:48 -0700
- Organization: University of Southern California, Los Angeles, CA
- Lines: 51
- Sender: addison@pollux.usc.edu (Richard Addison)
- Message-ID: <la57o0INNrfn@pollux.usc.edu>
- References: <la2ipoINNsk6@pollux.usc.edu> <Btuno8.L61@unx.sas.com>
- NNTP-Posting-Host: pollux.usc.edu
-
- In <Btuno8.L61@unx.sas.com> walker@twix.unx.sas.com (Doug Walker) writes:
- >In article <la2ipoINNsk6@pollux.usc.edu>, addison@pollux.usc.edu (Richard Addison) writes:
- >|> Does the builtin memcmp() work in all cases? It generally creates code
-
- >Yes, it does. This sounds like something that should have been reported
- >to technical support; did you do this?
-
- Sorry for the confusion. I was typing this from memory, and it didn't come
- out just right.
-
- The bug no longer exists in 5.10b. It did exist in 5.05, however.
-
- Just for the curious, here is a call to memcmp() and the code generated by
- 5.05 as reported by omd:
-
- ; 916: if (memcmp(mid, mend->P, mlen) >= 0)
- | 0EA6 2006 MOVE.L D6,D0
- | 0EA8 2B48 FFFC MOVE.L A0,FFFC(A5)
- | 0EAC 2252 MOVEA.L (A2),A1
- | 0EAE 6004 BRA.B 0EB4
- | 0EB0 1218 MOVE.B (A0)+,D1
- | 0EB2 B219 CMP.B (A1)+,D1
- | 0EB4 56C8 FFFA DBNE D0,0EB0
- | 0EB8 6D04 BLT.B 0EBE
-
- Here is the same call and the code generated by 5.10b as reported by omd:
-
- ; 916: if (memcmp(mid, mend->P, mlen) >= 0)
- | 0EBA 2006 MOVE.L D6,D0
- | 0EBC 2B48 FFFC MOVE.L A0,FFFC(A5)
- | 0EC0 2252 MOVEA.L (A2),A1
- | 0EC2 B341 EOR.W D1,D1
- | 0EC4 6004 BRA.B 0ECA
- | 0EC6 1218 MOVE.B (A0)+,D1
- | 0EC8 B219 CMP.B (A1)+,D1
- | 0ECA 56C8 FFFA DBNE D0,0EC6
- | 0ECE 6D04 BLT.B 0ED4
-
- Note that 5.10b includes "EOR.W D1,D1" in order to set the zero flag so that
- when "DBNE D0,..." is first executed, it does not exit the loop early. Those
- of you with sharp eyes will notice that I had "DBEQ" in my earlier post by
- accident.
-
- Anyway, that bug is no longer, it has shuffled off this mortal coil, it is
- pushing up the daisies, it is an ex-bug.
-
- Sorry for dragging it up unnecessarily.
-
- --
- Richard
-
-