source: git/misc/aux.h @ dc093ce

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