From: Matthias Braun Date: Thu, 22 Mar 2007 15:03:49 +0000 (+0000) Subject: sieve is not needed anymore X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=98fef3db0f4dab238151dde284af131ffc45a8fb;p=libfirm sieve is not needed anymore --- diff --git a/ir/be/test/sieve.c b/ir/be/test/sieve.c deleted file mode 100644 index 0cf4fb52d..000000000 --- a/ir/be/test/sieve.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Hey Emacs, this is a -*- C -*- file */ -/* - * Project: STAC - * File name: test/stantard/sieve.c - * Purpose: test case: Eratostenes sieve - * Author: Eratostenes - * Modified by: Boris Boesler - * Created: 17.7.2006 - * Copyright: (c) 2006 Dresden Silicon GmbH - * Licence: - * CVS-ID: $Id$ - */ - -/* switch to STA code generation */ -#pragma codegenerator STA - -/* Eratostenes Sieve Prime Number Program in C */ -#define TRUE 1 -#define FALSE 0 -//#define SIZE 8190 -#define SIZE 100 -#define ITERATIONS 1 - -/* result as local variable to check */ -/* - * sieve(10) = 0x08 - * sieve(20) = 0x0d - * sieve(100) = 0x2d - */ -short res; - -/* the sieve */ -short flags[SIZE + 1]; - -void task_start() -{ - register short i, prime, k, count, iter; - count = 0; - - for (iter = 1; iter <= ITERATIONS; iter++) { - count = 0; - - /* init solid sieve */ - for(i = 0; i <= SIZE; i++) { - flags[i] = TRUE; - } - - /* make holes in sieve */ - for(i = 0; i <= SIZE; i++) { - if(flags[i]) { - prime = i + i + 3; - for (k = i + prime; k <= SIZE; k += prime) { - flags[k] = FALSE; - } - count++; - } - } - } - res = count ; -} - -/* switch back to Control Flow Processor code generation */ -#pragma codegenerator CFP - - -#ifdef REFERENCE_TESTS -int main(int argc, char **argv) -{ - task_start(); - printf("sieve(%d) = 0x%x\n", SIZE, res); -} -#endif