aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcov-io.h
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-10 17:04:46 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-10 17:04:46 +0000
commitdbc978761da4235401f08a9f9f1c22531a94c914 (patch)
treecc0e1c2c691da83380421c0352ba0b2194770bc4 /gcc/gcov-io.h
parentae852eeab8aa95f6365469f524c8ae65052b426f (diff)
Fri Oct 10 18:54:39 CEST 2003 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72301 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov-io.h')
-rw-r--r--gcc/gcov-io.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h
index e1506baca07..0254632eb8a 100644
--- a/gcc/gcov-io.h
+++ b/gcc/gcov-io.h
@@ -167,6 +167,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#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
@@ -174,6 +175,26 @@ typedef signed gcov_type __attribute__ ((mode (DI)));
#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