From: Liam Bedford (lbedford at domain lbedford.org)
Date: Wed 15 Aug 2001 - 17:33:53 IST
On Wed, Aug 15, 2001 at 04:14:12PM +0100, Paul Jakma came forth with:
> On Wed, 15 Aug 2001, Dave Airlie wrote:
> > I've only one thing to say...
> > branch delay slots ... *shudder*....
> > in pseudo dave-assembly (a combination of C, VAX/MIPS/x86/ARM asms)
> > mov 56, r1 # put 56 into r1
> > br label # branch to label
> > inc r1
> > label: printf r1
> > guess what r1 is at this stage? 56 taking bets? no it's 57... the increase
> > instruction gets executed... it still makes my brain violently ill even 2
> > or 3 years later (and I'm no longer active on Linux/MIPS)...
> hmmm.. what's the correct way to do above then? (and is there a good
> reason for it?)
correct way to do what? make it 56 would be
mov 56, r1
It seems to be a standard thing for RISC machines, and if you're taking
x86/m68k code, you can just shove a NOP after the branch (but you waste a
lot of speed).
-- dBP dBBBBb | If you're looking at me to be an accountant dBP | Then you will look but you will never see dBP dBBBK' | If you're looking at me to start having babies dBP dB' db | Then you can wish because I'm not here to fool around dBBBBP dBBBBP' | Belle & Sebastian (Family Tree)
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:11:40 GMT