Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XLC 16.1 for AIX xlclang/xlclang++ does not support __sync_val_compare_and_swap #3775

Open
vsebe opened this issue Apr 24, 2019 · 8 comments

Comments

@vsebe
Copy link
Contributor

vsebe commented Apr 24, 2019

/opt/IBM/xlC/16.1.0/bin/xlclang++  -I. -I../../base -I../../structs -I../../stats -I../../include -I../../verbose -I../../../../gc_glue_java -I../../../../ot
i -I../../../../include -I../../../../gc_base -I../../../../gc_include -I../../../../gc_stats -I../../../../gc_structs -I../../../../gc_base -I../../../../in
clude -I../../../../oti -I../../../../nls -I../../../../gc_include -I../../../../gc_structs -I../../../../gc_stats -I../../../../gc_modron_standard -I../../.
./../gc_realtime -I../../../../gc_trace -I../../../../gc_vlhgc  -I../../../../include -I../../../include_core -I../../../nls -DPPC64 -D_XOPEN_SOURCE_EXTENDED
=1 -D_ALL_SOURCE -DRS6000 -DAIXPPC -D_LARGE_FILES -c  -s -q64 -qlanglvl=extended0x -qarch=ppc -qalias=noansi -qxflag=LTOL:LTOL0 -qsuppress=1506-1108 -O3 -qha
lt=w -g   -o VerboseHandlerOutputStandard.o VerboseHandlerOutputStandard.cpp
...
In file included from VerboseHandlerOutputStandard.cpp:28:
In file included from ../../stats/ConcurrentGCStats.hpp:31:
In file included from ../../base/AtomicOperations.hpp:31:
../../../include_core/AtomicSupport.hpp:458:10: error: 1540-2993 The builtin "__sync_val_compare_and_swap_8" is not supported.
                return __sync_val_compare_and_swap(address, oldValue, newValue);
                       ^
1 error generated.
Error while processing VerboseHandlerOutputStandard.cpp.

where:

  • toolchain: xlc 16.1.1
  • CC: xlclang
  • CXX: xlclang++
@vsebe
Copy link
Contributor Author

vsebe commented Apr 24, 2019

@charliegracie fyi

@DanHeidinga
Copy link
Contributor

@vsebe Is there a machine with xlc 16.1 that can be used for testing?

I think moving the XLC-specific code before the GCC-specific code may fix this issue.

xlc specific code:
https://github.com/eclipse/omr/blob/f96391d391659aec08ea33a623a7e3e3baf79235/include_core/AtomicSupport.hpp#L473-L475

gcc specific code:
https://github.com/eclipse/omr/blob/f96391d391659aec08ea33a623a7e3e3baf79235/include_core/AtomicSupport.hpp#L456-L458

@vsebe
Copy link
Contributor Author

vsebe commented May 22, 2019

@DanHeidinga - XL/C 16 is installed on internal Jenkins machines (for now).

DanHeidinga added a commit to DanHeidinga/omr that referenced this issue May 23, 2019
xlC16 appears to be based on clang and now recognizes the
__GNUC__ defines.  Reorder this code so that the compiler
sees the __xlC__-specific case first.

issue: eclipse-omr#3775

Signed-off-by: Dan Heidinga <daniel_heidinga@ca.ibm.com>
@DanHeidinga
Copy link
Contributor

@vsebe I've opened #3887 to test the proposed change. Can you validate this on internal machines?

vsebe pushed a commit to vsebe/omr that referenced this issue May 23, 2019
xlC16 appears to be based on clang and now recognizes the
__GNUC__ defines.  Reorder this code so that the compiler
sees the __xlC__-specific case first.

issue: eclipse-omr#3775

Signed-off-by: Dan Heidinga <daniel_heidinga@ca.ibm.com>
@vsebe
Copy link
Contributor Author

vsebe commented May 23, 2019

@DanHeidinga - #3887 does not fix the issue

10:49:32  In file included from CompactScheme.cpp:27:
10:49:32  In file included from ./CompactScheme.hpp:33:
10:49:32  In file included from ./EnvironmentStandard.hpp:36:
10:49:32  In file included from ../../base/EnvironmentBase.hpp:35:
10:49:32  In file included from ../../../../gc_glue_java/EnvironmentDelegate.hpp:29:
10:49:32  In file included from ../../../../gc_stats/MarkJavaStats.hpp:31:
10:49:32  In file included from ../../base/AtomicOperations.hpp:31:
10:49:32  ../../../include_core/AtomicSupport.hpp:464:10: error: 1540-2993 The builtin "__sync_val_compare_and_swap_8" is not supported.
10:49:32                  return __sync_val_compare_and_swap(address, oldValue, newValue);

@DanHeidinga
Copy link
Contributor

There's an xlc option required as well - I thought I pasted it here but the comment seems to have been lost. Looking...

@DanHeidinga
Copy link
Contributor

@vsebe
Copy link
Contributor Author

vsebe commented May 23, 2019

I added -qxlcompatmacros, rebuilt. New error:

12:45:33  In file included from ./AtomicOperations.hpp:31:
12:45:33  ../../include_core/AtomicSupport.hpp:112:29: error: use of undeclared identifier '__ppc_dropSMT'; did you mean '__dropSMT'?
12:45:33                  inline void __dropSMT() { __ppc_dropSMT(); }
12:45:33                                            ^~~~~~~~~~~~~
12:45:33                                            __dropSMT

xlclang/xlclang++ does not support legacy XL pragmas

vsebe pushed a commit to vsebe/omr that referenced this issue May 24, 2019
xlC16 appears to be based on clang and now recognizes the
__GNUC__ defines.  Reorder this code so that the compiler
sees the __xlC__-specific case first.

issue: eclipse-omr#3775

Signed-off-by: Dan Heidinga <daniel_heidinga@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants