-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocessor_COP1.cpp
99 lines (78 loc) · 1.37 KB
/
processor_COP1.cpp
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
#include "processor.h"
#include "processor_utils.h"
void processor::COP1(uint32_t instruction)
{
uint8_t fmt = (instruction >> 21) & MASK_5B;
uint8_t function = instruction & MASK_5B; // FIXME
DEBUG(pdc -> dc_log("COP1 fmt %02x", fmt));
switch(fmt)
{
case 0x00: // MFC1
break;
case 0x01: // DMFC1
break;
case 0x02: // CFC1
break;
case 0x04: // MTC1
break;
case 0x05: // DMTC1
break;
case 0x06: // CTC1
break;
case 0x08: // BC
switch((fmt >> 16) & 3)
{
case 0x00: // BC1F
break;
case 0x01: // BC1T
break;
case 0x02: // BC1FL
break;
case 0x03: // BC1TL
break;
}
break;
case 0x10: // S
if (function == 0x11) // MOVCF
{
if (instruction & 0x10000)
{ } // MOVT(fmt)
else
{ } // MOVF(fmt)
}
else
{
}
break;
case 0x11: // D
if (function == 0x11) // MOVCF
{
if (instruction & 0x10000)
{ } // MOVT(fmt)
else
{ } // MOVF(fmt)
}
else
{
}
break;
case 0x14: // W
break;
case 0x15: // L
break;
default:
// pdc -> dc_log("COP1 fmt %02x not implemented", fmt);
break;
}
}
void processor::COP1X(uint32_t instruction)
{
uint8_t fmt = (instruction >> 21) & MASK_5B;
// DEBUG(pdc -> dc_log("COP1X fmt %02x", fmt));
switch(fmt)
{
default:
// pdc -> dc_log("COP1X fmt %02x not implemented", fmt);
break;
}
}