db/fixup_kernel.sh: update vfs_write() code
[smatch.git] / validation / backend / arithmetic-ops.c
blobfc4f0e5a64f234a88bdaa8d88a70dd457c0f7a5d
1 static int add(int x, int y)
3 return x + y;
6 static unsigned int uadd(unsigned int x, unsigned int y)
8 return x + y;
11 static float fadd(float x, float y)
13 return x + y;
16 static double dadd(double x, double y)
18 return x + y;
21 static int sub(int x, int y)
23 return x - y;
26 static unsigned int usub(unsigned int x, unsigned int y)
28 return x - y;
31 static float fsub(float x, float y)
33 return x - y;
36 static double dsub(double x, double y)
38 return x - y;
41 static int mul(int x, int y)
43 return x * y;
46 static unsigned int umul(unsigned int x, unsigned int y)
48 return x * y;
51 static float fmul(float x, float y)
53 return x * y;
56 static double dmul(double x, double y)
58 return x * y;
61 static int div(int x, int y)
63 return x / y;
66 static unsigned int udiv(unsigned int x, unsigned int y)
68 return x / y;
71 static float fdiv(float x, float y)
73 return x / y;
76 static double ddiv(double x, double y)
78 return x / y;
81 static int mod(int x, int y)
83 return x % y;
86 static unsigned int umod(unsigned int x, unsigned int y)
88 return x % y;
91 static int neg(int x)
93 return -x;
96 static unsigned int uneg(unsigned int x)
98 return -x;
101 static float fneg(float x)
103 return -x;
106 static double dneg(double x)
108 return -x;
112 * check-name: Arithmetic operator code generation
113 * check-command: sparsec -c $file -o tmp.o