This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Avoid explicit use of machine modes (2/n) dwarf2out.c
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Sep 2003 14:48:49 -0700
- Subject: Avoid explicit use of machine modes (2/n) dwarf2out.c
dwarf2out.c does a similar thing to varasm.c.
zw
* dwarf2out.c (add_const_value_attribute): Use real_to_target.
===================================================================
Index: dwarf2out.c
--- dwarf2out.c 23 Sep 2003 19:46:56 -0000 1.453
+++ dwarf2out.c 29 Sep 2003 21:50:45 -0000
@@ -9105,24 +9105,7 @@ add_const_value_attribute (dw_die_ref di
REAL_VALUE_TYPE rv;
REAL_VALUE_FROM_CONST_DOUBLE (rv, rtl);
- switch (mode)
- {
- case SFmode:
- REAL_VALUE_TO_TARGET_SINGLE (rv, array[0]);
- break;
-
- case DFmode:
- REAL_VALUE_TO_TARGET_DOUBLE (rv, array);
- break;
-
- case XFmode:
- case TFmode:
- REAL_VALUE_TO_TARGET_LONG_DOUBLE (rv, array);
- break;
-
- default:
- abort ();
- }
+ real_to_target (array, &rv, mode);
add_AT_float (die, DW_AT_const_value, length, array);
}