2
* definitions for dc's "register" declarations
4
* Copyright (C) 1994 Free Software Foundation, Inc.
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2, or (at your option)
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, you can either send email to this
18
* program's author (see below) or write to:
20
* The Free Software Foundation, Inc.
21
* 59 Temple Place, Suite 330
22
* Boston, MA 02111 USA
26
# include <limits.h> /* UCHAR_MAX */
29
/* determine how many register stacks there are */
32
# define DC_REGCOUNT 256
34
# define DC_REGCOUNT (UCHAR_MAX+1)
36
#endif /* not DC_REGCOUNT */
38
/* efficiency hack for masking arbritrary integers to 0..(DC_REGCOUNT-1) */
39
#if (DC_REGCOUNT & (DC_REGCOUNT-1)) == 0 /* DC_REGCOUNT is power of 2 */
40
# define regmap(r) ((r) & (DC_REGCOUNT-1))
42
# define regmap(r) ((r) % DC_REGCOUNT)