]>
Commit | Line | Data |
---|---|---|
e53b6e56 | 1 | /* Definitions for condition code handling in final.cc and output routines. |
aeee4812 | 2 | Copyright (C) 1987-2023 Free Software Foundation, Inc. |
bf55c04f | 3 | |
1322177d | 4 | This file is part of GCC. |
bf55c04f | 5 | |
1322177d LB |
6 | GCC is free software; you can redistribute it and/or modify it under |
7 | the terms of the GNU General Public License as published by the Free | |
9dcd6f09 | 8 | Software Foundation; either version 3, or (at your option) any later |
1322177d | 9 | version. |
bf55c04f | 10 | |
1322177d LB |
11 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
12 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 | for more details. | |
bf55c04f CH |
15 | |
16 | You should have received a copy of the GNU General Public License | |
9dcd6f09 NC |
17 | along with GCC; see the file COPYING3. If not see |
18 | <http://www.gnu.org/licenses/>. */ | |
bf55c04f | 19 | |
f1717f8d KC |
20 | #ifndef GCC_CONDITIONS_H |
21 | #define GCC_CONDITIONS_H | |
22 | ||
bf55c04f CH |
23 | /* These are the machine-independent flags: */ |
24 | ||
25 | /* Set if the sign of the cc value is inverted: | |
26 | output a following jump-if-less as a jump-if-greater, etc. */ | |
27 | #define CC_REVERSED 1 | |
28 | ||
29 | /* This bit means that the current setting of the N bit is bogus | |
30 | and conditional jumps should use the Z bit in its place. | |
31 | This state obtains when an extraction of a signed single-bit field | |
32 | or an arithmetic shift right of a byte by 7 bits | |
33 | is turned into a btst, because btst does not set the N bit. */ | |
34 | #define CC_NOT_POSITIVE 2 | |
35 | ||
36 | /* This bit means that the current setting of the N bit is bogus | |
37 | and conditional jumps should pretend that the N bit is clear. | |
38 | Used after extraction of an unsigned bit | |
39 | or logical shift right of a byte by 7 bits is turned into a btst. | |
40 | The btst does not alter the N bit, but the result of that shift | |
41 | or extract is never negative. */ | |
42 | #define CC_NOT_NEGATIVE 4 | |
43 | ||
44 | /* This bit means that the current setting of the overflow flag | |
45 | is bogus and conditional jumps should pretend there is no overflow. */ | |
d7083c81 DE |
46 | /* ??? Note that for most targets this macro is misnamed as it applies |
47 | to the carry flag, not the overflow flag. */ | |
bf55c04f CH |
48 | #define CC_NO_OVERFLOW 010 |
49 | ||
50 | /* This bit means that what ought to be in the Z bit | |
51 | should be tested as the complement of the N bit. */ | |
52 | #define CC_Z_IN_NOT_N 020 | |
53 | ||
54 | /* This bit means that what ought to be in the Z bit | |
55 | should be tested as the N bit. */ | |
56 | #define CC_Z_IN_N 040 | |
57 | ||
58 | /* Nonzero if we must invert the sense of the following branch, i.e. | |
59 | change EQ to NE. This is not safe for IEEE floating point operations! | |
60 | It is intended for use only when a combination of arithmetic | |
61 | or logical insns can leave the condition codes set in a fortuitous | |
62 | (though inverted) state. */ | |
63 | #define CC_INVERTED 0100 | |
64 | ||
e8a2790c | 65 | /* Nonzero if we must convert signed condition operators to unsigned. |
19eb1ad7 | 66 | This is only used by machine description files. */ |
e8a2790c JVA |
67 | #define CC_NOT_SIGNED 0200 |
68 | ||
f1717f8d | 69 | #endif /* GCC_CONDITIONS_H */ |