[rfc] [2/2] Remove macros TARGET_{FLOAT,DOUBLE,LONG_DOUBLE}_{BIT|FORMAT}
Ulrich Weigand
uweigand@de.ibm.com
Tue Jun 12 14:17:00 GMT 2007
Markus Deuling wrote:
> this patch removes following macros from gdbarch.sh:
>
> * TARGET_FLOAT_BIT
> * TARGET_FLOAT_FORMAT
> * TARGET_DOUBLE_BIT
> * TARGET_DOUBLE_FORMAT
> * TARGET_LONG_DOUBLE_BIT
> * TARGET_LONG_DOUBLE_FORMAT
/* NOTE: The new architecture variable is named ``current_gdbarch''
- so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
+ so that macros such as gdbarch_double_bit, when expanded, refer to
the current local architecture and not the previous global
architecture. This ensures that the new architectures initial
values are not influenced by the previous architecture. Once
Well, replacing the macro by a gdbarch function invalidates the whole point
the comment is making ;-) You should either use another macro (that still
is a macro) as example, or -once there are no macros left- remove that
comment.
+ builtin_type_float = build_flt (gdbarch_float_bit (current_gdbarch), "float",
+ gdbarch_float_format (current_gdbarch));
+ builtin_type_double = build_flt (gdbarch_double_bit (current_gdbarch),
+ "double",
+ gdbarch_double_format (current_gdbarch));
+ builtin_type_long_double = build_flt (gdbarch_long_double_bit
+ (current_gdbarch),
+ "long double",
+ gdbarch_long_double_format
+ (current_gdbarch));
It might be nicer to move the built_flt to its own line
builtin_type_long_double
= build_fld (gdbarch_long_double_bit (current_gdbarch),
...
Otherwise this is OK, thanks!
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
More information about the Gdb-patches
mailing list