root / target-alpha / op_template.h @ 3761035f
History | View | Annotate | Download (2 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 |
/* Fixed-point register moves */
|
41 |
#if REG < 31 |
42 |
void OPPROTO glue(op_cmov_ir, REG) (void) |
43 |
{ |
44 |
if (T0)
|
45 |
env->ir[REG] = T1; |
46 |
RETURN(); |
47 |
} |
48 |
|
49 |
/* floating point registers moves */
|
50 |
void OPPROTO glue(op_load_FT0_fir, REG) (void) |
51 |
{ |
52 |
FT0 = env->fir[REG]; |
53 |
RETURN(); |
54 |
} |
55 |
|
56 |
void OPPROTO glue(op_load_FT1_fir, REG) (void) |
57 |
{ |
58 |
FT1 = env->fir[REG]; |
59 |
RETURN(); |
60 |
} |
61 |
|
62 |
void OPPROTO glue(op_load_FT2_fir, REG) (void) |
63 |
{ |
64 |
FT2 = env->fir[REG]; |
65 |
RETURN(); |
66 |
} |
67 |
|
68 |
void OPPROTO glue(op_store_FT0_fir, REG) (void) |
69 |
{ |
70 |
env->fir[REG] = FT0; |
71 |
RETURN(); |
72 |
} |
73 |
|
74 |
void OPPROTO glue(op_store_FT1_fir, REG) (void) |
75 |
{ |
76 |
env->fir[REG] = FT1; |
77 |
RETURN(); |
78 |
} |
79 |
|
80 |
void OPPROTO glue(op_store_FT2_fir, REG) (void) |
81 |
{ |
82 |
env->fir[REG] = FT2; |
83 |
RETURN(); |
84 |
} |
85 |
|
86 |
void OPPROTO glue(op_cmov_fir, REG) (void) |
87 |
{ |
88 |
helper_cmov_fir(REG); |
89 |
RETURN(); |
90 |
} |
91 |
#endif /* REG < 31 */ |
92 |
|
93 |
#undef REG
|