Skip to content

Commit f9897f2

Browse files
authored
Merge pull request #3040 from ggouaillardet/topic/v2.0.x/asm_BUILTIN_GCC
v2.0.x: configury: fix asm atomic detection
2 parents 1475ffc + 1657e90 commit f9897f2

22 files changed

+61
-28
lines changed

config/opal_config_asm.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dnl Copyright (c) 2004-2005 The Regents of the University of California.
1111
dnl All rights reserved.
1212
dnl Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
1313
dnl Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved.
14-
dnl Copyright (c) 2015-2016 Research Organization for Information Science
14+
dnl Copyright (c) 2015-2017 Research Organization for Information Science
1515
dnl and Technology (RIST). All rights reserved.
1616
dnl $COPYRIGHT$
1717
dnl
@@ -912,7 +912,7 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
912912
if test "$ac_cv_sizeof_long" = "4" ; then
913913
opal_cv_asm_arch="IA32"
914914
else
915-
opal_cv_asm_arch="AMD64"
915+
opal_cv_asm_arch="X86_64"
916916
fi
917917
OPAL_ASM_SUPPORT_64BIT=1
918918
OPAL_GCC_INLINE_ASSIGN='"xaddl %1,%0" : "=m"(ret), "+r"(negone) : "m"(ret)'
@@ -1079,7 +1079,7 @@ AC_MSG_ERROR([Can not continue.])
10791079
10801080
# Check for RDTSCP support
10811081
result=0
1082-
AS_IF([test "$opal_cv_asm_arch" = "OPAL_AMD64" || test "$opal_cv_asm_arch" = "OPAL_IA32"],
1082+
AS_IF([test "$opal_cv_asm_arch" = "OPAL_X86_64" || test "$opal_cv_asm_arch" = "OPAL_IA32"],
10831083
[AC_MSG_CHECKING([for RDTSCP assembly support])
10841084
AC_LANG_PUSH([C])
10851085
AC_TRY_RUN([[
@@ -1125,7 +1125,7 @@ AC_DEFUN([OPAL_ASM_FIND_FILE], [
11251125
AC_REQUIRE([AC_PROG_GREP])
11261126
AC_REQUIRE([AC_PROG_FGREP])
11271127
1128-
if test "$opal_cv_asm_arch" != "WINDOWS" && test "$opal_cv_asm_builtin" != "BUILTIN_SYNC" && test "$opal_cv_asm_builtin" != "BUILTIN_OSX" ; then
1128+
if test "$opal_cv_asm_arch" != "WINDOWS" && test "$opal_cv_asm_builtin" != "BUILTIN_SYNC" && test "$opal_cv_asm_builtin" != "BUILTIN_GCC" && test "$opal_cv_asm_builtin" != "BUILTIN_OSX" ; then
11291129
# see if we have a pre-built one already
11301130
AC_MSG_CHECKING([for pre-built assembly file])
11311131
opal_cv_asm_file=""

ompi/mca/osc/portals4/osc_portals4_component.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2011-2013 Sandia National Laboratories. All rights reserved.
44
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
55
* reserved.
6-
* Copyright (c) 2015 Research Organization for Information Science
6+
* Copyright (c) 2015-2017 Research Organization for Information Science
77
* and Technology (RIST). All rights reserved.
88
* $COPYRIGHT$
99
*
@@ -585,7 +585,7 @@ component_select(struct ompi_win_t *win, void **base, size_t size, int disp_unit
585585

586586
module->passive_target_access_epoch = false;
587587

588-
#if OPAL_ASSEMBLY_ARCH == OPAL_AMD64 || OPAL_ASSEMBLY_ARCH == OPAL_IA32
588+
#if OPAL_ASSEMBLY_ARCH == OPAL_X86_64 || OPAL_ASSEMBLY_ARCH == OPAL_IA32
589589
*model = MPI_WIN_UNIFIED;
590590
#else
591591
*model = MPI_WIN_SEPARATE;

opal/asm/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
# Copyright (c) 2004-2005 The Regents of the University of California.
1111
# All rights reserved.
1212
# Copyright (c) 2011-2014 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2017 Research Organization for Information Science
14+
# and Technology (RIST). All rights reserved.
1315
# $COPYRIGHT$
1416
#
1517
# Additional copyrights may follow
@@ -63,7 +65,7 @@ EXTRA_DIST = \
6365
generate-all-asm.pl \
6466
base/aix.conf \
6567
base/default.conf \
66-
base/AMD64.asm \
68+
base/X86_64.asm \
6769
base/ARM.asm \
6870
base/IA32.asm \
6971
base/IA64.asm \

opal/asm/asm-data.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
# Copyright (c) 2004-2005 The Regents of the University of California.
1111
# All rights reserved.
1212
# Copyright (c) 2014 Intel, Inc. All rights reserved.
13+
# Copyright (c) 2017 Research Organization for Information Science
14+
# and Technology (RIST). All rights reserved.
1315
# $COPYRIGHT$
1416
#
1517
# Additional copyrights may follow
@@ -34,8 +36,8 @@
3436
#
3537
######################################################################
3638

37-
AMD64 default-.text-.globl-:--.L-@-1-0-1-1-1 amd64-linux
38-
AMD64 default-.text-.globl-:--.L-@-1-0-1-1-0 amd64-linux-nongas
39+
X86_64 default-.text-.globl-:--.L-@-1-0-1-1-1 x86_64-linux
40+
X86_64 default-.text-.globl-:--.L-@-1-0-1-1-0 x86_64-linux-nongas
3941

4042

4143
######################################################################
File renamed without changes.

opal/include/opal/sys/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# All rights reserved.
1212
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
1313
# Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
14+
# Copyright (c) 2017 Research Organization for Information Science
15+
# and Technology (RIST). All rights reserved.
1416
# $COPYRIGHT$
1517
#
1618
# Additional copyrights may follow
@@ -27,7 +29,7 @@ headers += \
2729
opal/sys/timer.h \
2830
opal/sys/cma.h
2931

30-
include opal/sys/amd64/Makefile.am
32+
include opal/sys/x86_64/Makefile.am
3133
include opal/sys/arm/Makefile.am
3234
include opal/sys/ia32/Makefile.am
3335
include opal/sys/ia64/Makefile.am

opal/include/opal/sys/architecture.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* All rights reserved.
1212
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
1313
* Copyright (c) 2014 Intel, Inc. All rights reserved
14+
* Copyright (c) 2017 Research Organization for Information Science
15+
* and Technology (RIST). All rights reserved.
1416
* $COPYRIGHT$
1517
*
1618
* Additional copyrights may follow
@@ -29,7 +31,7 @@
2931
#define OPAL_UNSUPPORTED 0000
3032
#define OPAL_IA32 0010
3133
#define OPAL_IA64 0020
32-
#define OPAL_AMD64 0030
34+
#define OPAL_X86_64 0030
3335
#define OPAL_POWERPC32 0050
3436
#define OPAL_POWERPC64 0051
3537
#define OPAL_SPARC 0060

opal/include/opal/sys/atomic.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* Copyright (c) 2011 Sandia National Laboratories. All rights reserved.
1515
* Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
1616
* reserved.
17+
* Copyright (c) 2017 Research Organization for Information Science
18+
* and Technology (RIST). All rights reserved.
1719
* $COPYRIGHT$
1820
*
1921
* Additional copyrights may follow
@@ -143,8 +145,8 @@ typedef struct opal_atomic_lock_t opal_atomic_lock_t;
143145
#include "opal/sys/sync_builtin/atomic.h"
144146
#elif OPAL_ASSEMBLY_BUILTIN == OPAL_BUILTIN_OSX
145147
#include "opal/sys/osx/atomic.h"
146-
#elif OPAL_ASSEMBLY_ARCH == OPAL_AMD64
147-
#include "opal/sys/amd64/atomic.h"
148+
#elif OPAL_ASSEMBLY_ARCH == OPAL_X86_64
149+
#include "opal/sys/x86_64/atomic.h"
148150
#elif OPAL_ASSEMBLY_ARCH == OPAL_ARM
149151
#include "opal/sys/arm/atomic.h"
150152
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA32

opal/include/opal/sys/cma.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/*
22
* Copyright (c) 2011-2012 IBM Corporation. All rights reserved.
33
*
4+
* Copyright (c) 2017 Research Organization for Information Science
5+
* and Technology (RIST). All rights reserved.
6+
* $COPYRIGHT$
47
*/
58

69
/** @file
@@ -30,7 +33,7 @@
3033

3134
/* Cross Memory Attach is so far only supported under linux */
3235

33-
#if OPAL_ASSEMBLY_ARCH == OPAL_AMD64
36+
#if OPAL_ASSEMBLY_ARCH == OPAL_X86_64
3437
#define __NR_process_vm_readv 310
3538
#define __NR_process_vm_writev 311
3639
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA32

opal/include/opal/sys/timer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ BEGIN_C_DECLS
8383

8484
#if defined(DOXYGEN)
8585
/* don't include system-level gorp when generating doxygen files */
86-
#elif OPAL_ASSEMBLY_ARCH == OPAL_AMD64
87-
#include "opal/sys/amd64/timer.h"
86+
#elif OPAL_ASSEMBLY_ARCH == OPAL_X86_64
87+
#include "opal/sys/x86_64/timer.h"
8888
#elif OPAL_ASSEMBLY_ARCH == OPAL_ARM
8989
#include "opal/sys/arm/timer.h"
9090
#elif OPAL_ASSEMBLY_ARCH == OPAL_IA32

0 commit comments

Comments
 (0)