Files
vhdl/lib/CPUs/MIPS/bsp/examples/delay_mips.c
T
jens 191af92d47 Initial version
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/


git-svn-id: http://moon:8086/svn/vhdl/trunk@790 cc03376c-175c-47c8-b038-4cd826a8556b
2010-03-13 14:13:53 +00:00

16 lines
187 B
C

// MIPS delay.
void __inline__ delay(int loops)
{
__asm
(
".set noreorder\n"
"1:bnez %[loops], 1b\n"
"addiu %[loops], -1\n"
".set reorder\n"
:
: [loops] "r" (loops)
);
}