OSDN Git Service

2009-01-03 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / c-cppbuiltin.c
index 2d951fe..f1a454f 100644 (file)
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "c-pragma.h"
 #include "output.h"
 #include "except.h"            /* For USING_SJLJ_EXCEPTIONS.  */
+#include "debug.h"             /* For dwarf2out_do_frame.  */
 #include "toplev.h"
 #include "tm_p.h"              /* Target prototypes.  */
 #include "target.h"
@@ -691,6 +692,11 @@ c_cpp_builtins (cpp_reader *pfile)
     cpp_define (pfile, "__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16");
 #endif
 
+#ifdef DWARF2_UNWIND_INFO
+  if (dwarf2out_do_cfi_asm ())
+    cpp_define (pfile, "__GCC_HAVE_DWARF2_CFI_ASM");
+#endif
+
   /* Make the choice of ObjC runtime visible to source code.  */
   if (c_dialect_objc () && flag_next_runtime)
     cpp_define (pfile, "__NEXT_RUNTIME__");
@@ -846,7 +852,7 @@ builtin_define_with_int_value (const char *macro, HOST_WIDE_INT value)
 /* Pass an object-like macro a hexadecimal floating-point value.  */
 static void
 builtin_define_with_hex_fp_value (const char *macro,
-                                 tree type ATTRIBUTE_UNUSED, int digits,
+                                 tree type, int digits,
                                  const char *hex_str, 
                                  const char *fp_suffix,
                                  const char *fp_cast)
@@ -865,7 +871,8 @@ builtin_define_with_hex_fp_value (const char *macro,
      then print it back out as decimal.  */
 
   real_from_string (&real, hex_str);
-  real_to_decimal (dec_str, &real, sizeof (dec_str), digits, 0);
+  real_to_decimal_for_mode (dec_str, &real, sizeof (dec_str), digits, 0,
+                           TYPE_MODE (type));
 
   /* Assemble the macro in the following fashion
      macro = fp_cast [dec_str fp_suffix] */