/*
- * Project: libFIRM
- * File name: ir/ir/irmode_t.h
- * Purpose: Data modes of operations -- private header.
- * Author: Martin Trapp, Christian Schaefer
- * Modified by: Goetz Lindenmaier, Mathias Heil, Michael Beck
- * Created:
- * CVS-ID: $Id$
- * Copyright: (c) 1998-2007 Universität Karlsruhe
- * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
*/
-
/**
- * @file irmode_t.h
+ * @file
+ * @brief Data modes of operations -- private header.
+ * @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Mathias Heil,
+ * Michael Beck
+ * @version $Id$
*/
-#ifndef _IRMODE_T_H_
-#define _IRMODE_T_H_
+#ifndef FIRM_IR_IRMODE_T_H
+#define FIRM_IR_IRMODE_T_H
#include <assert.h>
#include "irmode.h"
#include "tv.h"
-/** This struct is supposed to completely define a mode. **/
+/**
+ * Contains relevant information about a mode.
+ *
+ * Necessary information about a mode is stored in this struct
+ * which is used by the tarval module to perform calculations
+ * and comparisons of values of a such described mode.
+ *
+ * ATTRIBUTES:
+ * - modecode code: An unambiguous int (enum) for the mode
+ * - ident *name: Name of this mode. Two modes are different if the name is different.
+ * - mode_sort sort: sort of mode specifying possible usage categories
+ * - int size: size of the mode in Bits.
+ * - unsigned sign:1: signedness of this mode
+ * - ... more to come
+ * - modulo_shift specifies for modes of kind irms_int_number
+ * whether shift applies modulo to value of bits to shift
+ *
+ * SEE ALSO:
+ * The tech report 1999-44 describing FIRM and predefined modes
+ * tarval.h
+ */
struct ir_mode {
firm_kind kind; /**< distinguishes this node from others */
modecode code; /**< unambiguous identifier of a mode */
static INLINE int
_mode_is_data(const ir_mode *mode) {
assert(mode);
- return (_mode_is_num(mode) || _get_mode_sort(mode) == irms_character || _get_mode_sort(mode) == irms_reference);
+ return (_mode_is_numP(mode) || _get_mode_sort(mode) == irms_character);
}
static INLINE int
#define mode_is_float_vector(mode) _mode_is_float_vector(mode)
#define mode_is_int_vector(mode) _mode_is_int_vector(mode)
-#endif /* _IRMODE_T_H_ */
+#endif