klibc-bot for Ben Hutchings
2021-Dec-27 21:33 UTC
[klibc] [klibc:master] s390: mmap: Change inline assembly to work with Clang
Commit-ID: df622860136f95868a36eae578482dc7b9687f50 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=df622860136f95868a36eae578482dc7b9687f50 Author: Ben Hutchings <ben at decadent.org.uk> AuthorDate: Mon, 27 Dec 2021 19:48:29 +0100 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Mon, 27 Dec 2021 19:48:29 +0100 [klibc] s390: mmap: Change inline assembly to work with Clang Clang rejects the operand "%b1" to svc: usr/klibc/arch/s390/mmap.c:61:3: error: invalid operand in inline asm: ' svc ${1:b}' Since svc always takes an immediate operand, the "b" modifier is not needed. After deleting it, both Clang and gcc generate the correct instruction "svc 90". Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/klibc/arch/s390/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/klibc/arch/s390/mmap.c b/usr/klibc/arch/s390/mmap.c index 33312397..dfc5a845 100644 --- a/usr/klibc/arch/s390/mmap.c +++ b/usr/klibc/arch/s390/mmap.c @@ -58,7 +58,7 @@ void *mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) unsigned long __res; __asm__ __volatile__ ( - " svc %b1\n" + " svc %1\n" : "=d" (__svcres) : "i" (__NR_mmap), "0" (__arg1)