Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] [hwloc-svn] svn:hwloc r4224
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2012-02-01 08:02:29


Any idea why this broke FreeBSD?
http://hydra.bordeaux.inria.fr/build/22112 (same problem for tunk and v1.4)
Brice

Le 31/01/2012 17:36, sthibaul_at_[hidden] a écrit :
> Author: sthibaul
> Date: 2012-01-31 11:36:23 EST (Tue, 31 Jan 2012)
> New Revision: 4224
> URL: https://svn.open-mpi.org/trac/hwloc/changeset/4224
>
> Log:
> Fix build on x86_64 with -mcmodel=medium, which needs rbx like x86_32 needs ebx for -fPIC
> Text files modified:
> trunk/include/private/cpuid.h | 17 ++++++++---------
> 1 files changed, 8 insertions(+), 9 deletions(-)
>
> Modified: trunk/include/private/cpuid.h
> ==============================================================================
> --- trunk/include/private/cpuid.h (original)
> +++ trunk/include/private/cpuid.h 2012-01-31 11:36:23 EST (Tue, 31 Jan 2012)
> @@ -1,5 +1,5 @@
> /*
> - * Copyright © 2010-2011 Université Bordeaux 1
> + * Copyright © 2010-2012 Université Bordeaux 1
> * Copyright © 2010 Cisco Systems, Inc. All rights reserved.
> *
> * See COPYING in top-level directory.
> @@ -52,21 +52,20 @@
> static __hwloc_inline void hwloc_cpuid(unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned *edx)
> {
> asm(
> -#ifdef HWLOC_X86_32_ARCH
> +#ifdef HWLOC_X86_32_ARCH
> "push %%ebx\n\t"
> +#else
> + "push %%rbx\n\t"
> #endif
> "cpuid\n\t"
> -#ifdef HWLOC_X86_32_ARCH
> +#ifdef HWLOC_X86_32_ARCH
> "mov %%ebx,%1\n\t"
> "pop %%ebx\n\t"
> -#endif
> - : "+a" (*eax),
> -#ifdef HWLOC_X86_32_ARCH
> - "=r" (*ebx),
> #else
> - "=b" (*ebx),
> + "mov %%ebx,%1\n\t"
> + "pop %%rbx\n\t"
> #endif
> - "+c" (*ecx), "=d" (*edx));
> + : "+a" (*eax), "=r" (*ebx), "+c" (*ecx), "=d" (*edx));
> }
>
> #endif /* HWLOC_PRIVATE_CPUID_H */
> _______________________________________________
> hwloc-svn mailing list
> hwloc-svn_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-svn