aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/backend
diff options
authorPekka Enberg <penberg@kernel.org>2011-08-27 14:09:50 +0300
committerPekka Enberg <penberg@kernel.org>2011-08-27 15:23:20 +0300
commit638debc6162ecb79061bbe8095d203d47c1a31d0 (patch)
treefe88768d5e443339c23d5a1db675ca1a7a54a315 /validation/backend
parent14a82f46806a584b15d36782419ff66114fac9a7 (diff)
downloadsparse-dev-638debc6162ecb79061bbe8095d203d47c1a31d0.tar.gz
sparse, llvm: Floating point support for binops
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'validation/backend')
-rw-r--r--validation/backend/binops.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/validation/backend/binops.c b/validation/backend/binops.c
index 4c941380..1fed9b25 100644
--- a/validation/backend/binops.c
+++ b/validation/backend/binops.c
@@ -8,6 +8,16 @@ static unsigned int uadd(unsigned int x, unsigned int y)
return x + y;
}
+static float fadd(float x, float y)
+{
+ return x + y;
+}
+
+static double dadd(double x, double y)
+{
+ return x + y;
+}
+
static int sub(int x, int y)
{
return x - y;
@@ -18,6 +28,16 @@ static unsigned int usub(unsigned int x, unsigned int y)
return x - y;
}
+static float fsub(float x, float y)
+{
+ return x - y;
+}
+
+static double dsub(double x, double y)
+{
+ return x - y;
+}
+
static int mul(int x, int y)
{
return x * y;
@@ -28,6 +48,16 @@ static unsigned int umul(unsigned int x, unsigned int y)
return x * y;
}
+static float fmul(float x, float y)
+{
+ return x * y;
+}
+
+static double dmul(double x, double y)
+{
+ return x * y;
+}
+
static int div(int x, int y)
{
return x / y;
@@ -38,6 +68,16 @@ static unsigned int udiv(unsigned int x, unsigned int y)
return x / y;
}
+static float fdiv(float x, float y)
+{
+ return x / y;
+}
+
+static double ddiv(double x, double y)
+{
+ return x / y;
+}
+
static int mod(int x, int y)
{
return x % y;