1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3 * Copyright (c) 2015, Linaro Limited
4 * All rights reserved.
5 */
6
7 #include "test_float_subj.h"
8
test_float_dadd(double a,double b)9 double test_float_dadd(double a, double b)
10 {
11 return a + b;
12 }
13
test_float_ddiv(double n,double d)14 double test_float_ddiv(double n, double d)
15 {
16 return n / d;
17 }
18
test_float_dmul(double a,double b)19 double test_float_dmul(double a, double b)
20 {
21 return a * b;
22 }
23
test_float_drsub(double a,double b)24 double test_float_drsub(double a, double b)
25 {
26 return b - a;
27 }
28
test_float_dsub(double a,double b)29 double test_float_dsub(double a, double b)
30 {
31 return a - b;
32 }
33
test_float_dcmpeq(double a,double b)34 int test_float_dcmpeq(double a, double b)
35 {
36 return a == b;
37 }
38
test_float_dcmplt(double a,double b)39 int test_float_dcmplt(double a, double b)
40 {
41 return a < b;
42 }
43
test_float_dcmple(double a,double b)44 int test_float_dcmple(double a, double b)
45 {
46 return a <= b;
47 }
48
test_float_dcmpge(double a,double b)49 int test_float_dcmpge(double a, double b)
50 {
51 return a >= b;
52 }
53
test_float_dcmpgt(double a,double b)54 int test_float_dcmpgt(double a, double b)
55 {
56 return a > b;
57 }
58
test_float_fadd(float a,float b)59 float test_float_fadd(float a, float b)
60 {
61 return a + b;
62 }
63
test_float_fdiv(float n,float d)64 float test_float_fdiv(float n, float d)
65 {
66 return n / d;
67 }
68
test_float_fmul(float a,float b)69 float test_float_fmul(float a, float b)
70 {
71 return a * b;
72 }
73
test_float_frsub(float a,float b)74 float test_float_frsub(float a, float b)
75 {
76 return b - a;
77 }
78
test_float_fsub(float a,float b)79 float test_float_fsub(float a, float b)
80 {
81 return a - b;
82 }
83
test_float_fcmpeq(float a,float b)84 int test_float_fcmpeq(float a, float b)
85 {
86 return a == b;
87 }
88
test_float_fcmplt(float a,float b)89 int test_float_fcmplt(float a, float b)
90 {
91 return a < b;
92 }
93
test_float_fcmple(float a,float b)94 int test_float_fcmple(float a, float b)
95 {
96 return a <= b;
97 }
98
test_float_fcmpge(float a,float b)99 int test_float_fcmpge(float a, float b)
100 {
101 return a >= b;
102 }
103
test_float_fcmpgt(float a,float b)104 int test_float_fcmpgt(float a, float b)
105 {
106 return a > b;
107 }
108
test_float_d2iz(double a)109 int test_float_d2iz(double a)
110 {
111 return a;
112 }
113
test_float_d2uiz(double a)114 unsigned test_float_d2uiz(double a)
115 {
116 return a;
117 }
118
test_float_d2lz(double a)119 long long test_float_d2lz(double a)
120 {
121 return a;
122 }
123
test_float_d2ulz(double a)124 unsigned long long test_float_d2ulz(double a)
125 {
126 return a;
127 }
128
test_float_f2iz(float a)129 int test_float_f2iz(float a)
130 {
131 return a;
132 }
133
test_float_f2uiz(float a)134 unsigned test_float_f2uiz(float a)
135 {
136 return a;
137 }
138
test_float_f2lz(float a)139 long long test_float_f2lz(float a)
140 {
141 return a;
142 }
143
test_float_f2ulz(float a)144 unsigned long long test_float_f2ulz(float a)
145 {
146 return a;
147 }
148
test_float_d2f(double a)149 float test_float_d2f(double a)
150 {
151 return a;
152 }
153
test_float_f2d(float a)154 double test_float_f2d(float a)
155 {
156 return a;
157 }
158
test_float_i2d(int a)159 double test_float_i2d(int a)
160 {
161 return a;
162 }
163
test_float_ui2d(unsigned a)164 double test_float_ui2d(unsigned a)
165 {
166 return a;
167 }
168
test_float_l2d(long long a)169 double test_float_l2d(long long a)
170 {
171 return a;
172 }
173
test_float_ul2d(unsigned long long a)174 double test_float_ul2d(unsigned long long a)
175 {
176 return a;
177 }
178
test_float_i2f(int a)179 float test_float_i2f(int a)
180 {
181 return a;
182 }
183
test_float_ui2f(unsigned a)184 float test_float_ui2f(unsigned a)
185 {
186 return a;
187 }
188
test_float_l2f(long long a)189 float test_float_l2f(long long a)
190 {
191 return a;
192 }
193
test_float_ul2f(unsigned long long a)194 float test_float_ul2f(unsigned long long a)
195 {
196 return a;
197 }
198