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 */
23 void OPPROTO
glue(op_reset_T
, REG
) (void)
29 #if !defined(HOST_SPARC) && !defined(HOST_SPARC64)
30 void OPPROTO
glue(op_reset_FT
, REG
) (void)
36 void OPPROTO
glue(op_reset_FT
, REG
) (void)
38 glue(helper_reset_FT
, REG
)();
43 /* XXX: This can be great on most RISC machines */
44 #if !defined(__i386__) && !defined(__x86_64__)
45 void OPPROTO
glue(op_set_s16_T
, REG
) (void)
47 glue(T
, REG
) = (int16_t)PARAM(1);
51 void OPPROTO
glue(op_set_u16_T
, REG
) (void)
53 glue(T
, REG
) = (uint16_t)PARAM(1);
58 void OPPROTO
glue(op_set_s32_T
, REG
) (void)
60 glue(T
, REG
) = (int32_t)PARAM(1);
64 void OPPROTO
glue(op_set_u32_T
, REG
) (void)
66 glue(T
, REG
) = (uint32_t)PARAM(1);
70 #if 0 // Qemu does not know how to do this...
71 void OPPROTO
glue(op_set_64_T
, REG
) (void)
73 glue(T
, REG
) = (int64_t)PARAM(1);
77 void OPPROTO
glue(op_set_64_T
, REG
) (void)
79 glue(T
, REG
) = ((int64_t)PARAM(1) << 32) | (int64_t)PARAM(2);
86 /* Fixed-point register moves */
88 void OPPROTO
glue(op_load_T0_ir
, REG
) (void)
94 void OPPROTO
glue(op_load_T1_ir
, REG
) (void)
100 void OPPROTO
glue(op_load_T2_ir
, REG
) (void)
106 void OPPROTO
glue(op_store_T0_ir
, REG
) (void)
112 void OPPROTO
glue(op_store_T1_ir
, REG
) (void)
118 void OPPROTO
glue(op_store_T2_ir
, REG
) (void)
124 void OPPROTO
glue(op_cmov_ir
, REG
) (void)
131 /* floating point registers moves */
132 void OPPROTO
glue(op_load_FT0_fir
, REG
) (void)
138 void OPPROTO
glue(op_load_FT1_fir
, REG
) (void)
144 void OPPROTO
glue(op_load_FT2_fir
, REG
) (void)
150 void OPPROTO
glue(op_store_FT0_fir
, REG
) (void)
156 void OPPROTO
glue(op_store_FT1_fir
, REG
) (void)
162 void OPPROTO
glue(op_store_FT2_fir
, REG
) (void)
168 void OPPROTO
glue(op_cmov_fir
, REG
) (void)
170 helper_cmov_fir(REG
);
173 #endif /* REG < 31 */