yieldcheck.s
2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/*---------------------------------------------------------------------*
Copyright (C) 1997, Nintendo.
File yieldcheck.s
Coded by Yoshitaka Yasumoto. Nov 10, 1997.
$Id: yieldcheck.s,v 1.1.1.1 2002/05/02 03:29:12 blythe Exp $
*---------------------------------------------------------------------*/
#include <rsp.h>
#include <rcp.h>
#include <os.h>
#include <sptask.h>
.data 0x0000
# Dummy
.word 0
.word 0
.word 0
.word 0
.text 0x1080
#define _li(x,y) addi x, $0, y
#---------------------------------------------------------------------
# Yield の復帰処理を確認するためのマイクロコード
# レジスタ/DMEM の値を変更し終了する.
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# DMEM の内容を 0x0123 4567 で埋める
#---------------------------------------------------------------------
lui $1, 0x0123
ori $1, $1, 0x4567
_li ($2, 0x1000)
Loop1: addi $2, $2, -8
bne $2, $0, Loop1
sw $1, 0($2)
#---------------------------------------------------------------------
# レジスタの値を変更する
#---------------------------------------------------------------------
lqv $v0[0], 0($0)
lqv $v1[0], 0($0)
lqv $v2[0], 0($0)
lqv $v3[0], 0($0)
lqv $v4[0], 0($0)
lqv $v5[0], 0($0)
lqv $v6[0], 0($0)
lqv $v7[0], 0($0)
lqv $v8[0], 0($0)
lqv $v9[0], 0($0)
lqv $v10[0], 0($0)
lqv $v11[0], 0($0)
lqv $v12[0], 0($0)
lqv $v13[0], 0($0)
lqv $v14[0], 0($0)
lqv $v15[0], 0($0)
lqv $v16[0], 0($0)
lqv $v17[0], 0($0)
lqv $v18[0], 0($0)
lqv $v19[0], 0($0)
lqv $v20[0], 0($0)
lqv $v21[0], 0($0)
lqv $v22[0], 0($0)
lqv $v23[0], 0($0)
lqv $v24[0], 0($0)
lqv $v25[0], 0($0)
lqv $v26[0], 0($0)
lqv $v27[0], 0($0)
lqv $v28[0], 0($0)
lqv $v29[0], 0($0)
lqv $v30[0], 0($0)
lqv $v31[0], 0($0)
lw $2, 0($0)
lw $3, 0($0)
lw $4, 0($0)
lw $5, 0($0)
lw $6, 0($0)
lw $7, 0($0)
lw $8, 0($0)
lw $9, 0($0)
lw $10, 0($0)
lw $11, 0($0)
lw $12, 0($0)
lw $13, 0($0)
lw $14, 0($0)
lw $15, 0($0)
lw $16, 0($0)
lw $17, 0($0)
lw $18, 0($0)
lw $19, 0($0)
lw $20, 0($0)
lw $19, 0($0)
lw $20, 0($0)
lw $21, 0($0)
lw $22, 0($0)
lw $23, 0($0)
lw $24, 0($0)
lw $25, 0($0)
lw $26, 0($0)
lw $27, 0($0)
lw $28, 0($0)
lw $29, 0($0)
lw $30, 0($0)
lw $31, 0($0)
_li ($1, SP_SET_TASKDONE|SP_CLR_YIELDED)
mtc0 $1, SP_STATUS
lw $1, 0($0)
break
nop
/*======== End of yieldcheck.s ========*/