1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | |
5 | // clang-format off |
6 | #ifndef JMP_SMALL |
7 | #error Must define JMP_SMALL macro before including this file |
8 | #endif |
9 | |
10 | #if defined(_TARGET_XARCH_) |
11 | |
12 | // jump reverse instruction |
13 | JMP_SMALL(jmp , jmp , jmp ) |
14 | JMP_SMALL(jo , jno , jo ) |
15 | JMP_SMALL(jno , jo , jno ) |
16 | JMP_SMALL(jb , jae , jb ) |
17 | JMP_SMALL(jae , jb , jae ) |
18 | JMP_SMALL(je , jne , je ) |
19 | JMP_SMALL(jne , je , jne ) |
20 | JMP_SMALL(jbe , ja , jbe ) |
21 | JMP_SMALL(ja , jbe , ja ) |
22 | JMP_SMALL(js , jns , js ) |
23 | JMP_SMALL(jns , js , jns ) |
24 | JMP_SMALL(jpe , jpo , jpe ) |
25 | JMP_SMALL(jpo , jpe , jpo ) |
26 | JMP_SMALL(jl , jge , jl ) |
27 | JMP_SMALL(jge , jl , jge ) |
28 | JMP_SMALL(jle , jg , jle ) |
29 | JMP_SMALL(jg , jle , jg ) |
30 | |
31 | #elif defined(_TARGET_ARMARCH_) |
32 | |
33 | // jump reverse instruction condcode |
34 | JMP_SMALL(jmp , jmp , b ) // AL always |
35 | JMP_SMALL(eq , ne , beq ) // EQ |
36 | JMP_SMALL(ne , eq , bne ) // NE |
37 | JMP_SMALL(hs , lo , bhs ) // HS also CS |
38 | JMP_SMALL(lo , hs , blo ) // LO also CC |
39 | JMP_SMALL(mi , pl , bmi ) // MI |
40 | JMP_SMALL(pl , mi , bpl ) // PL |
41 | JMP_SMALL(vs , vc , bvs ) // VS |
42 | JMP_SMALL(vc , vs , bvc ) // VC |
43 | JMP_SMALL(hi , ls , bhi ) // HI |
44 | JMP_SMALL(ls , hi , bls ) // LS |
45 | JMP_SMALL(ge , lt , bge ) // GE |
46 | JMP_SMALL(lt , ge , blt ) // LT |
47 | JMP_SMALL(gt , le , bgt ) // GT |
48 | JMP_SMALL(le , gt , ble ) // LE |
49 | |
50 | #else |
51 | #error Unsupported or unset target architecture |
52 | #endif // target type |
53 | |
54 | /*****************************************************************************/ |
55 | #undef JMP_SMALL |
56 | /*****************************************************************************/ |
57 | |
58 | // clang-format on |
59 | |