6b13f685e
김민수
BSP 최초 추가
|
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
|
static inline unsigned long readRegister(const unsigned int nReg)
{
struct pt_regs *regs = GET_USERREG();
unsigned int val = regs->uregs[nReg];
if (REG_PC == nReg)
val -= 4;
return val;
}
static inline void
writeRegister(const unsigned int nReg, const unsigned long val)
{
struct pt_regs *regs = GET_USERREG();
regs->uregs[nReg] = val;
}
static inline unsigned long readCPSR(void)
{
return (readRegister(REG_CPSR));
}
static inline void writeCPSR(const unsigned long val)
{
writeRegister(REG_CPSR, val);
}
static inline unsigned long readConditionCodes(void)
{
#ifdef __FPEM_TEST__
return (0);
#else
return (readCPSR() & CC_MASK);
#endif
}
static inline void writeConditionCodes(const unsigned long val)
{
struct pt_regs *regs = GET_USERREG();
unsigned long rval;
rval = regs->ARM_cpsr & ~CC_MASK;
regs->ARM_cpsr = rval | (val & CC_MASK);
}
|