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 void OPPROTO
glue(op_reset_FT
, REG
) (void)
35 /* XXX: This can be great on most RISC machines */
36 #if !defined(__i386__) && !defined(__x86_64__)
37 void OPPROTO
glue(op_set_s16_T
, REG
) (void)
39 glue(T
, REG
) = (int16_t)PARAM(1);
43 void OPPROTO
glue(op_set_u16_T
, REG
) (void)
45 glue(T
, REG
) = (uint16_t)PARAM(1);
50 void OPPROTO
glue(op_set_s32_T
, REG
) (void)
52 glue(T
, REG
) = (int32_t)PARAM(1);
56 void OPPROTO
glue(op_set_u32_T
, REG
) (void)
58 glue(T
, REG
) = (uint32_t)PARAM(1);
62 #if 0 // Qemu does not know how to do this...
63 void OPPROTO
glue(op_set_64_T
, REG
) (void)
65 glue(T
, REG
) = (int64_t)PARAM(1);
69 void OPPROTO
glue(op_set_64_T
, REG
) (void)
71 glue(T
, REG
) = ((int64_t)PARAM(1) << 32) | (int64_t)PARAM(2);
78 /* Fixed-point register moves */
80 void OPPROTO
glue(op_load_T0_ir
, REG
) (void)
86 void OPPROTO
glue(op_load_T1_ir
, REG
) (void)
92 void OPPROTO
glue(op_load_T2_ir
, REG
) (void)
98 void OPPROTO
glue(op_store_T0_ir
, REG
) (void)
104 void OPPROTO
glue(op_store_T1_ir
, REG
) (void)
110 void OPPROTO
glue(op_store_T2_ir
, REG
) (void)
116 void OPPROTO
glue(op_cmov_ir
, REG
) (void)
123 /* floating point registers moves */
124 void OPPROTO
glue(op_load_FT0_fir
, REG
) (void)
130 void OPPROTO
glue(op_load_FT1_fir
, REG
) (void)
136 void OPPROTO
glue(op_load_FT2_fir
, REG
) (void)
142 void OPPROTO
glue(op_store_FT0_fir
, REG
) (void)
148 void OPPROTO
glue(op_store_FT1_fir
, REG
) (void)
154 void OPPROTO
glue(op_store_FT2_fir
, REG
) (void)
160 void OPPROTO
glue(op_cmov_fir
, REG
) (void)
162 helper_cmov_fir(REG
);
165 #endif /* REG < 31 */