another ia64 (and maybe generic) vector mode issue
Jan Beulich
JBeulich@novell.com
Wed Jan 5 11:45:00 GMT 2005
Since the mode for vector types not directly supported by the target is,
in 4.0.0, set to BLKmode, this results, for a given vector type, in
INTEGRAL_MODE_P(TYPE_MODE(type)) != INTEGRAL_TYPE_P(type)
FLOAT_MODE_P(TYPE_MODE(type)) != FLOAT_TYPE_P(type)
For IA64, treating floating point registers f8-f15 the same when used
for arguments vs. results, this leads to say V4SFmode or V2DFmode
getting passed in general registers (because TYPE_MODE() yields BLKmode,
and ia64_function_arg/ia64_function_arg_advance use FLOAT_MODE_P on the
mode passed to them, originating from using TYPE_MODE in
assign_parm_find_data_types), but getting returned in floating point
registers (since ia64_function_value uses FLOAT_TYPE_P) (another thing
being that it incorrectly uses the significand rather than the full
register).
Perhaps for this specific case this can be easily fixed by making
either ia64_function_arg and ia64_function_arg_advance use FLOAT_TYPE_P
or ia64_function_value use FLOAT_MODE_P (TYPE_MODE (valtype)), but I
wonder whether it isn't generally dangerous to have this kind of
contradicting functionality (and in this light whether it is really a
good thing to tag those emulated vector modes as BLKmode).
Thanks, Jan
More information about the Gcc
mailing list