clang does not support .machinemode, so put it under an #ifdef.
---
 dfltcc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dfltcc.c b/dfltcc.c
index 432c68c..86aa56e 100644
--- a/dfltcc.c
+++ b/dfltcc.c
@@ -160,10 +160,15 @@ is_dfltcc_enabled (void)
   /* STFLE is supported since z9-109 and only in z/Architecture mode.  When
    * compiling with -m31, gcc defaults to ESA mode, however, since the kernel
    * is 64-bit, it's always z/Architecture mode at runtime.  */
-  __asm__ (".machinemode push\n"
+  __asm__ (
+#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 (facilities, DFLTCC_FACILITY);
 }
-- 
2.25.4




Reply via email to