]> git.proxmox.com Git - qemu.git/blob - target-i386/opreg_template.h
use the TCG code generator
[qemu.git] / target-i386 / opreg_template.h
1 /*
2 * i386 micro operations (templates for various register related
3 * operations)
4 *
5 * Copyright (c) 2003 Fabrice Bellard
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21 /* mov T1 to REG if T0 is true */
22 void OPPROTO glue(glue(op_cmovw,REGNAME),_T1_T0)(void)
23 {
24 if (T0)
25 REG = (REG & ~0xffff) | (T1 & 0xffff);
26 FORCE_RET();
27 }
28
29 void OPPROTO glue(glue(op_cmovl,REGNAME),_T1_T0)(void)
30 {
31 #ifdef TARGET_X86_64
32 if (T0)
33 REG = (uint32_t)T1;
34 else
35 REG = (uint32_t)REG;
36 #else
37 if (T0)
38 REG = (uint32_t)T1;
39 #endif
40 FORCE_RET();
41 }
42
43 #ifdef TARGET_X86_64
44 void OPPROTO glue(glue(op_cmovq,REGNAME),_T1_T0)(void)
45 {
46 if (T0)
47 REG = T1;
48 FORCE_RET();
49 }
50 #endif