d8374cb05aaf4a2c8702837b05ec37ccfc827fff
[libfirm] / ir / ir / irmode_t.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/ir/irmode_t.h
4  * Purpose:     Data modes of operations -- private header.
5  * Author:      Martin Trapp, Christian Schaefer
6  * Modified by: Goetz Lindenmaier, Mathias Heil
7  * Created:
8  * CVS-ID:      $Id$
9  * Copyright:   (c) 1998-2003 Universität Karlsruhe
10  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11  */
12
13
14 /**
15  * @file irmode_t.h
16  */
17
18 # ifndef _IRMODE_T_H_
19 # define _IRMODE_T_H_
20
21 # include "irmode.h"
22 # include "tv.h"
23
24 /** This struct is supposed to completely define a mode. **/
25 struct ir_mode {
26   firm_kind         kind;       /**< distinguishes this node from others */
27   modecode          code;       /**< unambiguous identifier of a mode */
28   ident             *name;      /**< Name ident of this mode */
29
30   /* ----------------------------------------------------------------------- */
31   /* On changing this struct you have to evaluate the mode_are_equal function!*/
32   mode_sort         sort;       /**< coarse classification of this mode:
33                                      int, float, reference ...
34                                      (see irmode.h) */
35   mode_arithmetic   arithmetic; /**< different arithmetic operations possible with a mode */
36   int               size;       /**< size of the mode in Bits. */
37   int               align;      /**< byte alignment */
38   unsigned          sign:1;     /**< signedness of this mode */
39   unsigned int      modulo_shift;
40
41   /* ----------------------------------------------------------------------- */
42   tarval            *min;
43   tarval            *max;
44   tarval            *null;
45   tarval            *one;
46   void              *link;      /**< To store some intermediate information */
47   const void        *tv_priv;   /**< tarval module will save private data here */
48 };
49
50 #endif /* _IRMODE_T_H_ */