From: Andreas Arnez Date: Tue, 9 Mar 2021 16:22:47 +0000 (+0100) Subject: Bug 430429 - s390x: Fix clang compile error in valgrind.h X-Git-Tag: VALGRIND_3_17_0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=484b7dd1e862b1624cb8e7aa453df277da4f7a15;p=thirdparty%2Fvalgrind.git Bug 430429 - s390x: Fix clang compile error in valgrind.h It has been observed that clang emits an error in valgrind.h for the macro VALGRIND_DO_CLIENT_REQUEST_EXPR: "[...] unsupported inline asm: input with type 'int' matching output with type 'volatile unsigned long'" Fix this with an explicit cast of the input to 'unsigned long int.' The patch has been suggested by Jonathan Albrecht. --- diff --git a/NEWS b/NEWS index 93fad51810..d1bf7b09f2 100644 --- a/NEWS +++ b/NEWS @@ -153,6 +153,7 @@ where XXXXXX is the bug number as listed below. diagnostics 429952 Errors when building regtest with clang 430354 ppc stxsibx and stxsihx instructions write too much data +430429 valgrind.h doesn't compile on s390x with clang 430485 expr_is_guardable doesn't handle Iex_Qop 431556 Complete arm64 FADDP v8.2 instruction support 432102 Add support for DWARF5 as produced by GCC11 diff --git a/include/valgrind.h b/include/valgrind.h index d33dd30932..04a747c7a8 100644 --- a/include/valgrind.h +++ b/include/valgrind.h @@ -876,7 +876,8 @@ typedef /* results = r3 */ \ "lgr %0, 3\n\t" \ : "=d" (_zzq_result) \ - : "a" (&_zzq_args[0]), "0" (_zzq_default) \ + : "a" (&_zzq_args[0]), \ + "0" ((unsigned long int)_zzq_default) \ : "cc", "2", "3", "memory" \ ); \ _zzq_result; \