Merge branch 'qemu-cvs'
[qemu-kvm/fedora.git] / target-alpha / op_template.h
blob044c4c8784c86402e1659731d2db5ad79cc5b64a
1 /*
2 * Alpha emulation cpu micro-operations templates for qemu.
4 * Copyright (c) 2007 Jocelyn Mayer
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.
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.
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
21 /* Optimized constant loads */
22 #if REG < 3
24 #if !defined(HOST_SPARC) && !defined(HOST_SPARC64)
25 void OPPROTO glue(op_reset_FT, REG) (void)
27 glue(FT, REG) = 0;
28 RETURN();
30 #else
31 void OPPROTO glue(op_reset_FT, REG) (void)
33 glue(helper_reset_FT, REG)();
34 RETURN();
36 #endif
38 #endif /* REG < 3 */
40 /* Fixed-point register moves */
41 #if REG < 31
42 void OPPROTO glue(op_cmov_ir, REG) (void)
44 if (T0)
45 env->ir[REG] = T1;
46 RETURN();
49 /* floating point registers moves */
50 void OPPROTO glue(op_load_FT0_fir, REG) (void)
52 FT0 = env->fir[REG];
53 RETURN();
56 void OPPROTO glue(op_load_FT1_fir, REG) (void)
58 FT1 = env->fir[REG];
59 RETURN();
62 void OPPROTO glue(op_load_FT2_fir, REG) (void)
64 FT2 = env->fir[REG];
65 RETURN();
68 void OPPROTO glue(op_store_FT0_fir, REG) (void)
70 env->fir[REG] = FT0;
71 RETURN();
74 void OPPROTO glue(op_store_FT1_fir, REG) (void)
76 env->fir[REG] = FT1;
77 RETURN();
80 void OPPROTO glue(op_store_FT2_fir, REG) (void)
82 env->fir[REG] = FT2;
83 RETURN();
86 void OPPROTO glue(op_cmov_fir, REG) (void)
88 helper_cmov_fir(REG);
89 RETURN();
91 #endif /* REG < 31 */
93 #undef REG