Statistics
| Branch: | Revision:

root / target-ppc / op_template.h @ 1d542695

History | View | Annotate | Download (1.9 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
#if REG <= 7
22
/* Condition register moves */
23
void OPPROTO glue(op_load_crf_T0_crf, REG) (void)
24
{
25
    T0 = env->crf[REG];
26
    RETURN();
27
}
28

    
29
void OPPROTO glue(op_load_crf_T1_crf, REG) (void)
30
{
31
    T1 = env->crf[REG];
32
    RETURN();
33
}
34

    
35
void OPPROTO glue(op_store_T0_crf_crf, REG) (void)
36
{
37
    env->crf[REG] = T0;
38
    RETURN();
39
}
40

    
41
#if 0 // Unused
42
void OPPROTO glue(op_store_T1_crf_crf, REG) (void)
43
{
44
    env->crf[REG] = T1;
45
    RETURN();
46
}
47
#endif
48

    
49
#endif /* REG <= 7 */
50

    
51
/* floating point registers moves */
52
void OPPROTO glue(op_load_fpr_FT0_fpr, REG) (void)
53
{
54
    FT0 = env->fpr[REG];
55
    RETURN();
56
}
57

    
58
void OPPROTO glue(op_store_FT0_fpr_fpr, REG) (void)
59
{
60
    env->fpr[REG] = FT0;
61
    RETURN();
62
}
63

    
64
void OPPROTO glue(op_load_fpr_FT1_fpr, REG) (void)
65
{
66
    FT1 = env->fpr[REG];
67
    RETURN();
68
}
69

    
70
void OPPROTO glue(op_store_FT1_fpr_fpr, REG) (void)
71
{
72
    env->fpr[REG] = FT1;
73
    RETURN();
74
}
75

    
76
void OPPROTO glue(op_load_fpr_FT2_fpr, REG) (void)
77
{
78
    FT2 = env->fpr[REG];
79
    RETURN();
80
}
81

    
82
#if 0 // unused
83
void OPPROTO glue(op_store_FT2_fpr_fpr, REG) (void)
84
{
85
    env->fpr[REG] = FT2;
86
    RETURN();
87
}
88
#endif
89

    
90
#undef REG