]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix building DFLTCC with clang
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 13 Aug 2020 09:56:41 +0000 (11:56 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 21 Aug 2020 19:54:12 +0000 (21:54 +0200)
arch/s390/dfltcc_common.c

index bae40a2b59ce1f31a751a822170aa834530875ce..b8ccfd82531cbb5bcfccf1eae6b148895d8e8f3d 100644 (file)
@@ -22,10 +22,15 @@ static inline int is_dfltcc_enabled(void) {
      * compiling with -m31, gcc defaults to ESA mode, however, since the kernel
      * is 64-bit, it's always z/Architecture mode at runtime.
      */
-    __asm__ volatile(".machinemode push\n"
+    __asm__ volatile(
+#ifndef __clang__
+                     ".machinemode push\n"
                      ".machinemode zarch\n"
+#endif
                      "stfle %[facilities]\n"
+#ifndef __clang__
                      ".machinemode pop\n"
+#endif
                      : [facilities] "=Q" (facilities), [r0] "+r" (r0) :: "cc");
     return is_bit_set((const char *)facilities, DFLTCC_FACILITY);
 }