summaryrefslogtreecommitdiff
path: root/lib/ultralib/src/log/delay.s
blob: 70782f68cbcf3167fc9068d820d8cba13d681cfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "PR/os_version.h"

#if !defined(_FINALROM) || BUILD_VERSION < VERSION_J
#include "sys/asm.h"
#include "sys/regdef.h"

LEAF(osDelay)
    sll     t0, a0, 2
    addu    t0, a0  
    sll     t0, t0, 2
    beqz    a0, 2f

1:
    subu    t0, 1
    NOP
    NOP
    bnez    t0, 1b

2:
    j   ra

END(osDelay)

#endif