From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21431 invoked by alias); 5 May 2006 16:51:59 -0000 Received: (qmail 21413 invoked by uid 22791); 5 May 2006 16:51:59 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate3.de.ibm.com (HELO mtagate3.de.ibm.com) (195.212.29.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 05 May 2006 16:51:56 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.6/8.13.6) with ESMTP id k45Gprkg155436 for ; Fri, 5 May 2006 16:51:53 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k45Gr7Sh153660 for ; Fri, 5 May 2006 18:53:07 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11/8.13.3) with ESMTP id k45Gprk7000360 for ; Fri, 5 May 2006 18:51:53 +0200 Received: from localhost (dyn-9-152-216-91.boeblingen.de.ibm.com [9.152.216.91]) by d12av02.megacenter.de.ibm.com (8.12.11/8.12.11) with ESMTP id k45Gpr7K000357 for ; Fri, 5 May 2006 18:51:53 +0200 Date: Fri, 05 May 2006 16:51:00 -0000 From: Martin Schwidefsky To: libc-hacker@sources.redhat.com Subject: [patch] s390: allow 6 system call parameters with syscall(). Message-ID: <20060505165204.GB5543@skybase> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11+cvs20060403 Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00005.txt.bz2 Hi, the syscall() function currently can not deal with 6 parameters. To make futex and pselect6 available with syscall() a small patch is needed. blue skies, Martin. 2006-05-05 Martin Schwidefsky * sysdeps/unix/sysv/linux/s390/s390-32/syscall.S: Add support for six system call parameters. * sysdeps/unix/sysv/linux/s390/s390-64/syscall.S: Likewise. diff -urpN libc/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S --- libc/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S 2003-12-06 01:18:52.000000000 +0100 +++ libc-s390/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S 2006-05-05 16:22:45.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -48,13 +48,14 @@ ENTRY (syscall) lr %r4,%r5 /* third parameter */ lr %r5,%r6 /* fourth parameter */ l %r6,192(%r15) /* fifth parameter */ + l %r7,196(%r15) /* sixth parameter */ - basr %r7,0 -0: cl %r1,4f-0b(%r7) /* svc number < 256? */ + basr %r8,0 +0: cl %r1,4f-0b(%r8) /* svc number < 256? */ jl 2f 1: svc 0 j 3f -2: ex %r1,1b-0b(%r7) /* lsb of R1 is subsituted as SVC number */ +2: ex %r1,1b-0b(%r8) /* lsb of R1 is subsituted as SVC number */ 3: l %r15,0(%r15) /* load back chain */ cfi_adjust_cfa_offset (-96) lm %r6,15,24(%r15) /* load registers */ diff -urpN libc/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S libc-s390/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S --- libc/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S 2003-12-06 01:18:52.000000000 +0100 +++ libc-s390/sysdeps/unix/sysv/linux/s390/s390-64/syscall.S 2006-05-05 16:22:45.000000000 +0200 @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. @@ -48,13 +48,14 @@ ENTRY (syscall) lgr %r4,%r5 /* Third parameter. */ lgr %r5,%r6 /* Fourth parameter. */ lg %r6,320(%r15) /* Fifth parameter. */ + lg %r7,328(%r15) /* Sixth parameter. */ - basr %r7,0 -0: clg %r1,4f-0b(%r7) /* svc number < 256? */ + basr %r8,0 +0: clg %r1,4f-0b(%r8) /* svc number < 256? */ jl 2f 1: svc 0 j 3f -2: ex %r1,1b-0b(%r7) /* lsb of R1 is subsituted as SVC number */ +2: ex %r1,1b-0b(%r8) /* lsb of R1 is subsituted as SVC number */ 3: lg %r15,0(%r15) /* load back chain */ cfi_adjust_cfa_offset (-160) lmg %r6,15,48(%r15) /* Load registers. */