gcc/gcc/fixed-value.h
Taras Glek d1b382088a hashtab.h: Update GTY annotations to new syntax
2009-04-21  Taras Glek <tglek@mozilla.com>

	* include/hashtab.h: Update GTY annotations to new syntax
	* include/splay-tree.h: Likewise


gcc/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* alias.c: Update GTY annotations to new syntax
	* basic-block.h: Likewise
	* bitmap.h: Likewise
	* c-common.h: Likewise
	* c-decl.c: Likewise
	* c-parser.c: Likewise
	* c-pragma.c: Likewise
	* c-tree.h: Likewise
	* cfgloop.h: Likewise
	* cgraph.h: Likewise
	* config/alpha/alpha.c: Likewise
	* config/arm/arm.h: Likewise
	* config/avr/avr.h: Likewise
	* config/bfin/bfin.c: Likewise
	* config/cris/cris.c: Likewise
	* config/darwin.c: Likewise
	* config/frv/frv.c: Likewise
	* config/i386/i386.c: Likewise
	* config/i386/i386.h: Likewise
	* config/i386/winnt.c: Likewise
	* config/ia64/ia64.h: Likewise
	* config/iq2000/iq2000.c: Likewise
	* config/mips/mips.c: Likewise
	* config/mmix/mmix.h: Likewise
	* config/pa/pa.c: Likewise
	* config/pa/pa.h: Likewise
	* config/rs6000/rs6000.c: Likewise
	* config/s390/s390.c: Likewise
	* config/sparc/sparc.c: Likewise
	* config/xtensa/xtensa.c: Likewise
	* cselib.h: Likewise
	* dbxout.c: Likewise
	* dwarf2out.c: Likewise
	* except.c: Likewise
	* except.h: Likewise
	* fixed-value.h: Likewise
	* function.c: Likewise
	* function.h: Likewise
	* gimple.h: Likewise
	* integrate.c: Likewise
	* optabs.c: Likewise
	* output.h: Likewise
	* real.h: Likewise
	* rtl.h: Likewise
	* stringpool.c: Likewise
	* tree-data-ref.c: Likewise
	* tree-flow.h: Likewise
	* tree-scalar-evolution.c: Likewise
	* tree-ssa-address.c: Likewise
	* tree-ssa-alias.h: Likewise
	* tree-ssa-operands.h: Likewise
	* tree.c: Likewise
	* tree.h: Likewise
	* varasm.c: Likewise
	* varray.h: Likewise
	* vec.h: Likewise
	* coretypes.h: Do not define GTY macro if it is already defined
	* doc/gty.texi: Update GTY documentation to new syntax
	* gengtype-lex.l: Enforce attribute-like syntax for GTY annotations on structs
	* gengtype-parse.c: Likewise


gcc/ada/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* gcc-interface/ada-tree.h: Update GTY annotations to new syntax
	* gcc-interface/trans.c: Likewise
	* gcc-interface/utils.c: Likewise


gcc/cp/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* cp-tree.h: Update GTY annotations to new syntax
	* decl.c: Likewise
	* mangle.c: Likewise
	* name-lookup.c: Likewise
	* name-lookup.h: Likewise
	* parser.c: Likewise
	* pt.c: Likewise
	* rtti.c: Likewise
	* semantics.c: Likewise
	* typeck2.c: Likewise


gcc/fortran/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* f95-lang.c: Update GTY annotations to new syntax
	* trans-intrinsic.c: Likewise
	* trans-io.c: Likewise
	* trans.h: Likewise


gcc/java/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* builtins.c: Update GTY annotations to new syntax
	* decl.c: Likewise
	* java-tree.h: Likewise
	* jcf.h: Likewise
	* lang.c: Likewise


gcc/objc/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* objc-act.c: Update GTY annotations to new syntax
	* objc-act.h: Likewise


libcpp/ChangeLog

2009-04-21  Taras Glek <tglek@mozilla.com>

	* include/cpp-id-data.h: Update GTY annotations to new syntax
	* include/cpplib.h: Likewise
	* include/line-map.h: Likewise
	* include/symtab.h: Likewise

From-SVN: r146607
2009-04-22 14:29:36 -04:00

101 lines
3.6 KiB
C

/* Fixed-point arithmetic support.
Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_FIXED_VALUE_H
#define GCC_FIXED_VALUE_H
#include "machmode.h"
#include "real.h"
#include "double-int.h"
struct GTY(()) fixed_value
{
double_int data; /* Store data up to 2 wide integers. */
enum machine_mode mode; /* Use machine mode to know IBIT and FBIT. */
};
#define FIXED_VALUE_TYPE struct fixed_value
#define MAX_FCONST0 18 /* For storing 18 fixed-point zeros per
fract, ufract, accum, and uaccum modes . */
#define MAX_FCONST1 8 /* For storing 8 fixed-point ones per accum
and uaccum modes. */
/* Constant fixed-point values 0 and 1. */
extern FIXED_VALUE_TYPE fconst0[MAX_FCONST0];
extern FIXED_VALUE_TYPE fconst1[MAX_FCONST1];
/* Macros to access fconst0 and fconst1 via machine modes. */
#define FCONST0(mode) fconst0[mode - QQmode]
#define FCONST1(mode) fconst1[mode - HAmode]
/* Return a CONST_FIXED with value R and mode M. */
#define CONST_FIXED_FROM_FIXED_VALUE(r, m) \
const_fixed_from_fixed_value (r, m)
extern rtx const_fixed_from_fixed_value (FIXED_VALUE_TYPE, enum machine_mode);
/* Initialize from a decimal or hexadecimal string. */
extern void fixed_from_string (FIXED_VALUE_TYPE *, const char *,
enum machine_mode);
/* In tree.c: wrap up a FIXED_VALUE_TYPE in a tree node. */
extern tree build_fixed (tree, FIXED_VALUE_TYPE);
/* Extend or truncate to a new mode. */
extern bool fixed_convert (FIXED_VALUE_TYPE *, enum machine_mode,
const FIXED_VALUE_TYPE *, bool);
/* Convert to a fixed-point mode from an integer. */
extern bool fixed_convert_from_int (FIXED_VALUE_TYPE *, enum machine_mode,
double_int, bool, bool);
/* Convert to a fixed-point mode from a real. */
extern bool fixed_convert_from_real (FIXED_VALUE_TYPE *, enum machine_mode,
const REAL_VALUE_TYPE *, bool);
/* Convert to a real mode from a fixed-point. */
extern void real_convert_from_fixed (REAL_VALUE_TYPE *, enum machine_mode,
const FIXED_VALUE_TYPE *);
/* Compare two fixed-point objects for bitwise identity. */
extern bool fixed_identical (const FIXED_VALUE_TYPE *, const FIXED_VALUE_TYPE *);
/* Calculate a hash value. */
extern unsigned int fixed_hash (const FIXED_VALUE_TYPE *);
#define FIXED_VALUES_IDENTICAL(x, y) fixed_identical (&(x), &(y))
/* Determine whether a fixed-point value X is negative. */
#define FIXED_VALUE_NEGATIVE(x) fixed_isneg (&(x))
/* Render F as a decimal floating point constant. */
extern void fixed_to_decimal (char *str, const FIXED_VALUE_TYPE *, size_t);
/* Binary or unary arithmetic on tree_code. */
extern bool fixed_arithmetic (FIXED_VALUE_TYPE *, int, const FIXED_VALUE_TYPE *,
const FIXED_VALUE_TYPE *, bool);
/* Compare fixed-point values by tree_code. */
extern bool fixed_compare (int, const FIXED_VALUE_TYPE *,
const FIXED_VALUE_TYPE *);
/* Determine whether a fixed-point value X is negative. */
extern bool fixed_isneg (const FIXED_VALUE_TYPE *);
#endif /* GCC_FIXED_VALUE_H */