uOFW
Reverse engineered PSP kernel 6.60.
Loading...
Searching...
No Matches
include
common
cop0.h
1
/* Copyright (C) 2011, 2012 The uOFW team
2
See the file COPYING for copying permission.
3
*/
4
5
#ifndef COMMON_INCLUDED
6
# error "Only include common_imp.h or common_header.h!"
7
#endif
8
9
#define COP0_CTRL_EPC 0
10
#define COP0_CTRL_STATUS 2
11
#define COP0_CTRL_CAUSE 3
12
#define COP0_CTRL_V0 4
13
#define COP0_CTRL_V1 5
14
#define COP0_CTRL_EXC_TABLE 8
15
#define COP0_CTRL_NMI_HANDLER 9
16
#define COP0_CTRL_SC_TABLE 12
17
#define COP0_CTRL_IS_INTERRUPT 13
18
#define COP0_CTRL_SP_KERNEL 14
19
#define COP0_CTRL_SP_USER 15
20
#define COP0_CTRL_TCB 16
21
#define COP0_CTRL_NMI_TABLE 18
22
#define COP0_CTRL_23 23
23
#define COP0_CTRL_PROFILER_BASE 25
24
25
#define COP0_STATE_COUNT 9
26
#define COP0_STATE_COMPARE 11
27
#define COP0_STATE_STATUS 12
28
#define COP0_STATE_SCCODE 21
29
#define COP0_STATE_CPUID 22
30
31
static
inline
int
pspCop0StateGet(
int
reg)
32
{
33
int
ret;
34
asm
(
"mfc0 %0, $%1"
:
"=r"
(ret) :
"ri"
(reg));
35
return
ret;
36
}
37
38
static
inline
void
pspCop0StateSet(
int
reg,
int
val)
39
{
40
asm
(
"mtc0 %0, $%1"
: :
"r"
(val),
"ri"
(reg));
41
}
42
43
static
inline
int
pspCop0CtrlGet(
int
reg)
44
{
45
int
ret;
46
asm
(
"cfc0 %0, $%1"
:
"=r"
(ret) :
"ri"
(reg));
47
return
ret;
48
}
49
50
static
inline
void
pspCop0CtrlSet(
int
reg,
int
val)
51
{
52
asm
(
"ctc0 %0, $%1"
: :
"r"
(val),
"ri"
(reg));
53
}
54
Generated on Thu Jun 19 2025 21:48:58 for uOFW by
1.9.8