add(int x,int y)1 static int add(int x, int y)
2 {
3 return x + y;
4 }
5
uadd(unsigned int x,unsigned int y)6 static unsigned int uadd(unsigned int x, unsigned int y)
7 {
8 return x + y;
9 }
10
fadd(float x,float y)11 static float fadd(float x, float y)
12 {
13 return x + y;
14 }
15
dadd(double x,double y)16 static double dadd(double x, double y)
17 {
18 return x + y;
19 }
20
sub(int x,int y)21 static int sub(int x, int y)
22 {
23 return x - y;
24 }
25
usub(unsigned int x,unsigned int y)26 static unsigned int usub(unsigned int x, unsigned int y)
27 {
28 return x - y;
29 }
30
fsub(float x,float y)31 static float fsub(float x, float y)
32 {
33 return x - y;
34 }
35
dsub(double x,double y)36 static double dsub(double x, double y)
37 {
38 return x - y;
39 }
40
mul(int x,int y)41 static int mul(int x, int y)
42 {
43 return x * y;
44 }
45
umul(unsigned int x,unsigned int y)46 static unsigned int umul(unsigned int x, unsigned int y)
47 {
48 return x * y;
49 }
50
fmul(float x,float y)51 static float fmul(float x, float y)
52 {
53 return x * y;
54 }
55
dmul(double x,double y)56 static double dmul(double x, double y)
57 {
58 return x * y;
59 }
60
div(int x,int y)61 static int div(int x, int y)
62 {
63 return x / y;
64 }
65
udiv(unsigned int x,unsigned int y)66 static unsigned int udiv(unsigned int x, unsigned int y)
67 {
68 return x / y;
69 }
70
fdiv(float x,float y)71 static float fdiv(float x, float y)
72 {
73 return x / y;
74 }
75
ddiv(double x,double y)76 static double ddiv(double x, double y)
77 {
78 return x / y;
79 }
80
mod(int x,int y)81 static int mod(int x, int y)
82 {
83 return x % y;
84 }
85
umod(unsigned int x,unsigned int y)86 static unsigned int umod(unsigned int x, unsigned int y)
87 {
88 return x % y;
89 }
90
neg(int x)91 static int neg(int x)
92 {
93 return -x;
94 }
95
uneg(unsigned int x)96 static unsigned int uneg(unsigned int x)
97 {
98 return -x;
99 }
100
fneg(float x)101 static float fneg(float x)
102 {
103 return -x;
104 }
105
dneg(double x)106 static double dneg(double x)
107 {
108 return -x;
109 }
110
111 /*
112 * check-name: Arithmetic operator code generation
113 * check-command: sparsec -c $file -o tmp.o
114 */
115