File indexing completed on 2025-05-11 08:23:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #define zero $0
0036 #define z0 $0
0037 #define v0 $2
0038 #define v1 $3
0039 #define a0 $4
0040 #define a1 $5
0041 #define a2 $6
0042 #define a3 $7
0043 #define t0 $8
0044 #define t1 $9
0045 #define t2 $10
0046 #define t3 $11
0047 #define t4 $12
0048 #define t5 $13
0049 #define t6 $14
0050 #define t7 $15
0051 #define s0 $16
0052 #define s1 $17
0053 #define s2 $18
0054 #define s3 $19
0055 #define s4 $20
0056 #define s5 $21
0057 #define s6 $22
0058 #define s7 $23
0059 #define t8 $24
0060 #define t9 $25
0061 #define k0 $26
0062 #define k1 $27
0063 #define gp $28
0064 #define sp $29
0065 #define fp $30
0066 #define ra $31
0067 #define pc $pc
0068
0069 #define fp0 $f0
0070 #define fp1 $f1
0071
0072
0073
0074
0075
0076
0077
0078
0079 #define K0BASE 0x80000000
0080 #ifndef __mips64
0081 #define K1BASE 0xA0000000
0082 #else
0083 #define K1BASE 0xFFFFFFFFA0000000LL
0084 #endif
0085
0086
0087
0088 #define PHYS_TO_K1(a) ((unsigned)(a) | K1BASE)
0089
0090
0091
0092
0093
0094
0095 #define C0_COUNT $9
0096 #define C0_SR $12
0097 #define C0_CAUSE $13
0098 #define C0_EPC $14
0099 #define C0_CONFIG $16
0100
0101
0102
0103
0104
0105
0106
0107
0108 #define SR_CU1 0x20000000
0109 #define SR_FR 0x04000000
0110 #define SR_BEV 0x00400000
0111 #define SR_PE 0x00100000
0112
0113 #define SR_KX 0x00000080
0114 #define SR_SX 0x00000040
0115 #define SR_UX 0x00000020
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125 #define CACHE_I (0)
0126 #define CACHE_D (1)
0127 #define CACHE_SI (2)
0128 #define CACHE_SD (3)
0129
0130 #define INDEX_INVALIDATE (0)
0131 #define INDEX_LOAD_TAG (1)
0132 #define INDEX_STORE_TAG (2)
0133 #define CREATE_DIRTY_EXCLUSIVE (3)
0134 #define HIT_INVALIDATE (4)
0135 #define CACHE_FILL (5)
0136 #define HIT_WRITEBACK_INVALIDATE (5)
0137 #define HIT_WRITEBACK (6)
0138 #define HIT_SET_VIRTUAL (7)
0139
0140 #define BUILD_CACHE_OP(o,c) (((o) << 2) | (c))
0141
0142
0143
0144
0145
0146
0147
0148
0149 #define INDEX_INVALIDATE_I BUILD_CACHE_OP(INDEX_INVALIDATE,CACHE_I)
0150 #define INDEX_WRITEBACK_INVALIDATE_D BUILD_CACHE_OP(INDEX_INVALIDATE,CACHE_D)
0151 #define INDEX_INVALIDATE_SI BUILD_CACHE_OP(INDEX_INVALIDATE,CACHE_SI)
0152 #define INDEX_WRITEBACK_INVALIDATE_SD BUILD_CACHE_OP(INDEX_INVALIDATE,CACHE_SD)
0153
0154 #define INDEX_LOAD_TAG_I BUILD_CACHE_OP(INDEX_LOAD_TAG,CACHE_I)
0155 #define INDEX_LOAD_TAG_D BUILD_CACHE_OP(INDEX_LOAD_TAG,CACHE_D)
0156 #define INDEX_LOAD_TAG_SI BUILD_CACHE_OP(INDEX_LOAD_TAG,CACHE_SI)
0157 #define INDEX_LOAD_TAG_SD BUILD_CACHE_OP(INDEX_LOAD_TAG,CACHE_SD)
0158
0159 #define INDEX_STORE_TAG_I BUILD_CACHE_OP(INDEX_STORE_TAG,CACHE_I)
0160 #define INDEX_STORE_TAG_D BUILD_CACHE_OP(INDEX_STORE_TAG,CACHE_D)
0161 #define INDEX_STORE_TAG_SI BUILD_CACHE_OP(INDEX_STORE_TAG,CACHE_SI)
0162 #define INDEX_STORE_TAG_SD BUILD_CACHE_OP(INDEX_STORE_TAG,CACHE_SD)
0163
0164 #define CREATE_DIRTY_EXCLUSIVE_D BUILD_CACHE_OP(CREATE_DIRTY_EXCLUSIVE,CACHE_D)
0165 #define CREATE_DIRTY_EXCLUSIVE_SD BUILD_CACHE_OP(CREATE_DIRTY_EXCLUSIVE,CACHE_SD)
0166
0167 #define HIT_INVALIDATE_I BUILD_CACHE_OP(HIT_INVALIDATE,CACHE_I)
0168 #define HIT_INVALIDATE_D BUILD_CACHE_OP(HIT_INVALIDATE,CACHE_D)
0169 #define HIT_INVALIDATE_SI BUILD_CACHE_OP(HIT_INVALIDATE,CACHE_SI)
0170 #define HIT_INVALIDATE_SD BUILD_CACHE_OP(HIT_INVALIDATE,CACHE_SD)
0171
0172 #define CACHE_FILL_I BUILD_CACHE_OP(CACHE_FILL,CACHE_I)
0173 #define HIT_WRITEBACK_INVALIDATE_D BUILD_CACHE_OP(HIT_WRITEBACK_INVALIDATE,CACHE_D)
0174 #define HIT_WRITEBACK_INVALIDATE_SD BUILD_CACHE_OP(HIT_WRITEBACK_INVALIDATE,CACHE_SD)
0175
0176 #define HIT_WRITEBACK_I BUILD_CACHE_OP(HIT_WRITEBACK,CACHE_I)
0177 #define HIT_WRITEBACK_D BUILD_CACHE_OP(HIT_WRITEBACK,CACHE_D)
0178 #define HIT_WRITEBACK_SD BUILD_CACHE_OP(HIT_WRITEBACK,CACHE_SD)
0179
0180 #define HIT_SET_VIRTUAL_SI BUILD_CACHE_OP(HIT_SET_VIRTUAL,CACHE_SI)
0181 #define HIT_SET_VIRTUAL_SD BUILD_CACHE_OP(HIT_SET_VIRTUAL,CACHE_SD)
0182
0183
0184
0185
0186
0187