This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] gcc/gcov-io.h


The recent changes to gcov-io.h do not work on the c4x target because
there is no SImode/DImode on that target. The QImode on that target
is 32 bits wide. The HImode is 64 bits on the c4x target.
The fix is simular to libgcc2.h. Tested on c4x and i386.
I do not have write permission so can not make the change after aproval.

	Herman.


2003-05-22 Herman A.J. ten Brugge <hermantenbrugge@home.nl>

	* gcov-io.h: Check BITS_PER_UNIT when defining gcov_unsigned_t,
	gcov_position_t and gcov_type.


--- gcov-io.h.org	2003-05-14 18:27:32.000000000 +0200
+++ gcov-io.h	2003-05-22 19:21:03.000000000 +0200
@@ -160,6 +160,7 @@ Software Foundation, 59 Temple Place - S
 #if IN_LIBGCOV
 /* About the target */
 
+#if BITS_PER_UNIT == 8
 typedef unsigned gcov_unsigned_t __attribute__ ((mode (SI)));
 typedef unsigned gcov_position_t __attribute__ ((mode (SI)));
 #if LONG_LONG_TYPE_SIZE > 32
@@ -167,6 +168,26 @@ typedef signed gcov_type __attribute__ (
 #else
 typedef signed gcov_type __attribute__ ((mode (SI)));
 #endif
+#else
+#if BITS_PER_UNIT == 16
+typedef unsigned gcov_unsigned_t __attribute__ ((mode (HI)));
+typedef unsigned gcov_position_t __attribute__ ((mode (HI)));
+#if LONG_LONG_TYPE_SIZE > 32
+typedef signed gcov_type __attribute__ ((mode (SI)));
+#else
+typedef signed gcov_type __attribute__ ((mode (HI)));
+#endif
+#else
+typedef unsigned gcov_unsigned_t __attribute__ ((mode (QI)));
+typedef unsigned gcov_position_t __attribute__ ((mode (QI)));
+#if LONG_LONG_TYPE_SIZE > 32
+typedef signed gcov_type __attribute__ ((mode (HI)));
+#else
+typedef signed gcov_type __attribute__ ((mode (QI)));
+#endif
+#endif
+#endif
+
 
 #if defined (TARGET_HAS_F_SETLKW)
 #define GCOV_LOCKED 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]