]>
Commit | Line | Data |
---|---|---|
2c0262af FB |
1 | /* |
2 | * i386 micro operations (templates for various register related | |
3 | * operations) | |
5fafdf24 | 4 | * |
2c0262af FB |
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 | */ | |
2c0262af FB |
21 | /* mov T1 to REG if T0 is true */ |
22 | void OPPROTO glue(glue(op_cmovw,REGNAME),_T1_T0)(void) | |
23 | { | |
24 | if (T0) | |
14ce26e7 | 25 | REG = (REG & ~0xffff) | (T1 & 0xffff); |
128b346e | 26 | FORCE_RET(); |
2c0262af FB |
27 | } |
28 | ||
29 | void OPPROTO glue(glue(op_cmovl,REGNAME),_T1_T0)(void) | |
14ce26e7 | 30 | { |
57fec1fe | 31 | #ifdef TARGET_X86_64 |
14ce26e7 FB |
32 | if (T0) |
33 | REG = (uint32_t)T1; | |
57fec1fe FB |
34 | else |
35 | REG = (uint32_t)REG; | |
36 | #else | |
37 | if (T0) | |
38 | REG = (uint32_t)T1; | |
39 | #endif | |
14ce26e7 FB |
40 | FORCE_RET(); |
41 | } | |
42 | ||
43 | #ifdef TARGET_X86_64 | |
44 | void OPPROTO glue(glue(op_cmovq,REGNAME),_T1_T0)(void) | |
2c0262af FB |
45 | { |
46 | if (T0) | |
47 | REG = T1; | |
128b346e | 48 | FORCE_RET(); |
2c0262af | 49 | } |
14ce26e7 | 50 | #endif |