Statistics
| Branch: | Revision:

root / target-alpha / op_template.h @ 9c29504e

History | View | Annotate | Download (1.8 kB)

1
/*
2
 *  Alpha emulation cpu micro-operations templates for qemu.
3
 *
4
 *  Copyright (c) 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
/* Optimized constant loads */
22
#if REG < 3
23

    
24
#if !defined(HOST_SPARC) && !defined(HOST_SPARC64)
25
void OPPROTO glue(op_reset_FT, REG) (void)
26
{
27
    glue(FT, REG) = 0;
28
    RETURN();
29
}
30
#else
31
void OPPROTO glue(op_reset_FT, REG) (void)
32
{
33
    glue(helper_reset_FT, REG)();
34
    RETURN();
35
}
36
#endif
37

    
38
#endif /* REG < 3 */
39

    
40
#if REG < 31
41
/* floating point registers moves */
42
void OPPROTO glue(op_load_FT0_fir, REG) (void)
43
{
44
    FT0 = env->fir[REG];
45
    RETURN();
46
}
47

    
48
void OPPROTO glue(op_load_FT1_fir, REG) (void)
49
{
50
    FT1 = env->fir[REG];
51
    RETURN();
52
}
53

    
54
void OPPROTO glue(op_load_FT2_fir, REG) (void)
55
{
56
    FT2 = env->fir[REG];
57
    RETURN();
58
}
59

    
60
void OPPROTO glue(op_store_FT0_fir, REG) (void)
61
{
62
    env->fir[REG] = FT0;
63
    RETURN();
64
}
65

    
66
void OPPROTO glue(op_store_FT1_fir, REG) (void)
67
{
68
    env->fir[REG] = FT1;
69
    RETURN();
70
}
71

    
72
void OPPROTO glue(op_store_FT2_fir, REG) (void)
73
{
74
    env->fir[REG] = FT2;
75
    RETURN();
76
}
77

    
78
void OPPROTO glue(op_cmov_fir, REG) (void)
79
{
80
    helper_cmov_fir(REG);
81
    RETURN();
82
}
83
#endif /* REG < 31 */
84

    
85
#undef REG