1*c85f09ccSJohn Levon extern double g;
2*c85f09ccSJohn Levon
fcmp_eq(double a)3*c85f09ccSJohn Levon int fcmp_eq(double a) { return (g == a); }
fcmp_ne(double a)4*c85f09ccSJohn Levon int fcmp_ne(double a) { return (g != a); }
5*c85f09ccSJohn Levon
fcmp_gt(double a)6*c85f09ccSJohn Levon int fcmp_gt(double a) { return (g > a); }
fcmp_ge(double a)7*c85f09ccSJohn Levon int fcmp_ge(double a) { return (g >= a); }
fcmp_le(double a)8*c85f09ccSJohn Levon int fcmp_le(double a) { return (g <= a); }
fcmp_lt(double a)9*c85f09ccSJohn Levon int fcmp_lt(double a) { return (g < a); }
10*c85f09ccSJohn Levon
nfcmp_ne(double a)11*c85f09ccSJohn Levon int nfcmp_ne(double a) { return !(g == a); }
nfcmp_eq(double a)12*c85f09ccSJohn Levon int nfcmp_eq(double a) { return !(g != a); }
13*c85f09ccSJohn Levon
nfcmp_le(double a)14*c85f09ccSJohn Levon int nfcmp_le(double a) { return !(g > a); }
nfcmp_lt(double a)15*c85f09ccSJohn Levon int nfcmp_lt(double a) { return !(g >= a); }
nfcmp_gt(double a)16*c85f09ccSJohn Levon int nfcmp_gt(double a) { return !(g <= a); }
nfcmp_ge(double a)17*c85f09ccSJohn Levon int nfcmp_ge(double a) { return !(g < a); }
18*c85f09ccSJohn Levon
19*c85f09ccSJohn Levon /*
20*c85f09ccSJohn Levon * check-name: canonical-cmp
21*c85f09ccSJohn Levon * check-command: test-linearize -Wno-decl $file
22*c85f09ccSJohn Levon *
23*c85f09ccSJohn Levon * check-output-excludes: \\$123,
24*c85f09ccSJohn Levon *
25*c85f09ccSJohn Levon * check-output-start
26*c85f09ccSJohn Levon fcmp_eq:
27*c85f09ccSJohn Levon .L0:
28*c85f09ccSJohn Levon <entry-point>
29*c85f09ccSJohn Levon load.64 %r1 <- 0[g]
30*c85f09ccSJohn Levon fcmpoeq.32 %r3 <- %r1, %arg1
31*c85f09ccSJohn Levon ret.32 %r3
32*c85f09ccSJohn Levon
33*c85f09ccSJohn Levon
34*c85f09ccSJohn Levon fcmp_ne:
35*c85f09ccSJohn Levon .L2:
36*c85f09ccSJohn Levon <entry-point>
37*c85f09ccSJohn Levon load.64 %r5 <- 0[g]
38*c85f09ccSJohn Levon fcmpune.32 %r7 <- %r5, %arg1
39*c85f09ccSJohn Levon ret.32 %r7
40*c85f09ccSJohn Levon
41*c85f09ccSJohn Levon
42*c85f09ccSJohn Levon fcmp_gt:
43*c85f09ccSJohn Levon .L4:
44*c85f09ccSJohn Levon <entry-point>
45*c85f09ccSJohn Levon load.64 %r9 <- 0[g]
46*c85f09ccSJohn Levon fcmpogt.32 %r11 <- %r9, %arg1
47*c85f09ccSJohn Levon ret.32 %r11
48*c85f09ccSJohn Levon
49*c85f09ccSJohn Levon
50*c85f09ccSJohn Levon fcmp_ge:
51*c85f09ccSJohn Levon .L6:
52*c85f09ccSJohn Levon <entry-point>
53*c85f09ccSJohn Levon load.64 %r13 <- 0[g]
54*c85f09ccSJohn Levon fcmpoge.32 %r15 <- %r13, %arg1
55*c85f09ccSJohn Levon ret.32 %r15
56*c85f09ccSJohn Levon
57*c85f09ccSJohn Levon
58*c85f09ccSJohn Levon fcmp_le:
59*c85f09ccSJohn Levon .L8:
60*c85f09ccSJohn Levon <entry-point>
61*c85f09ccSJohn Levon load.64 %r17 <- 0[g]
62*c85f09ccSJohn Levon fcmpole.32 %r19 <- %r17, %arg1
63*c85f09ccSJohn Levon ret.32 %r19
64*c85f09ccSJohn Levon
65*c85f09ccSJohn Levon
66*c85f09ccSJohn Levon fcmp_lt:
67*c85f09ccSJohn Levon .L10:
68*c85f09ccSJohn Levon <entry-point>
69*c85f09ccSJohn Levon load.64 %r21 <- 0[g]
70*c85f09ccSJohn Levon fcmpolt.32 %r23 <- %r21, %arg1
71*c85f09ccSJohn Levon ret.32 %r23
72*c85f09ccSJohn Levon
73*c85f09ccSJohn Levon
74*c85f09ccSJohn Levon nfcmp_ne:
75*c85f09ccSJohn Levon .L12:
76*c85f09ccSJohn Levon <entry-point>
77*c85f09ccSJohn Levon load.64 %r25 <- 0[g]
78*c85f09ccSJohn Levon fcmpune.32 %r28 <- %r25, %arg1
79*c85f09ccSJohn Levon ret.32 %r28
80*c85f09ccSJohn Levon
81*c85f09ccSJohn Levon
82*c85f09ccSJohn Levon nfcmp_eq:
83*c85f09ccSJohn Levon .L14:
84*c85f09ccSJohn Levon <entry-point>
85*c85f09ccSJohn Levon load.64 %r30 <- 0[g]
86*c85f09ccSJohn Levon fcmpoeq.32 %r33 <- %r30, %arg1
87*c85f09ccSJohn Levon ret.32 %r33
88*c85f09ccSJohn Levon
89*c85f09ccSJohn Levon
90*c85f09ccSJohn Levon nfcmp_le:
91*c85f09ccSJohn Levon .L16:
92*c85f09ccSJohn Levon <entry-point>
93*c85f09ccSJohn Levon load.64 %r35 <- 0[g]
94*c85f09ccSJohn Levon fcmpule.32 %r38 <- %r35, %arg1
95*c85f09ccSJohn Levon ret.32 %r38
96*c85f09ccSJohn Levon
97*c85f09ccSJohn Levon
98*c85f09ccSJohn Levon nfcmp_lt:
99*c85f09ccSJohn Levon .L18:
100*c85f09ccSJohn Levon <entry-point>
101*c85f09ccSJohn Levon load.64 %r40 <- 0[g]
102*c85f09ccSJohn Levon fcmpult.32 %r43 <- %r40, %arg1
103*c85f09ccSJohn Levon ret.32 %r43
104*c85f09ccSJohn Levon
105*c85f09ccSJohn Levon
106*c85f09ccSJohn Levon nfcmp_gt:
107*c85f09ccSJohn Levon .L20:
108*c85f09ccSJohn Levon <entry-point>
109*c85f09ccSJohn Levon load.64 %r45 <- 0[g]
110*c85f09ccSJohn Levon fcmpugt.32 %r48 <- %r45, %arg1
111*c85f09ccSJohn Levon ret.32 %r48
112*c85f09ccSJohn Levon
113*c85f09ccSJohn Levon
114*c85f09ccSJohn Levon nfcmp_ge:
115*c85f09ccSJohn Levon .L22:
116*c85f09ccSJohn Levon <entry-point>
117*c85f09ccSJohn Levon load.64 %r50 <- 0[g]
118*c85f09ccSJohn Levon fcmpuge.32 %r53 <- %r50, %arg1
119*c85f09ccSJohn Levon ret.32 %r53
120*c85f09ccSJohn Levon
121*c85f09ccSJohn Levon
122*c85f09ccSJohn Levon * check-output-end
123*c85f09ccSJohn Levon */
124