root / target-ppc / op_template.h @ bd7d9a6d
History | View | Annotate | Download (2.5 kB)
1 |
/*
|
---|---|
2 |
* PowerPC emulation micro-operations for qemu.
|
3 |
*
|
4 |
* Copyright (c) 2003-2007 Jocelyn Mayer
|
5 |
*
|
6 |
* This library is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU Lesser General Public
|
8 |
* License as published by the Free Software Foundation; either
|
9 |
* version 2 of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This library is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14 |
* Lesser General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU Lesser General Public
|
17 |
* License along with this library; if not, write to the Free Software
|
18 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
19 |
*/
|
20 |
|
21 |
/* Altivec registers moves */
|
22 |
void OPPROTO glue(op_load_avr_A0_avr, REG) (void) |
23 |
{ |
24 |
AVR0 = env->avr[REG]; |
25 |
RETURN(); |
26 |
} |
27 |
|
28 |
void OPPROTO glue(op_load_avr_A1_avr, REG) (void) |
29 |
{ |
30 |
AVR1 = env->avr[REG]; |
31 |
RETURN(); |
32 |
} |
33 |
|
34 |
void OPPROTO glue(op_load_avr_A2_avr, REG) (void) |
35 |
{ |
36 |
AVR2 = env->avr[REG]; |
37 |
RETURN(); |
38 |
} |
39 |
|
40 |
void OPPROTO glue(op_store_A0_avr_avr, REG) (void) |
41 |
{ |
42 |
env->avr[REG] = AVR0; |
43 |
RETURN(); |
44 |
} |
45 |
|
46 |
void OPPROTO glue(op_store_A1_avr_avr, REG) (void) |
47 |
{ |
48 |
env->avr[REG] = AVR1; |
49 |
RETURN(); |
50 |
} |
51 |
|
52 |
#if 0 // unused
|
53 |
void OPPROTO glue(op_store_A2_avr_avr, REG) (void)
|
54 |
{
|
55 |
env->avr[REG] = AVR2;
|
56 |
RETURN();
|
57 |
}
|
58 |
#endif
|
59 |
|
60 |
#if REG <= 7 |
61 |
/* Condition register moves */
|
62 |
void OPPROTO glue(op_load_crf_T0_crf, REG) (void) |
63 |
{ |
64 |
T0 = env->crf[REG]; |
65 |
RETURN(); |
66 |
} |
67 |
|
68 |
void OPPROTO glue(op_load_crf_T1_crf, REG) (void) |
69 |
{ |
70 |
T1 = env->crf[REG]; |
71 |
RETURN(); |
72 |
} |
73 |
|
74 |
void OPPROTO glue(op_store_T0_crf_crf, REG) (void) |
75 |
{ |
76 |
env->crf[REG] = T0; |
77 |
RETURN(); |
78 |
} |
79 |
|
80 |
#if 0 // Unused
|
81 |
void OPPROTO glue(op_store_T1_crf_crf, REG) (void)
|
82 |
{
|
83 |
env->crf[REG] = T1;
|
84 |
RETURN();
|
85 |
}
|
86 |
#endif
|
87 |
|
88 |
#endif /* REG <= 7 */ |
89 |
|
90 |
/* floating point registers moves */
|
91 |
void OPPROTO glue(op_load_fpr_FT0_fpr, REG) (void) |
92 |
{ |
93 |
FT0 = env->fpr[REG]; |
94 |
RETURN(); |
95 |
} |
96 |
|
97 |
void OPPROTO glue(op_store_FT0_fpr_fpr, REG) (void) |
98 |
{ |
99 |
env->fpr[REG] = FT0; |
100 |
RETURN(); |
101 |
} |
102 |
|
103 |
void OPPROTO glue(op_load_fpr_FT1_fpr, REG) (void) |
104 |
{ |
105 |
FT1 = env->fpr[REG]; |
106 |
RETURN(); |
107 |
} |
108 |
|
109 |
void OPPROTO glue(op_store_FT1_fpr_fpr, REG) (void) |
110 |
{ |
111 |
env->fpr[REG] = FT1; |
112 |
RETURN(); |
113 |
} |
114 |
|
115 |
void OPPROTO glue(op_load_fpr_FT2_fpr, REG) (void) |
116 |
{ |
117 |
FT2 = env->fpr[REG]; |
118 |
RETURN(); |
119 |
} |
120 |
|
121 |
#if 0 // unused
|
122 |
void OPPROTO glue(op_store_FT2_fpr_fpr, REG) (void)
|
123 |
{
|
124 |
env->fpr[REG] = FT2;
|
125 |
RETURN();
|
126 |
}
|
127 |
#endif
|
128 |
|
129 |
#undef REG
|