mirror of git://gcc.gnu.org/git/gcc.git
c-common.c (registered_builtin_types): New static.
* c-common.c (registered_builtin_types): New static. (c_common_type_for_mode): Consult registered_builtin_types. (c_register_builtin_type): Add type to registered_builtin_types. * optabs.c (init_floating_libfuncs): Initialize libfuncs for all MODE_FLOAT modes, not just the ones corresponding to float_type_node, double_type_node, and long_double_type_node. From-SVN: r72711
This commit is contained in:
parent
65fc9769d5
commit
d1d3865f99
|
|
@ -1,3 +1,12 @@
|
||||||
|
2003-10-20 Zack Weinberg <zack@codesourcery.com>
|
||||||
|
|
||||||
|
* c-common.c (registered_builtin_types): New static.
|
||||||
|
(c_common_type_for_mode): Consult registered_builtin_types.
|
||||||
|
(c_register_builtin_type): Add type to registered_builtin_types.
|
||||||
|
* optabs.c (init_floating_libfuncs): Initialize libfuncs for
|
||||||
|
all MODE_FLOAT modes, not just the ones corresponding to
|
||||||
|
float_type_node, double_type_node, and long_double_type_node.
|
||||||
|
|
||||||
2003-10-20 Richard Henderson <rth@redhat.com>
|
2003-10-20 Richard Henderson <rth@redhat.com>
|
||||||
|
|
||||||
* config/alpha/alpha.h (PREDICATE_CODES): Add normal_memory_operand.
|
* config/alpha/alpha.h (PREDICATE_CODES): Add normal_memory_operand.
|
||||||
|
|
|
||||||
|
|
@ -1828,6 +1828,10 @@ c_common_type_for_size (unsigned int bits, int unsignedp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Used for communication between c_common_type_for_mode and
|
||||||
|
c_register_builtin_type. */
|
||||||
|
static GTY(()) tree registered_builtin_types;
|
||||||
|
|
||||||
/* Return a data type that has machine mode MODE.
|
/* Return a data type that has machine mode MODE.
|
||||||
If the mode is an integer,
|
If the mode is an integer,
|
||||||
then UNSIGNEDP selects between signed and unsigned types. */
|
then UNSIGNEDP selects between signed and unsigned types. */
|
||||||
|
|
@ -1835,6 +1839,8 @@ c_common_type_for_size (unsigned int bits, int unsignedp)
|
||||||
tree
|
tree
|
||||||
c_common_type_for_mode (enum machine_mode mode, int unsignedp)
|
c_common_type_for_mode (enum machine_mode mode, int unsignedp)
|
||||||
{
|
{
|
||||||
|
tree t;
|
||||||
|
|
||||||
if (mode == TYPE_MODE (integer_type_node))
|
if (mode == TYPE_MODE (integer_type_node))
|
||||||
return unsignedp ? unsigned_type_node : integer_type_node;
|
return unsignedp ? unsigned_type_node : integer_type_node;
|
||||||
|
|
||||||
|
|
@ -1923,6 +1929,10 @@ c_common_type_for_mode (enum machine_mode mode, int unsignedp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (t = registered_builtin_types; t; t = TREE_CHAIN (t))
|
||||||
|
if (TYPE_MODE (TREE_VALUE (t)) == mode)
|
||||||
|
return TREE_VALUE (t);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2051,6 +2061,8 @@ c_register_builtin_type (tree type, const char* name)
|
||||||
if (!TYPE_NAME (type))
|
if (!TYPE_NAME (type))
|
||||||
TYPE_NAME (type) = decl;
|
TYPE_NAME (type) = decl;
|
||||||
pushdecl (decl);
|
pushdecl (decl);
|
||||||
|
|
||||||
|
registered_builtin_types = tree_cons (0, type, registered_builtin_types);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
13
gcc/optabs.c
13
gcc/optabs.c
|
|
@ -5019,18 +5019,7 @@ init_integral_libfuncs (optab optable, const char *opname, int suffix)
|
||||||
static void
|
static void
|
||||||
init_floating_libfuncs (optab optable, const char *opname, int suffix)
|
init_floating_libfuncs (optab optable, const char *opname, int suffix)
|
||||||
{
|
{
|
||||||
enum machine_mode fmode, dmode, lmode;
|
init_libfuncs (optable, MIN_MODE_FLOAT, MAX_MODE_FLOAT, opname, suffix);
|
||||||
|
|
||||||
fmode = float_type_node ? TYPE_MODE (float_type_node) : VOIDmode;
|
|
||||||
dmode = double_type_node ? TYPE_MODE (double_type_node) : VOIDmode;
|
|
||||||
lmode = long_double_type_node ? TYPE_MODE (long_double_type_node) : VOIDmode;
|
|
||||||
|
|
||||||
if (fmode != VOIDmode)
|
|
||||||
init_libfuncs (optable, fmode, fmode, opname, suffix);
|
|
||||||
if (dmode != fmode && dmode != VOIDmode)
|
|
||||||
init_libfuncs (optable, dmode, dmode, opname, suffix);
|
|
||||||
if (lmode != dmode && lmode != VOIDmode)
|
|
||||||
init_libfuncs (optable, lmode, lmode, opname, suffix);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize the libfunc fields of an entire group of entries of an
|
/* Initialize the libfunc fields of an entire group of entries of an
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue