Debian Codegraph @

src/main/java/com/kenai/jnr/x86asm/HINT.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
27 package com.kenai.jnr.x86asm;
28
29 /**
30 * Condition hint, see @c AsmJit::Serializer::jz() and friends.
31 */
32 @Deprecated
33 public enum HINT {
34
35 /** No hint. */
36 HINT_NONE(0),
37
38 /** Condition will be taken (likely). */
39 HINT_TAKEN(0x3e),
40
41 /** Condition will be not taken (unlikely). */
42 HINT_NOT_TAKEN(0x2e);
43
44
45 private final int value;
46 HINT(int value) {
47 this.value = value;
48 }
49
50 public final int value() {
51 return value;
52 }
53
54 public static final HINT valueOf(int value) {
55 switch (value) {
56 case 0x3e:
57 return HINT_TAKEN;
58 case 0x2e:
59 return HINT_NOT_TAKEN;
60 default:
61 return HINT_NONE;
62 }
63 }
64 }