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
13JMP_SMALL(jmp , jmp , jmp )
14JMP_SMALL(jo , jno , jo )
15JMP_SMALL(jno , jo , jno )
16JMP_SMALL(jb , jae , jb )
17JMP_SMALL(jae , jb , jae )
18JMP_SMALL(je , jne , je )
19JMP_SMALL(jne , je , jne )
20JMP_SMALL(jbe , ja , jbe )
21JMP_SMALL(ja , jbe , ja )
22JMP_SMALL(js , jns , js )
23JMP_SMALL(jns , js , jns )
24JMP_SMALL(jpe , jpo , jpe )
25JMP_SMALL(jpo , jpe , jpo )
26JMP_SMALL(jl , jge , jl )
27JMP_SMALL(jge , jl , jge )
28JMP_SMALL(jle , jg , jle )
29JMP_SMALL(jg , jle , jg )
30
31#elif defined(_TARGET_ARMARCH_)
32
33// jump reverse instruction condcode
34JMP_SMALL(jmp , jmp , b ) // AL always
35JMP_SMALL(eq , ne , beq ) // EQ
36JMP_SMALL(ne , eq , bne ) // NE
37JMP_SMALL(hs , lo , bhs ) // HS also CS
38JMP_SMALL(lo , hs , blo ) // LO also CC
39JMP_SMALL(mi , pl , bmi ) // MI
40JMP_SMALL(pl , mi , bpl ) // PL
41JMP_SMALL(vs , vc , bvs ) // VS
42JMP_SMALL(vc , vs , bvc ) // VC
43JMP_SMALL(hi , ls , bhi ) // HI
44JMP_SMALL(ls , hi , bls ) // LS
45JMP_SMALL(ge , lt , bge ) // GE
46JMP_SMALL(lt , ge , blt ) // LT
47JMP_SMALL(gt , le , bgt ) // GT
48JMP_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