re PR target/35657 (Alignments of DFP types aren't consistent)
2008-05-06 H.J. Lu <hongjiu.lu@intel.com> PR target/35657 * config/i386/i386.c (contains_128bit_aligned_vector_p): Renamed to ... (contains_aligned_value_p): This. Handle _Decimal128. (ix86_function_arg_boundary): Only align _Decimal128 to its natural boundary and handle it properly. From-SVN: r134987
This commit is contained in:
parent
2fc794f279
commit
4317a2fa51
@ -1,23 +1,32 @@
|
||||
2008-05-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/35657
|
||||
* config/i386/i386.c (contains_128bit_aligned_vector_p): Renamed
|
||||
to ...
|
||||
(contains_aligned_value_p): This. Handle _Decimal128.
|
||||
(ix86_function_arg_boundary): Only align _Decimal128 to its
|
||||
natural boundary and handle it properly.
|
||||
|
||||
2008-05-06 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
* ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node.
|
||||
(ipcp_method_is_cloned): Renamed to ipcp_node_is_clone
|
||||
(ipcp_method_set_orig_node): Removed.
|
||||
(ipcp_cval_get_cvalue_type): Removed.
|
||||
(ipcp_method_get_scale): Renamed to ipcp_get_node_scale.
|
||||
(ipcp_method_set_scale): Renamed to ipcp_set_node_scale.
|
||||
(ipcp_cval_set_cvalue_type): Removed.
|
||||
(ipcp_cval_get_cvalue): Removed.
|
||||
(ipcp_cval_set_cvalue): Removed.
|
||||
(ipcp_type_is_const): Renamed to ipcp_lat_is_const.
|
||||
(ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal
|
||||
(ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's
|
||||
(ipcp_cval_meet): Renamed to ipa_lattice_meet
|
||||
(ipcp_cval_changed): Changed to use ipcp_lat_is_const
|
||||
(ipcp_method_cval): Renamed to ipcp_get_ith_lattice
|
||||
(ipcp_get_ith_lattice): Changed parameters.
|
||||
(ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc
|
||||
(ipcp_lattice_from_jfunc): Changed parameters.
|
||||
* ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node.
|
||||
(ipcp_method_is_cloned): Renamed to ipcp_node_is_clone
|
||||
(ipcp_method_set_orig_node): Removed.
|
||||
(ipcp_cval_get_cvalue_type): Removed.
|
||||
(ipcp_method_get_scale): Renamed to ipcp_get_node_scale.
|
||||
(ipcp_method_set_scale): Renamed to ipcp_set_node_scale.
|
||||
(ipcp_cval_set_cvalue_type): Removed.
|
||||
(ipcp_cval_get_cvalue): Removed.
|
||||
(ipcp_cval_set_cvalue): Removed.
|
||||
(ipcp_type_is_const): Renamed to ipcp_lat_is_const.
|
||||
(ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal
|
||||
(ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's
|
||||
(ipcp_cval_meet): Renamed to ipa_lattice_meet
|
||||
(ipcp_cval_changed): Changed to use ipcp_lat_is_const
|
||||
(ipcp_method_cval): Renamed to ipcp_get_ith_lattice
|
||||
(ipcp_get_ith_lattice): Changed parameters.
|
||||
(ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc
|
||||
(ipcp_lattice_from_jfunc): Changed parameters.
|
||||
(ipcp_redirect): Local lattice pointer instead of lattice type variable.
|
||||
(ipcp_method_cval_print): Added temporary variable info.
|
||||
(ipcp_redirect): Removed already unused local variable caller.
|
||||
|
@ -4579,12 +4579,12 @@ ix86_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
/* Return true when TYPE should be 128bit aligned for 32bit argument passing
|
||||
ABI. Only called if TARGET_SSE. */
|
||||
ABI. */
|
||||
static bool
|
||||
contains_128bit_aligned_vector_p (tree type)
|
||||
contains_aligned_value_p (tree type)
|
||||
{
|
||||
enum machine_mode mode = TYPE_MODE (type);
|
||||
if (SSE_REG_MODE_P (mode)
|
||||
if (((TARGET_SSE && SSE_REG_MODE_P (mode)) || mode == TDmode)
|
||||
&& (!TYPE_USER_ALIGN (type) || TYPE_ALIGN (type) > 128))
|
||||
return true;
|
||||
if (TYPE_ALIGN (type) < 128)
|
||||
@ -4605,7 +4605,7 @@ contains_128bit_aligned_vector_p (tree type)
|
||||
for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
|
||||
{
|
||||
if (TREE_CODE (field) == FIELD_DECL
|
||||
&& contains_128bit_aligned_vector_p (TREE_TYPE (field)))
|
||||
&& contains_aligned_value_p (TREE_TYPE (field)))
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
@ -4613,7 +4613,7 @@ contains_128bit_aligned_vector_p (tree type)
|
||||
|
||||
case ARRAY_TYPE:
|
||||
/* Just for use if some languages passes arrays by value. */
|
||||
if (contains_128bit_aligned_vector_p (TREE_TYPE (type)))
|
||||
if (contains_aligned_value_p (TREE_TYPE (type)))
|
||||
return true;
|
||||
break;
|
||||
|
||||
@ -4637,8 +4637,8 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type)
|
||||
align = GET_MODE_ALIGNMENT (mode);
|
||||
if (align < PARM_BOUNDARY)
|
||||
align = PARM_BOUNDARY;
|
||||
/* Decimal floating point is aligned to its natural boundary. */
|
||||
if (!TARGET_64BIT && !VALID_DFP_MODE_P (mode))
|
||||
/* In 32bit, only _Decimal128 is aligned to its natural boundary. */
|
||||
if (!TARGET_64BIT && mode != TDmode)
|
||||
{
|
||||
/* i386 ABI defines all arguments to be 4 byte aligned. We have to
|
||||
make an exception for SSE modes since these require 128bit
|
||||
@ -4647,16 +4647,14 @@ ix86_function_arg_boundary (enum machine_mode mode, tree type)
|
||||
The handling here differs from field_alignment. ICC aligns MMX
|
||||
arguments to 4 byte boundaries, while structure fields are aligned
|
||||
to 8 byte boundaries. */
|
||||
if (!TARGET_SSE)
|
||||
align = PARM_BOUNDARY;
|
||||
else if (!type)
|
||||
if (!type)
|
||||
{
|
||||
if (!SSE_REG_MODE_P (mode))
|
||||
if (!(TARGET_SSE && SSE_REG_MODE_P (mode)) && mode != TDmode)
|
||||
align = PARM_BOUNDARY;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!contains_128bit_aligned_vector_p (type))
|
||||
if (!contains_aligned_value_p (type))
|
||||
align = PARM_BOUNDARY;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user