aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFanbo Meng <fanbo.meng@ibm.com>2024-04-03 05:26:33 -0400
committerGitHub <noreply@github.com>2024-04-03 10:26:33 +0100
commit70916cbf71f50b9e1e6f13559e10d6dbb92beb32 (patch)
treed0185c8fde5a0ad1b7ff84be2c0c6844426415b3 /src
parentf3ec7b8820ca8136c4e1dad4552608b51b47831a (diff)
downloadgoogle-benchmark-70916cbf71f50b9e1e6f13559e10d6dbb92beb32.tar.gz
google-benchmark-70916cbf71f50b9e1e6f13559e10d6dbb92beb32.zip
Remove COMPILER_IBMXL macro for z/OS (#1777)
COMPILER_IBMXL identifies the Clang based IBM XL compiler (xlclang) on z/OS. This compiler is obsolete and replaced by the Open XL compiler, so the macro is no longer needed and the existing code would lead to incorrect asm syntax for Open XL.
Diffstat (limited to 'src')
-rw-r--r--src/cycleclock.h5
-rw-r--r--src/internal_macros.h6
2 files changed, 4 insertions, 7 deletions
diff --git a/src/cycleclock.h b/src/cycleclock.h
index 91abcf9..a258437 100644
--- a/src/cycleclock.h
+++ b/src/cycleclock.h
@@ -181,10 +181,11 @@ inline BENCHMARK_ALWAYS_INLINE int64_t Now() {
#elif defined(__s390__) // Covers both s390 and s390x.
// Return the CPU clock.
uint64_t tsc;
-#if defined(BENCHMARK_OS_ZOS) && defined(COMPILER_IBMXL)
- // z/OS XL compiler HLASM syntax.
+#if defined(BENCHMARK_OS_ZOS)
+ // z/OS HLASM syntax.
asm(" stck %0" : "=m"(tsc) : : "cc");
#else
+ // Linux on Z syntax.
asm("stck %0" : "=Q"(tsc) : : "cc");
#endif
return tsc;
diff --git a/src/internal_macros.h b/src/internal_macros.h
index 8dd7d0c..f4894ba 100644
--- a/src/internal_macros.h
+++ b/src/internal_macros.h
@@ -11,11 +11,7 @@
#endif
#if defined(__clang__)
- #if defined(__ibmxl__)
- #if !defined(COMPILER_IBMXL)
- #define COMPILER_IBMXL
- #endif
- #elif !defined(COMPILER_CLANG)
+ #if !defined(COMPILER_CLANG)
#define COMPILER_CLANG
#endif
#elif defined(_MSC_VER)