|
@@ -218,13 +218,14 @@ init:
|
|
// Main program loop, very simple, sleeps until woken up by the interrupt
|
|
// Main program loop, very simple, sleeps until woken up by the interrupt
|
|
// handler, pulls a command from the queue and executes its handler
|
|
// handler, pulls a command from the queue and executes its handler
|
|
//
|
|
//
|
|
-main:
|
|
|
|
|
|
+wait:
|
|
// sleep until we have something to do
|
|
// sleep until we have something to do
|
|
- bset $flags $p0
|
|
|
|
sleep $p0
|
|
sleep $p0
|
|
|
|
+ bset $flags $p0
|
|
|
|
+main:
|
|
mov $r13 #cmd_queue
|
|
mov $r13 #cmd_queue
|
|
call(queue_get)
|
|
call(queue_get)
|
|
- bra $p1 #main
|
|
|
|
|
|
+ bra $p1 #wait
|
|
|
|
|
|
// context switch, requested by GPU?
|
|
// context switch, requested by GPU?
|
|
cmpu b32 $r14 0x4001
|
|
cmpu b32 $r14 0x4001
|