From 0b70414eea2bcd3549a4f9684c329f317df7b9d7 Mon Sep 17 00:00:00 2001 From: mquinson Date: Wed, 7 Jul 2004 02:29:59 +0000 Subject: [PATCH 1/1] Speedup arch signature detection code; add sparc signature git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@198 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- acmacro/gras_arch.m4 | 15 +++++++++------ src/gras/DataDesc/datadesc_private.h | 2 +- src/gras/DataDesc/ddt_convert.c | 3 ++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/acmacro/gras_arch.m4 b/acmacro/gras_arch.m4 index 146f649230..06fd4ffa25 100644 --- a/acmacro/gras_arch.m4 +++ b/acmacro/gras_arch.m4 @@ -135,12 +135,14 @@ AC_DEFUN([GRAS_ARCH], # Check for the architecture AC_C_BIGENDIAN(endian=1,endian=0,AC_MSG_ERROR([GRAS works only for little or big endian systems (yet)])) AC_DEFINE_UNQUOTED(GRAS_BIGENDIAN,$endian,[define if big endian]) - -GRAS_SIGNED_SIZEOF(char) -GRAS_SIGNED_SIZEOF(short int) -GRAS_SIGNED_SIZEOF(int) -GRAS_SIGNED_SIZEOF(long int) -GRAS_SIGNED_SIZEOF(long long int) + +dnl FIXME: Use SIGNED instead of CHECK to make sure signed and unsigned type +dnl have same size +GRAS_CHECK_SIZEOF(char) +GRAS_CHECK_SIZEOF(short int) +GRAS_CHECK_SIZEOF(int) +GRAS_CHECK_SIZEOF(long int) +GRAS_CHECK_SIZEOF(long long int) GRAS_CHECK_SIZEOF(void *) @@ -164,6 +166,7 @@ trace="${trace}:${ac_cv_sizeof_float}.${ac_cv_sizeof_double}" case $trace in l:1.2.4.4.8:4.4:4.8) gras_arch=0; gras_arch_name=i386;; B:1.2.4.4.8:4.4:4.8) gras_arch=1; gras_arch_name=ppc;; + B:1.2.4.8.8:8.8:4.8) gras_arch=2; gras_arch_name=sparc;; esac if test x$gras_arch = xunknown ; then AC_MSG_RESULT([damnit ($trace)]) diff --git a/src/gras/DataDesc/datadesc_private.h b/src/gras/DataDesc/datadesc_private.h index 26c2983495..2d2bc70c6a 100644 --- a/src/gras/DataDesc/datadesc_private.h +++ b/src/gras/DataDesc/datadesc_private.h @@ -29,7 +29,7 @@ extern gras_set_t *gras_datadesc_set_local; * Descriptions of all known architectures * *******************************************/ -#define gras_arch_count 2 +#define gras_arch_count 3 typedef enum { gras_ddt_scalar_char = 0, gras_ddt_scalar_short = 1, diff --git a/src/gras/DataDesc/ddt_convert.c b/src/gras/DataDesc/ddt_convert.c index fe9938e49d..f456e25216 100644 --- a/src/gras/DataDesc/ddt_convert.c +++ b/src/gras/DataDesc/ddt_convert.c @@ -17,7 +17,8 @@ const gras_arch_desc_t gras_arches[gras_arch_count] = { {"i386", 0, {1,2,4,4,8, 4,4, 4,8}}, - {"ppc", 1, {1,2,4,4,8, 4,4, 4,8}} + {"ppc", 1, {1,2,4,4,8, 4,4, 4,8}}, + {"sparc", 1, {1,2,4,8,8, 8,8, 4,8}} }; const char *gras_datadesc_arch_name(int code) { -- 2.20.1