Debian Codegraph @

rpython/jit/backend/ppc/condition.py

raw symbols SCIP
1 EQ = 0
2 NE = 1
3 LE = 2
4 GT = 3
5 LT = 4
6 GE = 5
7 SO = 6
8 NS = 7
9 VEQ = 8
10 VEQI = 9
11 VNE = 10
12 VNEI = 11
13 cond_none = -1 # invalid
14
15 def negate(cond):
16 return cond ^ 1
17
18 assert negate(EQ) == NE
19 assert negate(NE) == EQ
20 assert negate(LE) == GT
21 assert negate(GT) == LE
22 assert negate(LT) == GE
23 assert negate(GE) == LT
24 assert negate(SO) == NS
25 assert negate(NS) == SO
26 assert negate(VEQ) == VEQI
27 assert negate(VNE) == VNEI
28
29 encoding = [
30 (2, 12), # EQ
31 (2, 4), # NE
32 (1, 4), # LE
33 (1, 12), # GT
34 (0, 12), # LT
35 (0, 4), # GE
36 (3, 12), # SO
37 (3, 4), # NS
38 (24, 12), # VEQ
39 (24, 4), # VEQI
40 (26, 12), # VNE
41 (26, 4), # VNEI
42 ]