OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [gas/] [bignum.h] - Blame information for rev 438

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 205 julius
/* bignum.h-arbitrary precision integers
2
   Copyright 1987, 1992, 2003, 2005, 2007 Free Software Foundation, Inc.
3
 
4
   This file is part of GAS, the GNU Assembler.
5
 
6
   GAS 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 3, or (at your option)
9
   any later version.
10
 
11
   GAS is distributed in the hope that it will be useful, but WITHOUT
12
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
14
   License for more details.
15
 
16
   You should have received a copy of the GNU General Public License
17
   along with GAS; see the file COPYING.  If not, write to
18
   the Free Software Foundation, 51 Franklin Street - Fifth Floor,
19
   Boston, MA 02110-1301, USA.  */
20
 
21
/***********************************************************************\
22
 *                                                                      *
23
 *      Arbitrary-precision integer arithmetic.                         *
24
 *      For speed, we work in groups of bits, even though this          *
25
 *      complicates algorithms.                                         *
26
 *      Each group of bits is called a 'littlenum'.                     *
27
 *      A bunch of littlenums representing a (possibly large)           *
28
 *      integer is called a 'bignum'.                                   *
29
 *      Bignums are >= 0.                                               *
30
 *                                                                      *
31
 \***********************************************************************/
32
 
33
#define LITTLENUM_NUMBER_OF_BITS        (16)
34
#define LITTLENUM_RADIX                 (1 << LITTLENUM_NUMBER_OF_BITS)
35
#define LITTLENUM_MASK                  (0xFFFF)
36
#define LITTLENUM_SHIFT                 (1)
37
#define CHARS_PER_LITTLENUM             (1 << LITTLENUM_SHIFT)
38
#ifndef BITS_PER_CHAR
39
#define BITS_PER_CHAR                   (8)
40
#endif
41
 
42
typedef unsigned short LITTLENUM_TYPE;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.