From 37c2d4e8e6c66e51c132ffe99d2f98ec92eb3cc9 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Tue, 11 Aug 2009 04:01:08 +0000 Subject: Also build with ccc for benchmarking git-svn-id: svn://mattst88.com/svn/cpml-benchmarks@3 dfcbb71e-afff-4d4a-b3c7-756acd92cddf --- math.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'math.c') diff --git a/math.c b/math.c index 3c99e51..8e9629d 100644 --- a/math.c +++ b/math.c @@ -1,8 +1,19 @@ +#ifdef __DECC + +#include +#define __rpcc(x) __RPCC(x) +extern int printf (const char * format, ...); +#define M_PI 3.14159265358979323846 /* pi */ + +#elif defined __GNUC__ + +#define __rpcc(x) __builtin_alpha_rpcc(x) #include #include -#include -#define __rpcc __builtin_alpha_rpcc +#else +#error Unknown compiler +#endif #define CPML "cpml" #define GLIBC "glibc" @@ -25,13 +36,14 @@ double FUNCTION(double); #define INCREMENT 0.1 #endif + int main(int argc, char * argv[]) { double x; double results[100]; int i; int iterations; - uint32_t start, end; + unsigned int start, end; start = __rpcc(); -- cgit v1.2.3