On 08/13/2012 07:18 PM, buzz lightyear wrote:
Hi
I'm just starting out with or1k assembler and I've been reading
through crt0.S in
http://git.openrisc.net/cgit.cgi/stefan/orpsoc/tree/sw/drivers/or1200/crt0.S
Just one question, shouldn't 'l.addi r5, r5, 4' be placed prior to
'l.bf 1b'?
Hi Nick,
Those are "delay slot" instructions which are actually executed before
the jump/branch instructions that they follow in the code. It's an
optimization to keep the CPU busy for an extra cycle while it's
refilling the pipeline with instructions from the jump/branch target.
You can read more about it here: http://en.wikipedia.org/wiki/Delay_slot
-Jonas
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc