Commit f7ebc6a8 by Eric Botcazou Committed by Eric Botcazou

trans.c (gigi): Make the special IA-64 descriptor type a builtin type and give it a name.

	* gcc-interface/trans.c (gigi): Make the special IA-64 descriptor type
	a builtin type and give it a name.

From-SVN: r146347
parent 743e3e4c
2009-04-19 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (gigi): Make the special IA-64 descriptor type
a builtin type and give it a name.
2009-04-17 Diego Novillo <dnovillo@google.com> 2009-04-17 Diego Novillo <dnovillo@google.com>
* gcc-interface/misc.c (gnat_expand_expr): Remove. * gcc-interface/misc.c (gnat_expand_expr): Remove.
...@@ -544,21 +544,6 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, ...@@ -544,21 +544,6 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
= build_qualified_type (TREE_TYPE (raise_nodefer_decl), = build_qualified_type (TREE_TYPE (raise_nodefer_decl),
TYPE_QUAL_VOLATILE); TYPE_QUAL_VOLATILE);
long_long_float_type
= gnat_to_gnu_entity (Base_Type (standard_long_long_float), NULL_TREE, 0);
if (TREE_CODE (TREE_TYPE (long_long_float_type)) == INTEGER_TYPE)
{
/* In this case, the builtin floating point types are VAX float,
so make up a type for use. */
longest_float_type_node = make_node (REAL_TYPE);
TYPE_PRECISION (longest_float_type_node) = LONG_DOUBLE_TYPE_SIZE;
layout_type (longest_float_type_node);
record_builtin_type ("longest float type", longest_float_type_node);
}
else
longest_float_type_node = TREE_TYPE (long_long_float_type);
/* Build the special descriptor type and its null node if needed. */ /* Build the special descriptor type and its null node if needed. */
if (TARGET_VTABLE_USES_DESCRIPTORS) if (TARGET_VTABLE_USES_DESCRIPTORS)
{ {
...@@ -577,10 +562,26 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, ...@@ -577,10 +562,26 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
null_list = tree_cons (field, null_node, null_list); null_list = tree_cons (field, null_node, null_list);
} }
finish_record_type (fdesc_type_node, nreverse (field_list), 0, false); finish_record_type (fdesc_type_node, nreverse (field_list), 0, true);
record_builtin_type ("descriptor", fdesc_type_node);
null_fdesc_node = gnat_build_constructor (fdesc_type_node, null_list); null_fdesc_node = gnat_build_constructor (fdesc_type_node, null_list);
} }
long_long_float_type
= gnat_to_gnu_entity (Base_Type (standard_long_long_float), NULL_TREE, 0);
if (TREE_CODE (TREE_TYPE (long_long_float_type)) == INTEGER_TYPE)
{
/* In this case, the builtin floating point types are VAX float,
so make up a type for use. */
longest_float_type_node = make_node (REAL_TYPE);
TYPE_PRECISION (longest_float_type_node) = LONG_DOUBLE_TYPE_SIZE;
layout_type (longest_float_type_node);
record_builtin_type ("longest float type", longest_float_type_node);
}
else
longest_float_type_node = TREE_TYPE (long_long_float_type);
/* Dummy objects to materialize "others" and "all others" in the exception /* Dummy objects to materialize "others" and "all others" in the exception
tables. These are exported by a-exexpr.adb, so see this unit for the tables. These are exported by a-exexpr.adb, so see this unit for the
types to use. */ types to use. */
...@@ -6316,7 +6317,7 @@ build_binary_op_trapv (enum tree_code code, tree gnu_type, tree left, ...@@ -6316,7 +6317,7 @@ build_binary_op_trapv (enum tree_code code, tree gnu_type, tree left,
int needed_precision = precision * 2; int needed_precision = precision * 2;
if (code == MULT_EXPR && precision == 64) if (code == MULT_EXPR && precision == 64)
{ {
tree int_64 = gnat_type_for_size (64, 0); tree int_64 = gnat_type_for_size (64, 0);
return convert (gnu_type, build_call_2_expr (mulv64_decl, return convert (gnu_type, build_call_2_expr (mulv64_decl,
...@@ -6325,7 +6326,7 @@ build_binary_op_trapv (enum tree_code code, tree gnu_type, tree left, ...@@ -6325,7 +6326,7 @@ build_binary_op_trapv (enum tree_code code, tree gnu_type, tree left,
} }
else if (needed_precision <= BITS_PER_WORD else if (needed_precision <= BITS_PER_WORD
|| (code == MULT_EXPR || (code == MULT_EXPR
&& needed_precision <= LONG_LONG_TYPE_SIZE)) && needed_precision <= LONG_LONG_TYPE_SIZE))
{ {
tree wide_type = gnat_type_for_size (needed_precision, 0); tree wide_type = gnat_type_for_size (needed_precision, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment