Skip to content

Commit

Permalink
Add __open_xl__ macros to __IBMC__/__IBMCPP__ conditions
Browse files Browse the repository at this point in the history
Signed-off-by: midronij <[email protected]>
  • Loading branch information
midronij authored and ishitaR88 committed Sep 30, 2024
1 parent b7e188f commit bd7eee1
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion compiler/compile/OSRData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ bool TR_OSRCompilationData::TR_ScratchBufferInfo::operator==(const TR_ScratchBuf

#if (defined(TR_HOST_POWER) && defined(TR_TARGET_POWER) \
|| defined(TR_HOST_S390) && defined(TR_TARGET_S390)) \
&& defined(__IBMCPP__)
&& (defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus))
__attribute__((__noinline__))
//This tiny function when inlined by xlC 12 or later at -O3 breaks java -version
//on Power and causes intermittent crashes on z/OS with xlC 2.1.1
Expand Down
2 changes: 1 addition & 1 deletion compiler/control/OptimizationPlan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace TR { class Recompilation; }
namespace TR { class Monitor; }
struct TR_MethodToBeCompiled;

#if defined(__IBMCPP__)
#if defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus)
// GCC (and other compilers) may assume that operator new cannot return null
// unless a nothrow specification is provided. For other reasons, we build
// Testarossa with -qnoeh / -fnoeh to disable exceptions. This is all fine,
Expand Down
2 changes: 1 addition & 1 deletion compiler/cs2/bitmanip.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#ifndef CSBITMANIP_H
#define CSBITMANIP_H

#if defined(__IBMCPP__) && defined (__PPC__)
#if (defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus)) && defined (__PPC__)
// to __cntlz4 and related routines
# include "builtins.h"
#endif
Expand Down
2 changes: 1 addition & 1 deletion compiler/env/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
/* Compiler macros */
#if defined(__GNUC__)
# define HOST_COMPILER COMPILER_GCC
#elif defined(__IBMC__) || defined(__IBMCPP__)
#elif defined(__IBMC__) || defined(__IBMCPP__) || defined(__open_xl__)
# define HOST_COMPILER COMPILER_XLC
#elif defined(_MSC_VER)
# define HOST_COMPILER COMPILER_MSVC
Expand Down
2 changes: 1 addition & 1 deletion compiler/env/jittypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ typedef struct TR_InlinedCallSite
#define FLUSH_MEMORY(smp)
#endif
#else
#if defined(__IBMC__) || defined(__IBMCPP__)
#if defined(__IBMC__) || defined(__IBMCPP__) || defined(__open_xl__)
#if defined(__cplusplus)
#include <builtins.h>
#endif /* __cplusplus */
Expand Down
2 changes: 1 addition & 1 deletion compiler/infra/Annotations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
#define OMR_NORETURN _declspec(noreturn)
#elif defined(__GNUC__)
#define OMR_NORETURN __attribute__ ((noreturn))
#elif defined(__IBMCPP__)
#elif defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus)
#define OMR_NORETURN __attribute__ ((noreturn))
#else
#warning "Noreturn attribute undefined for this platform."
Expand Down
6 changes: 3 additions & 3 deletions compiler/p/runtime/PPCCodeSync.inc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
extern "C" void *getCodeSync();

#if defined(TR_HOST_POWER)
#if defined(__IBMC__) || defined(__IBMCPP__)
#if defined(__IBMC__) || defined(__IBMCPP__) || defined(__open_xl__)

#if defined(__cplusplus)
#include <builtins.h>
Expand All @@ -35,7 +35,7 @@ extern "C" void *getCodeSync();
#define sync() __sync()
#define isync() __isync()

#else /* defined(__IBMC__) || defined(__IBMCPP__) */
#else /* defined(__IBMC__) || defined(__IBMCPP__) || defined(__open_xl__) */

static inline void dcbf(unsigned char *addr)
{
Expand All @@ -55,7 +55,7 @@ static inline void isync()
__asm__("isync");
}

#endif /* defined(__IBMC__) || defined(__IBMCPP__) */
#endif /* defined(__IBMC__) || defined(__IBMCPP__) || defined(__open_xl__) */

static inline void icbi(unsigned char *addr)
{
Expand Down
2 changes: 1 addition & 1 deletion compiler/runtime/OMRRuntimeAssumptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "runtime/OMRRuntimeAssumptions.hpp"
#include "env/jittypes.h"

#if defined(__IBMCPP__) && !defined(AIXPPC) && !defined(LINUXPPC)
#if (defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus)) && !defined(AIXPPC) && !defined(LINUXPPC)
#define ASM_CALL __cdecl
#else
#define ASM_CALL
Expand Down
2 changes: 1 addition & 1 deletion compiler/runtime/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

TR_RuntimeHelperTable runtimeHelpers;

#if (defined(__IBMCPP__) || defined(__IBMC__) && !defined(MVS)) && !defined(LINUXPPC64)
#if (defined(__IBMCPP__) || defined(__IBMC__) && !defined(MVS)) && !defined(LINUXPPC64) || defined(__open_xl__)
#if defined(AIXPPC)
#define JIT_HELPER(x) extern "C" void *x
#else
Expand Down
2 changes: 1 addition & 1 deletion include_core/omrcomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ typedef struct U_128 {

#if defined(_MSC_VER) && (1900 > _MSC_VER) /* MSVC versions prior to Visual Studio 2015 (14.0) */
#define OMR_ALIGNOF(x) __alignof(x)
#elif defined(__IBMC__) || defined(__IBMCPP__) /* XL C/C++ versions prior to xlclang/xlclang++ */
#elif defined(__IBMC__) || defined(__IBMCPP__) || defined(__open_xl__) /* XL C/C++ versions prior to xlclang/xlclang++ */
#define OMR_ALIGNOF(x) __alignof__(x)
#else /* All other compilers that support C11 and C++11 */
#define OMR_ALIGNOF(x) alignof(x)
Expand Down
10 changes: 5 additions & 5 deletions third_party/gtest-1.8.0/include/gtest/internal/gtest-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ struct _RTL_CRITICAL_SECTION;
// detecting whether they are enabled or not. Therefore, we assume that
// they are enabled unless the user tells us otherwise.
# define GTEST_HAS_EXCEPTIONS 1
# elif defined(__IBMCPP__) && __EXCEPTIONS
# elif (defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus)) && __EXCEPTIONS
// xlC defines __EXCEPTIONS to 1 iff exceptions are enabled.
# define GTEST_HAS_EXCEPTIONS 1
# elif defined(__HP_aCC)
Expand Down Expand Up @@ -570,7 +570,7 @@ struct _RTL_CRITICAL_SECTION;

// Starting with version 9.0 IBM Visual Age defines __RTTI_ALL__ to 1 if
// both the typeid and dynamic_cast features are present.
# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900)
# elif defined(__IBMCPP__) && (__IBMCPP__ >= 900) || defined(__open_xl__) && defined(__cplusplus)

# ifdef __RTTI_ALL__
# define GTEST_HAS_RTTI 1
Expand Down Expand Up @@ -821,7 +821,7 @@ using ::std::tuple_size;
// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
// Sun Pro CC, IBM Visual Age, and HP aCC support.
#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \
defined(__IBMCPP__) || defined(__HP_aCC)
defined(__IBMCPP__) || defined(__HP_aCC) || defined(__open_xl__) && defined(__cplusplus)
# define GTEST_HAS_TYPED_TEST 1
# define GTEST_HAS_TYPED_TEST_P 1
#endif
Expand Down Expand Up @@ -2200,7 +2200,7 @@ GTEST_API_ size_t GetThreadCount();
// for objects passed through ellipsis (...), failing for uncopyable
// objects. We define this to ensure that only POD is passed through
// ellipsis on these systems.
#if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
#if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) || defined(__open_xl__) && defined(__cplusplus)
// We lose support for NULL detection where the compiler doesn't like
// passing non-POD classes through ellipsis (...).
# define GTEST_ELLIPSIS_NEEDS_POD_ 1
Expand All @@ -2212,7 +2212,7 @@ GTEST_API_ size_t GetThreadCount();
// const T& and const T* in a function template. These compilers
// _can_ decide between class template specializations for T and T*,
// so a tr1::type_traits-like is_pointer works.
#if defined(__SYMBIAN32__) || defined(__IBMCPP__)
#if defined(__SYMBIAN32__) || defined(__IBMCPP__) || defined(__open_xl__) && defined(__cplusplus)
# define GTEST_NEEDS_IS_POINTER_ 1
#endif

Expand Down

0 comments on commit bd7eee1

Please sign in to comment.