Debian Codegraph @

src/main/java/com/kenai/jnr/x86asm/CONDITION.java

raw
1 //
2 // Copyright (C) 2010 Wayne Meissner
3 // Copyright (c) 2008-2009, Petr Kobalicek <[email protected]>
4 //
5 // Permission is hereby granted, free of charge, to any person
6 // obtaining a copy of this software and associated documentation
7 // files (the "Software"), to deal in the Software without
8 // restriction, including without limitation the rights to use,
9 // copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the
11 // Software is furnished to do so, subject to the following
12 // conditions:
13 //
14 // The above copyright notice and this permission notice shall be
15 // included in all copies or substantial portions of the Software.
16 //
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 // OTHER DEALINGS IN THE SOFTWARE.
25
26 package com.kenai.jnr.x86asm;
27
28 /**
29 *
30 */
31 @Deprecated
32 public enum CONDITION {
33 //! @brief No condition code.
34 C_NO_CONDITION (-1),
35
36 // Condition codes from processor manuals.
37 C_A (0x7),
38 C_AE (0x3),
39 C_B (0x2),
40 C_BE (0x6),
41 C_C (0x2),
42 C_E (0x4),
43 C_G (0xF),
44 C_GE (0xD),
45 C_L (0xC),
46 C_LE (0xE),
47 C_NA (0x6),
48 C_NAE (0x2),
49 C_NB (0x3),
50 C_NBE (0x7),
51 C_NC (0x3),
52 C_NE (0x5),
53 C_NG (0xE),
54 C_NGE (0xC),
55 C_NL (0xD),
56 C_NLE (0xF),
57 C_NO (0x1),
58 C_NP (0xB),
59 C_NS (0x9),
60 C_NZ (0x5),
61 C_O (0x0),
62 C_P (0xA),
63 C_PE (0xA),
64 C_PO (0xB),
65 C_S (0x8),
66 C_Z (0x4),
67
68 // Simplified condition codes
69 C_OVERFLOW (0x0),
70 C_NO_OVERFLOW (0x1),
71 C_BELOW (0x2),
72 C_ABOVE_EQUAL (0x3),
73 C_EQUAL (0x4),
74 C_NOT_EQUAL (0x5),
75 C_BELOW_EQUAL (0x6),
76 C_ABOVE (0x7),
77 C_SIGN (0x8),
78 C_NOT_SIGN (0x9),
79 C_PARITY_EVEN (0xA),
80 C_PARITY_ODD (0xB),
81 C_LESS (0xC),
82 C_GREATER_EQUAL (0xD),
83 C_LESS_EQUAL (0xE),
84 C_GREATER (0xF),
85
86 // aliases
87 C_ZERO (0x4),
88 C_NOT_ZERO (0x5),
89 C_NEGATIVE (0x8),
90 C_POSITIVE (0x9),
91
92 // x87 floating point only
93 C_FP_UNORDERED (16),
94 C_FP_NOT_UNORDERED(17);
95
96 private final int value;
97
98 CONDITION(int value) {
99 this.value = value;
100 }
101
102 public final int value() {
103 return this.value;
104 }
105 }