1 /////////////////////////////////////////////////////////////////////////
2 // $Id: lazy_flags.h,v 1.33 2008/05/04 15:07:08 sshwarts Exp $
3 /////////////////////////////////////////////////////////////////////////
5 // Copyright (C) 2001 MandrakeSoft S.A.
9 // 75002 Paris - France
10 // http://www.linux-mandrake.com/
11 // http://www.mandrakesoft.com/
13 // This library is free software; you can redistribute it and/or
14 // modify it under the terms of the GNU Lesser General Public
15 // License as published by the Free Software Foundation; either
16 // version 2 of the License, or (at your option) any later version.
18 // This library is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 // Lesser General Public License for more details.
23 // You should have received a copy of the GNU Lesser General Public
24 // License along with this library; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 /////////////////////////////////////////////////////////////////////////
29 #ifndef BX_LAZY_FLAGS_DEF
30 #define BX_LAZY_FLAGS_DEF
32 #define BX_LF_INSTR_ADD8 1
33 #define BX_LF_INSTR_ADD16 2
34 #define BX_LF_INSTR_ADD32 3
35 #define BX_LF_INSTR_ADD64 4
37 // used only if CF = 1 when executing ADC instruction
38 #define BX_LF_INSTR_ADC8 5
39 #define BX_LF_INSTR_ADC16 6
40 #define BX_LF_INSTR_ADC32 7
41 #define BX_LF_INSTR_ADC64 8
43 #define BX_LF_INSTR_ADD_ADC8(cf) (1 + ((cf)<<2))
44 #define BX_LF_INSTR_ADD_ADC16(cf) (2 + ((cf)<<2))
45 #define BX_LF_INSTR_ADD_ADC32(cf) (3 + ((cf)<<2))
46 #define BX_LF_INSTR_ADD_ADC64(cf) (4 + ((cf)<<2))
48 #define BX_LF_INSTR_SUB8 9
49 #define BX_LF_INSTR_SUB16 10
50 #define BX_LF_INSTR_SUB32 11
51 #define BX_LF_INSTR_SUB64 12
53 // used only if CF = 1 when executing SBB instruction
54 #define BX_LF_INSTR_SBB8 13
55 #define BX_LF_INSTR_SBB16 14
56 #define BX_LF_INSTR_SBB32 15
57 #define BX_LF_INSTR_SBB64 16
59 #define BX_LF_INSTR_SUB_SBB8(cf) (9 + ((cf)<<2))
60 #define BX_LF_INSTR_SUB_SBB16(cf) (10 + ((cf)<<2))
61 #define BX_LF_INSTR_SUB_SBB32(cf) (11 + ((cf)<<2))
62 #define BX_LF_INSTR_SUB_SBB64(cf) (12 + ((cf)<<2))
64 #define BX_LF_INSTR_INC8 17
65 #define BX_LF_INSTR_INC16 18
66 #define BX_LF_INSTR_INC32 19
67 #define BX_LF_INSTR_INC64 20
69 #define BX_LF_INSTR_DEC8 21
70 #define BX_LF_INSTR_DEC16 22
71 #define BX_LF_INSTR_DEC32 23
72 #define BX_LF_INSTR_DEC64 24
74 #define BX_LF_INSTR_NEG8 25
75 #define BX_LF_INSTR_NEG16 26
76 #define BX_LF_INSTR_NEG32 27
77 #define BX_LF_INSTR_NEG64 28
79 #define BX_LF_INSTR_LOGIC8 29
80 #define BX_LF_INSTR_LOGIC16 30
81 #define BX_LF_INSTR_LOGIC32 31
82 #define BX_LF_INSTR_LOGIC64 32
85 #define BX_LF_SIGN_BIT 63
87 #define BX_LF_SIGN_BIT 31
97 #endif // BX_LAZY_FLAGS_DEF