source: git/misc/aux.h @ 72f476b

spielwiese
Last change on this file since 72f476b was 72f476b, checked in by Mohamed Barakat <mohamed.barakat@…>, 13 years ago
renamed output -> reporter, moved part of reporter.h -> auxiliary.h
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/* -*-c++-*- */
2
3/*******************************************************************
4 *  File:    auxiliary.h
5 *  Purpose:
6 *  Author: 
7 *  Created:
8 *  Version: $Id$
9 *******************************************************************/
10
11// BOOLEAN
12
13#ifndef _MISC_AUX_H
14#define _MISC_AUX_H
15
16#if (SIZEOF_LONG == 8)
17typedef int BOOLEAN;
18/* testet on x86_64, gcc 3.4.6: 2 % */
19/* testet on IA64, gcc 3.4.6: 1 % */
20#else
21/* testet on athlon, gcc 2.95.4: 1 % */
22typedef short BOOLEAN;
23#endif
24
25#ifndef FALSE
26#define FALSE       0
27#endif
28
29#ifndef TRUE
30#define TRUE        1
31#endif
32
33#ifndef NULL
34#define NULL        ((void *)(0))
35#endif
36
37// #ifdef _TRY
38#ifndef ABS
39#define ABS(x) ((x)<0?(-(x)):(x))
40#endif
41// #endif
42
43static const int MAX_INT_LEN= 11;
44typedef void* ADDRESS;
45
46#define loop for(;;)
47
48static inline int si_max(const int a, const int b)  { return (a>b) ? a : b; }
49
50
51#if defined(SI_CPU_I386) || defined(SI_CPU_X86_64)
52  // the following settings seems to be better on i386 and x86_64 processors
53  // define if a*b is with mod instead of tables
54#define HAVE_MULT_MOD
55  // #define HAVE_GENERIC_ADD
56  // #ifdef HAVE_MULT_MOD
57  // #define HAVE_DIV_MOD
58  // #endif
59#elif defined(SI_CPU_IA64)
60  // the following settings seems to be better on itanium processors
61  // #define HAVE_MULT_MOD
62#define HAVE_GENERIC_ADD
63  // #ifdef HAVE_MULT_MOD
64  // #define HAVE_DIV_MOD
65  // #endif
66#elif defined(SI_CPU_SPARC)
67  // #define HAVE_GENERIC_ADD
68#define HAVE_MULT_MOD
69#ifdef HAVE_MULT_MOD
70#define HAVE_DIV_MOD
71#endif
72#elif defined(SI_CPU_PPC)
73  // the following settings seems to be better on ppc processors
74  // testet on: ppc_Linux, 740/750 PowerMac G3, 512k L2 cache
75#define HAVE_MULT_MOD
76  // #ifdef HAVE_MULT_MOD
77  // #define HAVE_DIV_MOD
78  // #endif
79#endif
80
81
82#endif /* _MISC_AUX_H */
83
Note: See TracBrowser for help on using the repository browser.