dwarfout.c (fundamental_type_code): Encode 32 bit floats/doubles as FT_float.
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Wed, 2 Sep 1998 11:31:14 +0000 (11:31 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 2 Sep 1998 11:31:14 +0000 (12:31 +0100)
* dwarfout.c (fundamental_type_code): Encode 32 bit floats/doubles
as FT_float.

From-SVN: r22169

gcc/ChangeLog
gcc/dwarfout.c

index 28e514ffc676aa0d61434feb5837dc6f8dbb6f1c..5432f294d0015ca4471b653655593477b55549f6 100644 (file)
@@ -1,3 +1,8 @@
+Wed Sep  2 19:30:06 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * dwarfout.c (fundamental_type_code): Encode 32 bit floats/doubles
+       as FT_float.
+
 Wed Sep  2 10:06:07 1998  Nick Clifton  <nickc@cygnus.com>
 
        * config/nextstep.h:    Update HANDLE_PRAGMA macro.
index 80475c6aea1b12bc885c1d2822f1d8f2f9755b69..bf46459e746d34c21334b2af97ea37ca9a208061 100644 (file)
@@ -1421,7 +1421,16 @@ fundamental_type_code (type)
          }
 
        if (TYPE_PRECISION (type) == DOUBLE_TYPE_SIZE)
-         return FT_dbl_prec_float;
+         {
+           /* On the SH, when compiling with -m3e or -m4-single-only, both
+              float and double are 32 bits.  But since the debugger doesn't
+              know about the subtarget, it always thinks double is 64 bits.
+              So we have to tell the debugger that the type is float to
+              make the output of the 'print' command etc. readable.  */
+           if (DOUBLE_TYPE_SIZE == FLOAT_TYPE_SIZE && FLOAT_TYPE_SIZE == 32)
+             return return FT_float;
+           return FT_dbl_prec_float;
+         }
        if (TYPE_PRECISION (type) == FLOAT_TYPE_SIZE)
          return FT_float;