SSBM Decomp
Toggle main menu visibility
Loading...
Searching...
No Matches
PPCArch.h
Go to the documentation of this file.
1
#ifndef _DOLPHIN_PPCARCH
2
#define _DOLPHIN_PPCARCH
3
4
#include "
dolphin/types.h
"
5
6
#ifdef __cplusplus
7
extern
"C"
{
8
#endif
9
10
#define CTR 9
11
#define XER 1
12
#define LR 8
13
14
#define UPMC1 937
15
#define UPMC2 938
16
#define UPMC3 941
17
#define UPMC4 942
18
19
#define USIA 939
20
21
#define UMMCR0 936
22
#define UMMCR1 940
23
24
#define HID0 1008
25
#define HID1 1009
26
27
#define PVR 287
28
29
#define IBAT0U 528
30
#define IBAT0L 529
31
#define IBAT1U 530
32
#define IBAT1L 531
33
#define IBAT2U 532
34
#define IBAT2L 533
35
#define IBAT3U 534
36
#define IBAT3L 535
37
38
#define DBAT0U 536
39
#define DBAT0L 537
40
#define DBAT1U 538
41
#define DBAT1L 539
42
#define DBAT2U 540
43
#define DBAT2L 541
44
#define DBAT3U 542
45
#define DBAT3L 543
46
47
#define SDR1 25
48
49
#define SPRG0 272
50
#define SPRG1 273
51
#define SPRG2 274
52
#define SPRG3 275
53
54
#define DAR 19
55
#define DSISR 18
56
57
#define SRR0 26
58
#define SRR1 27
59
60
#define EAR 282
61
62
#define DABR 1013
63
64
#define TBL 284
65
#define TBU 285
66
67
#define L2CR 1017
68
69
#define DEC 22
70
71
#define IABR 1010
72
73
#define PMC1 953
74
#define PMC2 954
75
#define PMC3 957
76
#define PMC4 958
77
78
#define SIA 955
79
80
#define MMCR0 952
81
#define MMCR1 956
82
83
#define THRM1 1020
84
#define THRM2 1021
85
#define THRM3 1022
86
87
#define ICTC 1019
88
89
#define GQR0 912
90
#define GQR1 913
91
#define GQR2 914
92
#define GQR3 915
93
#define GQR4 916
94
#define GQR5 917
95
#define GQR6 918
96
#define GQR7 919
97
98
#define HID2 920
99
100
#define WPAR 921
101
102
#define DMA_U 922
103
#define DMA_L 923
104
105
#define MSR_POW 0x00040000
// Power Management
106
#define MSR_ILE 0x00010000
// Interrupt Little Endian
107
#define MSR_EE 0x00008000
// external interrupt
108
#define MSR_PR 0x00004000
// privilege level(should be 0)
109
#define MSR_FP 0x00002000
// floating point available
110
#define MSR_ME 0x00001000
// machine check enable
111
#define MSR_FE0 0x00000800
// floating point exception enable
112
#define MSR_SE 0x00000400
// single step trace enable
113
#define MSR_BE 0x00000200
// branch trace enable
114
#define MSR_FE1 0x00000100
// floating point exception enable
115
#define MSR_IP 0x00000040
// Exception prefix
116
#define MSR_IR 0x00000020
// instruction relocate
117
#define MSR_DR 0x00000010
// data relocate
118
#define MSR_PM 0x00000004
// Performance monitor marked mode
119
#define MSR_RI 0x00000002
// Recoverable interrupt
120
#define MSR_LE 0x00000001
// Little Endian
121
122
#define MSR_POW_BIT 13
// Power Management
123
#define MSR_ILE_BIT 15
// Interrupt Little Endian
124
#define MSR_EE_BIT 16
// external interrupt
125
#define MSR_PR_BIT 17
// privilege level (should be 0)
126
#define MSR_FP_BIT 18
// floating point available
127
#define MSR_ME_BIT 19
// machine check enable
128
#define MSR_FE0_BIT 20
// floating point exception enable
129
#define MSR_SE_BIT 21
// single step trace enable
130
#define MSR_BE_BIT 22
// branch trace enable
131
#define MSR_FE1_BIT 23
// floating point exception enable
132
#define MSR_IP_BIT 25
// Exception prefix
133
#define MSR_IR_BIT 26
// instruction relocate
134
#define MSR_DR_BIT 27
// data relocate
135
#define MSR_PM_BIT 29
// Performance monitor marked mode
136
#define MSR_RI_BIT 30
// Recoverable interrupt
137
#define MSR_LE_BIT 31
// Little Endian
138
139
/*---------------------------------------------------------------------------*
140
HID0 bits
141
*---------------------------------------------------------------------------*/
142
#define HID0_EMCP 0x80000000u
// Enable MCP
143
#define HID0_DBP 0x40000000u
// Enable 60x bus address and data parity chk
144
#define HID0_EBA 0x20000000u
// Enable 60x address parity checking
145
#define HID0_EBD 0x10000000u
// Enable 60x data parity checking
146
#define HID0_BCLK 0x08000000u
// CLK_OUT output enable and clk selection
147
#define HID0_ECLK 0x02000000u
// CLK_OUT output enable and clk selection
148
#define HID0_PAR 0x01000000u
// Disable !ARTRY precharge
149
#define HID0_DOZE 0x00800000u
// Doze mode enable
150
#define HID0_NAP 0x00400000u
// Nap mode enable
151
#define HID0_SLEEP 0x00200000u
// Sleep mode enable
152
#define HID0_DPM 0x00100000u
// Dynamic power management enable
153
#define HID0_NHR 0x00010000u
// Not hard reset (0 hard reset if s/w set it)
154
#define HID0_ICE 0x00008000u
// Instruction cache enable
155
#define HID0_DCE 0x00004000u
// Data cache enable
156
#define HID0_ILOCK 0x00002000u
// ICache lock
157
#define HID0_DLOCK 0x00001000u
// DCache lock
158
#define HID0_ICFI 0x00000800u
// ICache flash invalidate
159
#define HID0_DCFI 0x00000400u
// DCache flash invalidate
160
#define HID0_SPD 0x00000200u
// Speculative cache access enable (0 enable)
161
#define HID0_IFEM 0x00000100u
// Enable M bit on bus for Ifetch
162
#define HID0_SGE 0x00000080u
// Store gathering enable
163
#define HID0_DCFA 0x00000040u
// DCache flush assist - set before a flush
164
#define HID0_BTIC 0x00000020u
// Branch target icache enable
165
#define HID0_ABE 0x00000008u
// Address bcast enable
166
#define HID0_BHT 0x00000004u
// Branch history table enable
167
#define HID0_NOOPTI 0x00000001u
// No-op Dcache touch instructions
168
169
#define HID0_ICE_BIT 16
// Instruction cache enable
170
#define HID0_DCE_BIT 17
// Data cache enable
171
#define HID0_ILOCK_BIT 18
// ICache lock
172
#define HID0_DLOCK_BIT 19
// DCache lock
173
174
#define HID2_LSQE 0x80000000
// L/S quantize enable
175
#define HID2_WPE 0x40000000
// Write pipe enable
176
#define HID2_PSE 0x20000000
// Paired single enable
177
#define HID2_LCE 0x10000000
// Locked cache enable
178
179
#define HID2_DCHERR 0x00800000
// ERROR: dcbz_l cache hit
180
#define HID2_DNCERR 0x00400000
// ERROR: DMA access to normal cache
181
#define HID2_DCMERR 0x00200000
// ERROR: DMA cache miss error
182
#define HID2_DQOERR 0x00100000
// ERROR: DMA queue overflow
183
#define HID2_DCHEE 0x00080000
// dcbz_l cache hit error enable
184
#define HID2_DNCEE 0x00040000
// DMA access to normal cache error enable
185
#define HID2_DCMEE 0x00020000
// DMA cache miss error error enable
186
#define HID2_DQOEE 0x00010000
// DMA queue overflow error enable
187
188
#define HID2_DMAQL_MASK 0x0F000000
// DMA queue length mask
189
#define HID2_DMAQL_SHIFT 24
// DMA queue shift
190
191
#define HID2_LSQE_BIT 0
192
#define HID2_WPE_BIT 1
193
#define HID2_PSE_BIT 2
194
#define HID2_LCE_BIT 3
195
196
#define HID2_DCHERR_BIT 8
197
#define HID2_DNCERR_BIT 9
198
#define HID2_DCMERR_BIT 10
199
#define HID2_DQOERR_BIT 11
200
#define HID2_DCHEE_BIT 12
201
#define HID2_DNCEE_BIT 13
202
#define HID2_DCMEE_BIT 14
203
#define HID2_DQOEE_BIT 15
204
205
#define GQR_LOAD_SCALE_MASK 0x3F000000
// load scale field
206
#define GQR_LOAD_TYPE_MASK 0x00070000
// load type field
207
#define GQR_STORE_SCALE_MASK 0x00003F00
// store scale field
208
#define GQR_STORE_TYPE_MASK 0x00000007
// store type field
209
210
typedef
struct
{
211
u32
_pad0
: 2;
212
u32
loadScale
: 6;
213
u32
_pad1
: 5;
214
u32
loadType
: 3;
215
u32
_pad2
: 2;
216
u32
storeScale
: 6;
217
u32
_pad3
: 5;
218
u32
storeType
: 3;
219
}
PPC_GQR_t
;
220
221
typedef
union
{
222
u32
val
;
223
PPC_GQR_t
f
;
224
}
PPC_GQR_u
;
225
226
#define DMA_U_ADDR_MASK 0xFFFFFFE0
// Start addr in memory
227
#define DMA_U_LEN_U_MASK 0x0000001F
// lines to transfer (U)
228
229
#define DMA_L_LC_ADDR_MASK 0xFFFFFFE0
// Start addr in LC
230
#define DMA_L_LOAD 0x00000010
// 0 - store, 1 - load
231
#define DMA_L_STORE 0x00000000
// 0 - store, 1 - load
232
#define DMA_L_LEN_MASK 0x0000000C
// lines to transfer (L)
233
#define DMA_L_TRIGGER 0x00000002
// 0 - cmd inactive, 1 - cmd rdy
234
#define DMA_L_FLUSH 0x00000001
// 1 - Flush DMA queue
235
236
typedef
struct
{
237
u32
memAddr
: 27;
238
u32
dmaLenU
: 5;
239
}
PPC_DMA_U_t
;
240
241
typedef
union
{
242
u32
val
;
243
PPC_DMA_U_t
f
;
244
}
PPC_DMA_U_u
;
245
246
typedef
struct
{
247
u32
lcAddr
: 27;
248
u32
dmaLd
: 1;
249
u32
dmaLenL
: 2;
250
u32
dmaTrigger
: 1;
251
u32
dmaFlush
: 1;
252
}
PPC_DMA_L_t
;
253
254
typedef
union
{
255
u32
val
;
256
PPC_DMA_L_t
f
;
257
}
PPC_DMA_L_u
;
258
259
#define WPAR_ADDR 0xFFFFFFE0
// 32byte gather address
260
#define WPAR_BNE 0x00000001
// Buffer not empty (R)
261
262
#define SRR1_DMA_BIT 0x00200000
263
#define SRR1_L2DP_BIT 0x00100000
264
265
#define L2CR_L2E 0x80000000
// L2 Enable
266
#define L2CR_L2PE 0x40000000
// L2 data parity generation and checking enable
267
268
#define L2CR_L2SIZ_256K 0x10000000
// L2 size 256K
269
#define L2CR_L2SIZ_512K 0x20000000
// L2 size 512
270
#define L2CR_L2SIZ_1M 0x30000000
// L2 size 1M
271
272
#define L2CR_L2CLK_1_0 0x02000000
// L2 clock ratio 1
273
#define L2CR_L2CLK_1_5 0x04000000
// L2 clock ratio 1.5
274
#define L2CR_L2CLK_2_0 0x08000000
// L2 clock ratio 2
275
#define L2CR_L2CLK_2_5 0x0A000000
// L2 clock ratio 2.5
276
#define L2CR_L2CLK_3_0 0x0C000000
// L2 clock ratio 3
277
278
#define L2CR_RAM_FLOW_THRU_BURST \
279
0x00000000
// L2 RAM type flow-through sync. burst SRAM
280
#define L2CR_RAM_PIPELINE_BURST \
281
0x01000000
// L2 RAM type pipelined sync. burst SRAM
282
#define L2CR_RAM_PIPELINE_LATE \
283
0x01800000
// L2 RAM type pipelined sync. late-write SRAM
284
285
#define L2CR_L2DO 0x00400000
// Data only
286
#define L2CR_L2I 0x00200000
// Global invalidate
287
#define L2CR_L2CTL 0x00100000
// ZZ enable
288
#define L2CR_L2WT 0x00080000
// L2 write through
289
#define L2CR_L2TS 0x00040000
// L2 test support
290
291
#define L2CR_L2OH_0_5 0x00000000
// L2 output hold 0.5 ns
292
#define L2CR_L2OH_1_0 0x00010000
// L2 output hold 1.0 ns
293
294
#define L2CR_L2SL 0x00008000
// L2 DLL slow
295
#define L2CR_L2DF 0x00004000
// L2 differential clock
296
#define L2CR_L2BYP 0x00002000
// L2 DLL bypass
297
#define L2CR_L2CS 0x00000200
// L2 clock stop
298
#define L2CR_L2DRO 0x00000100
// L2 DLL rollover checkstop enable
299
#define L2CR_L2CTR_MASK 0x000000FE
// L2 counter value mask
300
#define L2CR_L2IP 0x00000001
// L2 global invalidate in progress
301
302
#define MMCR0_DIS 0x80000000
// Disables counting unconditionally
303
#define MMCR0_DP 0x40000000
// Disables counting while in supervisor mode
304
#define MMCR0_DU 0x20000000
// Disables counting while in user mode
305
#define MMCR0_DMS 0x10000000
// Disables counting while MSR[PM] is set
306
#define MMCR0_DMR 0x08000000
// Disables counting while MSR[PM] is zero
307
#define MMCR0_ENINT \
308
0x04000000
// Enables performance monitor interrupt signaling
309
#define MMCR0_DISCOUNT \
310
0x02000000
// Disables counting of PMCn when a performance monitor
311
// interrupt is signaled or...
312
#define MMCR0_RTCSELECT_MASK \
313
0x01800000
// 64-bit time base, bit selection enable
314
#define MMCR0_RTCSELECT_63 0x00000000
// Pick bit 63 to count
315
#define MMCR0_RTCSELECT_55 0x00800000
// Pick bit 55 to count
316
#define MMCR0_RTCSELECT_51 0x01000000
// Pick bit 51 to count
317
#define MMCR0_RTCSELECT_47 0x01800000
// Pick bit 47 to count
318
#define MMCR0_INTONBITTRANS \
319
0x00400000
// Causes interrupt signaling on bit transition from off to on
320
#define MMCR0_THRESHOLD_MASK 0x003F0000
// Threshold value
321
#define MMCR0_THRESHOLD(n) ((n) << 16)
// Threshold value (0 - 63)
322
#define MMCR0_PMC1INTCONTROL \
323
0x00008000
// Enables interrupt signaling due to PMC1 counter overflow
324
#define MMCR0_PMC2INTCONTROL \
325
0x00004000
// Enables interrupt signaling due to PMC2-PMC4 counter overflow
326
#define MMCR0_PMCTRIGGER \
327
0x00002000
// Can be used to trigger counting of PMC2-PMC4 after PMC1 has
328
// overflowed or...
329
#define MMCR0_PMC1SELECT_MASK 0x00001FC0
// PMC1 input selector
330
#define MMCR0_PMC2SELECT_MASK 0x0000003F
// PMC2 input selector
331
332
#define MMCR1_PMC3SELECT_MASK 0xF8000000
// PMC3 input selector
333
#define MMCR1_PMC4SELECT_MASK 0x07C00000
// PMC4 input selector
334
335
#define PMC1_OV 0x80000000
// Overflow
336
#define PMC1_COUNTER 0x7FFFFFFF
// Counter value
337
#define PMC2_OV 0x80000000
// Overflow
338
#define PMC2_COUNTER 0x7FFFFFFF
// Counter value
339
#define PMC3_OV 0x80000000
// Overflow
340
#define PMC3_COUNTER 0x7FFFFFFF
// Counter value
341
#define PMC4_OV 0x80000000
// Overflow
342
#define PMC4_COUNTER 0x7FFFFFFF
// Counter value
343
344
/*---------------------------------------------------------------------------*
345
PMC1 Events
346
*---------------------------------------------------------------------------*/
347
#define MMCR0_PMC1_HOLD 0x00000000
// Register holds current value
348
#define MMCR0_PMC1_CYCLE 0x00000040
// Processor cycles
349
#define MMCR0_PMC1_INSTRUCTION 0x00000080
// # of instructions completed.
350
#define MMCR0_PMC1_TRANSITION 0x000000C0
// # of transitions for 0 to 1
351
#define MMCR0_PMC1_DISPATCHED 0x00000100
// # of instructions dispatched
352
#define MMCR0_PMC1_EIEIO 0x00000140
// # of eieio instructions completed
353
#define MMCR0_PMC1_ITLB_CYCLE \
354
0x00000180
// # of cycles spent performing table search op. for the ITLB
355
#define MMCR0_PMC1_L2_HIT 0x000001C0
// # of access that hit the L2.
356
#define MMCR0_PMC1_EA \
357
0x00000200
// # of valid instruction EAs delivered to the memory subsystem
358
#define MMCR0_PMC1_IABR \
359
0x00000240
// # of time the address of an instruction matches the IABR
360
#define MMCR0_PMC1_L1_MISS 0x00000280
// # of loads that miss the L1
361
#define MMCR0_PMC1_Bx_UNRESOLVED \
362
0x000002C0
// # of branches that are unresolved when processed
363
#define MMCR0_PMC1_Bx_STALL_CYCLE \
364
0x00000300
// # of cycles that dispatcher stalls due to a second
365
// unresolved branch in the instruction stream
366
#define MMCR0_PMC1_IC_FETCH_MISS \
367
0x00000340
// # of times an instruction fetch missed the L1 Icache
368
#define MMCR0_PMC2_HOLD 0x00000000
// Register holds current value
369
#define MMCR0_PMC2_CYCLE 0x00000001
// Processor cycles
370
#define MMCR0_PMC2_INSTRUCTION 0x00000002
// # of instructions completed
371
#define MMCR0_PMC2_TRANSITION \
372
0x00000003
// # of time-base (lower) bit transitions
373
#define MMCR0_PMC2_DISPATCHED 0x00000004
// # of instructions dispatched
374
#define MMCR0_PMC2_IC_MISS 0x00000005
// # of L1 instruction cache misses
375
#define MMCR0_PMC2_ITLB_MISS 0x00000006
// # of ITLB misses
376
#define MMCR0_PMC2_L2_I_MISS 0x00000007
// # of L2 instruction misses
377
#define MMCR0_PMC2_Bx_FALL_TROUGH 0x00000008
// # of fall-through branches
378
#define MMCR0_PMC2_PR_SWITCH 0x00000009
// # of MSR[PR] bit toggles
379
#define MMCR0_PMC2_RESERVED_LOAD 0x0000000A
// # of reserved loads completed
380
#define MMCR0_PMC2_LOAD_STORE 0x0000000B
// # of completed loads and stores
381
#define MMCR0_PMC2_SNOOP 0x0000000C
// # of snoops
382
#define MMCR0_PMC2_L1_CASTOUT 0x0000000D
// # of L1 castouts to L2
383
#define MMCR0_PMC2_SYSTEM 0x0000000E
// # of completed system unit instructions
384
#define MMCR0_PMC2_IC_FETCH_MISS \
385
0x0000000F
// # of instruction fetch misses in the L1
386
#define MMCR0_PMC2_Bx_OUT_OF_ORDER \
387
0x00000010
// # of branches allowing out-of-order execution
388
389
/*---------------------------------------------------------------------------*
390
PMC3 Events
391
*---------------------------------------------------------------------------*/
392
#define MMCR1_PMC3_HOLD 0x00000000
// Register holds current value
393
#define MMCR1_PMC3_CYCLE 0x08000000
// Processor cycles
394
#define MMCR1_PMC3_INSTRUCTION 0x10000000
// # of instructions completed
395
#define MMCR1_PMC3_TRANSITION \
396
0x18000000
// # of time-base (lower) bit transitions
397
#define MMCR1_PMC3_DISPATCHED 0x20000000
// # of instructions dispatched
398
#define MMCR1_PMC3_DC_MISS 0x28000000
// # of L1 data cache misses
399
#define MMCR1_PMC3_DTLB_MISS 0x30000000
// # of DTLB misses
400
#define MMCR1_PMC3_L2_D_MISS 0x38000000
// # of L2 data misses
401
#define MMCR1_PMC3_Bx_TAKEN 0x40000000
// # predicted branches that were taken
402
#define MMCR1_PMC3_PM_SWITCH \
403
0x48000000
// # of transitions between marked and unmarked processes
404
#define MMCR1_PMC3_COND_STORE \
405
0x50000000
// # of store conditional instructions completed
406
#define MMCR1_PMC3_FPU 0x58000000
// # of instructions completed from the FPU
407
#define MMCR1_PMC3_L2_SNOOP_CASTOUT \
408
0x60000000
// # of L2 castout caused by snoops to modified lines
409
#define MMCR1_PMC3_L2_HIT \
410
0x68000000
// # of cache operations that hit in the L2 cache
411
#define MMCR1_PMC3_L1_MISS_CYCLE \
412
0x78000000
// # of cycles generated by L1 load misses
413
#define MMCR1_PMC3_Bx_SECOND \
414
0x80000000
// # of branches in the second speculative branch
415
// resolved correctly
416
#define MMCR1_PMC3_BPU_LR_CR \
417
0x88000000
// # of cycles the BPU stalls due to LR or CR unresolved
418
// dependencies
419
420
#define MMCR1_PMC4_HOLD 0x00000000
// Register holds current value
421
#define MMCR1_PMC4_CYCLE 0x00400000
// Processor cycles
422
#define MMCR1_PMC4_INSTRUCTION 0x00800000
// # of instructions completed
423
#define MMCR1_PMC4_TRANSITION \
424
0x00C00000
// # of time-base (lower) bit transitions
425
#define MMCR1_PMC4_DISPATCHED 0x01000000
// # of instructions dispatched
426
#define MMCR1_PMC4_L2_CASTOUT 0x01400000
// # of L2 castouts
427
#define MMCR1_PMC4_DTLB_CYCLE \
428
0x01800000
// # of cycles spent performing table searches for DTLB accesses
429
#define MMCR1_PMC4_Bx_MISSED 0x02000000
// # of mispredicted branches
430
#define MMCR1_PMC4_COND_STORE_INT \
431
0x02800000
// # of store conditional instructions completed
432
// with reservation intact
433
#define MMCR1_PMC4_SYNC 0x02C00000
// # of completed sync instructions
434
#define MMCR1_PMC4_SNOOP_RETRY 0x03000000
// # of snoop request retries
435
#define MMCR1_PMC4_INTEGER 0x03400000
// # of completed integer operations
436
#define MMCR1_PMC4_BPU_THIRD \
437
0x03800000
// # of cycles the BPU cannot process new branches
438
// due to having two unresolved branches
439
#define MMCR1_PMC4_DC_MISS 0x07C00000
// # of L1 data cache misses
440
441
/*---------------------------------------------------------------------------*
442
FPSCR bits
443
*---------------------------------------------------------------------------*/
444
#ifndef FPSCR_FX
445
#define FPSCR_FX 0x80000000
// Exception summary
446
#define FPSCR_FEX 0x40000000
// Enabled exception summary
447
#define FPSCR_VX 0x20000000
// Invalid operation
448
#define FPSCR_OX 0x10000000
// Overflow exception
449
#define FPSCR_UX 0x08000000
// Underflow exception
450
#define FPSCR_ZX 0x04000000
// Zero divide exception
451
#define FPSCR_XX 0x02000000
// Inexact exception
452
#define FPSCR_VXSNAN 0x01000000
// SNaN
453
#define FPSCR_VXISI 0x00800000
// Infinity - Infinity
454
#define FPSCR_VXIDI 0x00400000
// Infinity / Infinity
455
#define FPSCR_VXZDZ 0x00200000
// 0 / 0
456
#define FPSCR_VXIMZ 0x00100000
// Infinity * 0
457
#define FPSCR_VXVC 0x00080000
// Invalid compare
458
#define FPSCR_FR 0x00040000
// Fraction rounded
459
#define FPSCR_FI 0x00020000
// Fraction inexact
460
#define FPSCR_VXSOFT 0x00000400
// Software request
461
#define FPSCR_VXSQRT 0x00000200
// Invalid square root
462
#define FPSCR_VXCVI 0x00000100
// Invalid integer convert
463
#define FPSCR_VE 0x00000080
// Invalid operation exception enable
464
#define FPSCR_OE 0x00000040
// Overflow exception enable
465
#define FPSCR_UE 0x00000020
// Underflow exception enable
466
#define FPSCR_ZE 0x00000010
// Zero divide exception enable
467
#define FPSCR_XE 0x00000008
// Inexact exception enable
468
#define FPSCR_NI 0x00000004
// Non-IEEE mode
469
#endif
470
471
#ifndef FPSCR_FX_BIT
472
#define FPSCR_FX_BIT 0
// Exception summary
473
#define FPSCR_FEX_BIT 1
// Enabled exception summary
474
#define FPSCR_VX_BIT 2
// Invalid operation
475
#define FPSCR_OX_BIT 3
// Overflow exception
476
#define FPSCR_UX_BIT 4
// Underflow exception
477
#define FPSCR_ZX_BIT 5
// Zero divide exception
478
#define FPSCR_XX_BIT 6
// Inexact exception
479
#define FPSCR_VXSNAN_BIT 7
// SNaN
480
#define FPSCR_VXISI_BIT 8
// Infinity - Infinity
481
#define FPSCR_VXIDI_BIT 9
// Infinity / Infinity
482
#define FPSCR_VXZDZ_BIT 10
// 0 / 0
483
#define FPSCR_VXIMZ_BIT 11
// Infinity * 0
484
#define FPSCR_VXVC_BIT 12
// Invalid compare
485
#define FPSCR_FR_BIT 13
// Fraction rounded
486
#define FPSCR_FI_BIT 14
// Fraction inexact
487
#define FPSCR_VXSOFT_BIT 21
// Software request
488
#define FPSCR_VXSQRT_BIT 22
// Invalid square root
489
#define FPSCR_VXCVI_BIT 23
// Invalid integer convert
490
#define FPSCR_VE_BIT 24
// Invalid operation exception enable
491
#define FPSCR_OE_BIT 25
// Overflow exception enable
492
#define FPSCR_UE_BIT 26
// Underflow exception enable
493
#define FPSCR_ZE_BIT 27
// Zero divide exception enable
494
#define FPSCR_XE_BIT 28
// Inexact exception enable
495
#define FPSCR_NI_BIT 29
// Non-IEEE mode
496
#endif
497
498
// PPCArch.c
499
u32
PPCMfmsr
();
500
void
PPCMtmsr
(
u32
newMSR);
501
u32
PPCOrMsr
(
u32
value);
502
u32
PPCMfhid0
();
503
void
PPCMthid0
(
u32
newHID0);
504
u32
PPCMfl2cr
();
505
void
PPCMtl2cr
(
u32
newL2cr);
506
void
PPCMtdec
(
u32
newDec);
507
void
PPCSync
();
508
void
PPCHalt
();
509
u32
PPCMffpscr
();
510
void
PPCMtfpscr
(
u32
newFPSCR);
511
u32
PPCMfhid2
();
512
void
PPCMthid2
(
u32
newhid2);
513
u32
PPCMfwpar
();
514
void
PPCMtwpar
(
u32
newwpar);
515
void
PPCEnableSpeculation
();
516
void
PPCDisableSpeculation
();
517
void
PPCSetFpIEEEMode
();
518
void
PPCSetFpNonIEEEMode
();
519
u32
PPCMfpmc4
();
520
u32
PPCMfpmc3
();
521
u32
PPCMfpmc1
();
522
void
PPCMtpmc1
(
u32
newPmc1);
523
void
PPCMtpmc2
(
u32
newPmc1);
524
void
PPCMtpmc3
(
u32
newPmc1);
525
void
PPCMtpmc4
(
u32
newPmc1);
526
void
PPCMtmmcr0
(
u32
newMmcr0);
527
void
PPCMtmmcr1
(
u32
newMmcr0);
528
void
PPCMtdmaU
(
u32
newdmau);
529
void
PPCMtdmaL
(
u32
newdmal);
530
u32
PPCMfdec
(
void
);
531
u32
PPCAndMsr
(
u32
value);
532
u32
PPCAndCMsr
(
u32
value);
533
u32
PPCMfhid1
();
534
void
PPCEieio
();
535
u32
PPCMfmmcr0
();
536
u32
PPCMfmmcr1
();
537
u32
PPCMfpmc2
();
538
u32
PPCMfsia
();
539
void
PPCMtsia
(
u32
newSia);
540
u32
PPCMfdmaL
();
541
u32
PPCMfpvr
();
542
u32
PPCMfdmaU
();
543
544
// PPCPm.c
545
void
PMBegin
(
void
);
546
void
PMEnd
(
void
);
547
void
PMCycles
(
void
);
548
void
PML1FetchMisses
(
void
);
549
void
PML1MissCycles
(
void
);
550
void
PMInstructions
(
void
);
551
552
#ifdef __cplusplus
553
}
554
#endif
555
556
#endif
// _DOLPHIN_PPCARCH
PPCMtfpscr
void PPCMtfpscr(u32 newFPSCR)
PPCMfpmc1
u32 PPCMfpmc1()
Definition
PPCArch.c:194
PPCDisableSpeculation
void PPCDisableSpeculation()
PPCAndMsr
u32 PPCAndMsr(u32 value)
PPCMffpscr
u32 PPCMffpscr()
PMInstructions
void PMInstructions(void)
Definition
PPCPm.c:38
PPCMfl2cr
u32 PPCMfl2cr()
Definition
PPCArch.c:80
PPCMfsia
u32 PPCMfsia()
Definition
PPCArch.c:266
PPCOrMsr
u32 PPCOrMsr(u32 value)
PPCMtdec
void PPCMtdec(u32 newDec)
PPCAndCMsr
u32 PPCAndCMsr(u32 value)
PPCMtmsr
void PPCMtmsr(u32 newMSR)
PPCMtmmcr1
void PPCMtmmcr1(u32 newMmcr0)
PMEnd
void PMEnd(void)
Definition
PPCPm.c:17
PPCMfdec
u32 PPCMfdec(void)
Definition
PPCArch.c:107
PPCMtwpar
void PPCMtwpar(u32 newwpar)
PPCMfwpar
u32 PPCMfwpar()
Definition
PPCArch.c:302
PMBegin
void PMBegin(void)
Definition
PPCPm.c:5
PPCMtpmc4
void PPCMtpmc4(u32 newPmc1)
PPCMfpmc2
u32 PPCMfpmc2()
Definition
PPCArch.c:212
PPCMfdmaU
u32 PPCMfdmaU()
Definition
PPCArch.c:321
PPCMfhid2
u32 PPCMfhid2()
Definition
PPCArch.c:284
PMCycles
void PMCycles(void)
Definition
PPCPm.c:23
PML1FetchMisses
void PML1FetchMisses(void)
Definition
PPCPm.c:28
PML1MissCycles
void PML1MissCycles(void)
Definition
PPCPm.c:33
PPCMfdmaL
u32 PPCMfdmaL()
Definition
PPCArch.c:330
PPCMfpmc3
u32 PPCMfpmc3()
Definition
PPCArch.c:230
PPCMfpmc4
u32 PPCMfpmc4()
Definition
PPCArch.c:248
PPCMfmmcr0
u32 PPCMfmmcr0()
Definition
PPCArch.c:158
PPCMfhid0
u32 PPCMfhid0()
Definition
PPCArch.c:53
PPCMthid0
void PPCMthid0(u32 newHID0)
PPCMtpmc2
void PPCMtpmc2(u32 newPmc1)
PPCSync
void PPCSync()
Definition
PPCArch.c:116
PPCMtpmc3
void PPCMtpmc3(u32 newPmc1)
PPCEieio
void PPCEieio()
Definition
PPCArch.c:125
PPCMtmmcr0
void PPCMtmmcr0(u32 newMmcr0)
PPCMfmsr
u32 PPCMfmsr()
Definition
PPCArch.c:5
PPCMfpvr
u32 PPCMfpvr()
Definition
PPCArch.c:357
PPCMtsia
void PPCMtsia(u32 newSia)
PPCSetFpIEEEMode
void PPCSetFpIEEEMode()
PPCSetFpNonIEEEMode
void PPCSetFpNonIEEEMode()
PPCHalt
void PPCHalt()
Definition
PPCArch.c:145
PPCMfhid1
u32 PPCMfhid1()
Definition
PPCArch.c:71
PPCMthid2
void PPCMthid2(u32 newhid2)
PPCMtdmaL
void PPCMtdmaL(u32 newdmal)
PPCMtpmc1
void PPCMtpmc1(u32 newPmc1)
PPCMfmmcr1
u32 PPCMfmmcr1()
Definition
PPCArch.c:176
PPCEnableSpeculation
void PPCEnableSpeculation()
PPCMtdmaU
void PPCMtdmaU(u32 newdmau)
PPCMtl2cr
void PPCMtl2cr(u32 newL2cr)
types.h
u32
unsigned int u32
Definition
types.h:13
PPC_DMA_L_t
Definition
PPCArch.h:246
PPC_DMA_L_t::dmaFlush
u32 dmaFlush
Definition
PPCArch.h:251
PPC_DMA_L_t::dmaTrigger
u32 dmaTrigger
Definition
PPCArch.h:250
PPC_DMA_L_t::lcAddr
u32 lcAddr
Definition
PPCArch.h:247
PPC_DMA_L_t::dmaLenL
u32 dmaLenL
Definition
PPCArch.h:249
PPC_DMA_L_t::dmaLd
u32 dmaLd
Definition
PPCArch.h:248
PPC_DMA_U_t
Definition
PPCArch.h:236
PPC_DMA_U_t::dmaLenU
u32 dmaLenU
Definition
PPCArch.h:238
PPC_DMA_U_t::memAddr
u32 memAddr
Definition
PPCArch.h:237
PPC_GQR_t
Definition
PPCArch.h:210
PPC_GQR_t::loadType
u32 loadType
Definition
PPCArch.h:214
PPC_GQR_t::storeType
u32 storeType
Definition
PPCArch.h:218
PPC_GQR_t::storeScale
u32 storeScale
Definition
PPCArch.h:216
PPC_GQR_t::_pad1
u32 _pad1
Definition
PPCArch.h:213
PPC_GQR_t::_pad2
u32 _pad2
Definition
PPCArch.h:215
PPC_GQR_t::_pad0
u32 _pad0
Definition
PPCArch.h:211
PPC_GQR_t::loadScale
u32 loadScale
Definition
PPCArch.h:212
PPC_GQR_t::_pad3
u32 _pad3
Definition
PPCArch.h:217
PPC_DMA_L_u
Definition
PPCArch.h:254
PPC_DMA_L_u::val
u32 val
Definition
PPCArch.h:255
PPC_DMA_L_u::f
PPC_DMA_L_t f
Definition
PPCArch.h:256
PPC_DMA_U_u
Definition
PPCArch.h:241
PPC_DMA_U_u::f
PPC_DMA_U_t f
Definition
PPCArch.h:243
PPC_DMA_U_u::val
u32 val
Definition
PPCArch.h:242
PPC_GQR_u
Definition
PPCArch.h:221
PPC_GQR_u::val
u32 val
Definition
PPCArch.h:222
PPC_GQR_u::f
PPC_GQR_t f
Definition
PPCArch.h:223
libs
dolphin
include
dolphin
base
PPCArch.h
Generated by
1.17.0