Added vector modes
[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;  /**< number of bits a valus of this mode will be shifted */
40   unsigned          vector_elem;   /**< if this is not equal 1, this is a vector mode with
41                                         vector_elem number of elements, size contains the size
42                                         of all bits and must be dividable by vector_elem */
43
44   /* ----------------------------------------------------------------------- */
45   tarval            *min;
46   tarval            *max;
47   tarval            *null;
48   tarval            *one;
49   void              *link;      /**< To store some intermediate information */
50   const void        *tv_priv;   /**< tarval module will save private data here */
51 };
52
53 #endif /* _IRMODE_T_H_ */