Path: chuka.playstation.co.uk!chuka.playstation.co.uk!news From: gil@snsys.com (Gil Jaysmith) Newsgroups: scee.yaroze.programming.gnu_compiler Subject: Re: MIPS assembly queries.. Date: Thu, 02 Oct 1997 11:49:25 GMT Organization: SN Systems Lines: 29 Message-ID: <343387b1.2092228@news.playstation.co.uk> References: <3433834F.3248@127.0.0.1> Reply-To: gil@snsys.com NNTP-Posting-Host: gil.snsys.com X-Newsreader: Forte Free Agent 1.11/32.235 Wotcher, Majik... >for instance the sequence > subu $9,$9,1 > bne $9,$0,end > li $8,32 >will always load register 8 with 32 whether the branch is taken or not >or at least this is my finding.. am I wrong, btw I know that preceding >the 'li' with a nop cures the problem... Yes, this is correct. Pipelining means that the insn slot after a jump is scheduled before the jump takes place - in practice, this means that accidentally placing two routines next to one another without examining the implications of delay slots may result in strange effects. You'll certainly get something horrible, probably an exception, if you write things like two consecutive jumps. If you want to know more about delay slots and suchlike, pop over to the MIPS website at www.mips.com and look for the PDFs documenting the MIPS insn sets. Alternatively I've got the majority of them, should you want them. I don't have an R3000-specific one, though, but then the R4600 will do just as well since it supports the R3000 insn set (and it'll also prepare you for hand-assembly on the Nintendo 64 and many arcade machines - LOLOL!) Gil Jaysmith SN Systems Software Ltd (http://www.snsys.com) Disclaimer: the ads are my employers' but the opinions are mine.