Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!sri-unix!sri-spam!ames!ucbcad!ucbvax!decvax!decwrl!labrea!rocky!rokicki From: rokicki@rocky.STANFORD.EDU (Tomas Rokicki) Newsgroups: comp.sys.atari.st Subject: Re: question of the day Message-ID: <656@rocky.STANFORD.EDU> Date: Sat, 10-Oct-87 15:57:17 EDT Article-I.D.: rocky.656 Posted: Sat Oct 10 15:57:17 1987 Date-Received: Mon, 12-Oct-87 19:06:54 EDT References: <36500013@iuvax> Reply-To: rokicki@rocky.UUCP (Tomas Rokicki) Organization: Stanford University Computer Science Department Lines: 30 > movea.l #go1,a0 > movea.l #go2,a1 > go1: move.w (a0)+,(a1)+ > go2: If you turn to Appendix E of the Motorola MC68000 Programmer's Manaul, it describes the prefetch which is breaking that program. To quote: The MC68000 uses a two-word tightly coupled instruction prefetch mechanism to enhance performance. ... When execution of an instruction begins, the operation word and the word following have already been fetched ... Thus, the instruction at go2: is fetched *before* the instruction at go1: is executed, since move.w (a0)+,(a1)+ is a one-word instruction. If you inserted another move.w (a0)+,(a1)+ before go1, it should work on a 68000, but will break on a 68020 for several reasons . . . It works under RAID because RAID most likely has turned instruction tracing on, which does a software interrupt on each instruction, thus killing the prefetch with the implicit branch . . . > We are so interested in understanding the behavior of this program that > I have been authorised to award a bust of Abraham Lincoln made from steel > to the first person that clears up the mystery. Thanks!