summaryrefslogtreecommitdiff
path: root/gprof/gmon_io.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-08-20 23:47:26 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-08-20 23:47:26 +0000
commit9c9167e222cbf9efad9aa7a885b813eeb6991135 (patch)
treeefcf13b6bc0199fcde12d05e88ae1728ee02e8d4 /gprof/gmon_io.c
parent2cf495241e53cd5103e9a8ece9ecc2f2aca099cc (diff)
downloadbinutils-redhat-9c9167e222cbf9efad9aa7a885b813eeb6991135.tar.gz
* gmon_io.c (gmon_io_read_64, gmon_io_write_64): Define only if
BFD_HOST_U_64_BIT is defined. (gmon_io_read_vma, gmon_io_write_vma): Add ifdefs.
Diffstat (limited to 'gprof/gmon_io.c')
-rw-r--r--gprof/gmon_io.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gprof/gmon_io.c b/gprof/gmon_io.c
index 46c6f9b5b7..58bd3edfce 100644
--- a/gprof/gmon_io.c
+++ b/gprof/gmon_io.c
@@ -34,8 +34,10 @@
#include "hist.h"
#include "libiberty.h"
+#ifdef BFD_HOST_U_64_BIT
static int gmon_io_read_64 PARAMS ((FILE *, BFD_HOST_U_64_BIT *));
static int gmon_io_write_64 PARAMS ((FILE *, BFD_HOST_U_64_BIT));
+#endif
static int gmon_read_raw_arc
PARAMS ((FILE *, bfd_vma *, bfd_vma *, unsigned long *));
static int gmon_write_raw_arc
@@ -57,6 +59,7 @@ gmon_io_read_32 (ifp, valp)
return 0;
}
+#ifdef BFD_HOST_U_64_BIT
static int
gmon_io_read_64 (ifp, valp)
FILE *ifp;
@@ -69,6 +72,7 @@ gmon_io_read_64 (ifp, valp)
*valp = bfd_get_64 (core_bfd, buf);
return 0;
}
+#endif
int
gmon_io_read_vma (ifp, valp)
@@ -76,7 +80,9 @@ gmon_io_read_vma (ifp, valp)
bfd_vma *valp;
{
unsigned int val32;
+#ifdef BFD_HOST_U_64_BIT
BFD_HOST_U_64_BIT val64;
+#endif
switch (bfd_arch_bits_per_address (core_bfd))
{
@@ -86,11 +92,13 @@ gmon_io_read_vma (ifp, valp)
*valp = val32;
break;
+#ifdef BFD_HOST_U_64_BIT
case 64:
if (gmon_io_read_64 (ifp, &val64))
return 1;
*valp = val64;
break;
+#endif
default:
fprintf (stderr, _("%s: bits per address has unexpected value of %u\n"),
@@ -124,6 +132,7 @@ gmon_io_write_32 (ofp, val)
return 0;
}
+#ifdef BFD_HOST_U_64_BIT
static int
gmon_io_write_64 (ofp, val)
FILE *ofp;
@@ -136,6 +145,7 @@ gmon_io_write_64 (ofp, val)
return 1;
return 0;
}
+#endif
int
gmon_io_write_vma (ofp, val)
@@ -150,10 +160,12 @@ gmon_io_write_vma (ofp, val)
return 1;
break;
+#ifdef BFD_HOST_U_64_BIT
case 64:
if (gmon_io_write_64 (ofp, (BFD_HOST_U_64_BIT) val))
return 1;
break;
+#endif
default:
fprintf (stderr, _("%s: bits per address has unexpected value of %u\n"),
@@ -194,7 +206,9 @@ gmon_read_raw_arc (ifp, fpc, spc, cnt)
bfd_vma *spc;
unsigned long *cnt;
{
+#ifdef BFD_HOST_U_64_BIT
BFD_HOST_U_64_BIT cnt64;
+#endif
unsigned int cnt32;
if (gmon_io_read_vma (ifp, fpc)
@@ -209,11 +223,13 @@ gmon_read_raw_arc (ifp, fpc, spc, cnt)
*cnt = cnt32;
break;
+#ifdef BFD_HOST_U_64_BIT
case 64:
if (gmon_io_read_64 (ifp, &cnt64))
return 1;
*cnt = cnt64;
break;
+#endif
default:
fprintf (stderr, _("%s: bits per address has unexpected value of %u\n"),
@@ -242,10 +258,12 @@ gmon_write_raw_arc (ofp, fpc, spc, cnt)
return 1;
break;
+#ifdef BFD_HOST_U_64_BIT
case 64:
if (gmon_io_write_64 (ofp, (BFD_HOST_U_64_BIT) cnt))
return 1;
break;
+#endif
default:
fprintf (stderr, _("%s: bits per address has unexpected value of %u\n"),