Added tarval_is_one function
[libfirm] / ir / tv / tv_t.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/tv/tv_t.h
4  * Purpose:     Representation of and static computations on target machine
5  *              values -- private header.
6  * Author:      Mathias Heil
7  * Modified by:
8  * Created:
9  * CVS-ID:      $Id$
10  * Copyright:   (c) 2003 Universität Karlsruhe
11  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
12  */
13
14
15
16 #ifndef _TV_T_H_
17 #define _TV_T_H_
18
19 #include "tv.h"
20
21 /**
22  * This struct represents the aforementioned tarvals.
23  *
24  * A tarval struct consists of an internal representation of the
25  * value and some additional fields further describing the value.
26  *
27  * ATTRIBUTES:
28  *   - ir_mode *mode     The mode of the stored value
29  *   - void *value       The internal representation
30  *
31  * @sa
32  *   irmode.h for predefined modes
33  */
34 struct tarval {
35     ir_mode *mode;              /**< the mode of the stored value */
36     const void *value;          /**< the value stored in an internal way... */
37     unsigned int length;        /**< the length of the stored value */
38 };
39
40 /** remove tarval representing an entity that is about to be destroyed */
41 void free_tarval_entity(entity *ent);
42
43 #endif /* _TV_T_H_ */