home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!sisyphus.demon.co.uk
- From: Dave.Sparks@sisyphus.demon.co.uk
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: PPC compilers
- Date: Wed, 3 Jan 96 06:28:43 +0000 (GMT)
- Organization: to be supplied
- Message-ID: <19960103.583B18.6396@sisyphus.demon.co.uk>
- References: <4c64qj$c78@sinsen.sn.no> <4cb098$421@news.rwth-aachen.de>
- X-NNTP-Posting-Host: sisyphus.demon.co.uk
- In-reply-to: svent@informatik.rwth-aachen.de's message of 2 Jan 1996 10:09:44 GMT
- X-Attribution: DaveS
- Content-Length: 2152
- X-Lines: 53
- X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!sisyphus.demon.co.uk
-
- >>>>> "ST" == Sven Thoennissen <svent@informatik.rwth-aachen.de> writes:
-
- **>>>> can someone please tell me a sideffect example in asm ?
- >>> How about move.l -(a0),-(a0) ? Are you sure that a 68060 won't
- >>> decrement the two registers in parallel?
-
- >> Even if it does, you could hardly blame the programmer for using it,
- >> could you?
-
- ST> You are right, the programmer is not to blame. The 060 would be a
- ST> _BAD_ processor if it did that way.
-
- I took the request marked ** above to mean "can someone please give
- an example of a case where assembly code programmers rely on
- behaviour which is not defined?". Saying "this obviously has the
- effect I expect" is not a proof that the behaviour is defined.
-
- Let's break this instruction down into simpler steps:
-
- A Move A0 to an arithmetic unit
- Decrement the value (by 4 of course, not by 1)
- Move the decremented value back to A0
-
- B Move A0 to a data fetch unit
- fetch the data from the address
-
- C Move A0 to an arithmetic unit
- Decrement the value
- Move the decremented value back to A0
-
- D Move A0 to a data store unit
- store the previously fetched data to the address
-
- The assembly code manual I have define that A is done before B,
- that C is done before D, and that B is done before D. I have not
- found anything in the manual which assures me that B is done
- before C. It's likely that a simple processor like the 68000
- performs the separate steps sequentially, in the order A B C D,
- but modern high-speed processors (RISC as well as CISC) achieve
- their high speeds by carrying out multiple steps in parallel,
- using multiple arithmetic units. If the order of two steps is not
- constrained by the definition, those steps can be carried out in
- any order or concurrently.
-
- The 68060 is only broken if it fails to do something which the
- definition says it must. None of the assembly code programmers
- who are prepared to rely on B being done before C has cited a
- definition which says this must be so.
-
- --
- Dave.Sparks@sisyphus.demon.co.uk (Staffordshire, England)
-
- ... details are more implementation-dependant than defined.
-
-
-