From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4E3A01F45E for ; Tue, 11 Feb 2020 11:18:24 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=EtBT4UgCSaz3pw0nNwNdSl5HXnPg0xcKzg0N/luEDFc 21P6wQoTmJhnftGzvb67+kPed6gtkNyElHMXbZJ/We89dKIupiW2uryDPuhwBfio AJ+TUwPjvxqwXLj7u8QaWSRehJLdyxAbl5yV5cPamOUdz2+n14c09Mc7dQhHlkEc = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type:content-transfer-encoding; s=default; bh=8HVGzaEq6yagqAkvjJewLy6rVlA=; b=Jr+jhCzxiEXr1lmu/ UM3T5N7+A3y3vmCg7kZrjBxgLZLvd9JpctbLbbZ/zGyehQekgWejX4sPmONlgERS MVt/SHbu8TrofXQrpnSGyvgdU+TnPAQUX52inAR/sWG5UjG36RP8C/7iEx40mAu3 lu9xK5xtgtt0kceugdvl9glMhs= Received: (qmail 112399 invoked by alias); 11 Feb 2020 11:18:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 112390 invoked by uid 89); 11 Feb 2020 11:18:21 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581419899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8zviWO3ON8n2LzpHQxEvc09lQ1hO7iQreurIumlL7As=; b=A/pjO7sDCRHKfCSa4FsMR98rx4HhYeJeg1k+43RzFDSfUIWCwdv+9wZpU3jntPBWOoG8Tz CjGWytgAMTXefVA5BodajFPhK5mO+o94oX7g/Kz0m3+ePs+PF0cpWL3aDqKZcZeL7Infha 8/kMANr8VAwqW2lHFGxdkZH+09oGOeA= From: Florian Weimer To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH 02/15] powerpc: Use Linux kABI for syscall return References: <20200210192038.23588-1-adhemerval.zanella@linaro.org> <20200210192038.23588-2-adhemerval.zanella@linaro.org> Date: Tue, 11 Feb 2020 12:18:14 +0100 In-Reply-To: <20200210192038.23588-2-adhemerval.zanella@linaro.org> (Adhemerval Zanella's message of "Mon, 10 Feb 2020 16:20:25 -0300") Message-ID: <874kvxpe2x.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: quoted-printable * Adhemerval Zanella: > diff --git a/sysdeps/unix/sysv/linux/powerpc/sysdep.h b/sysdeps/unix/sysv= /linux/powerpc/sysdep.h > index 01c26be24b..abdcfd4a63 100644 > --- a/sysdeps/unix/sysv/linux/powerpc/sysdep.h > +++ b/sysdeps/unix/sysv/linux/powerpc/sysdep.h > @@ -60,9 +60,8 @@ > : "+r" (r0), "+r" (r3), "+r" (r4), "+r" (r5), "+r" (r6), = \ > "+r" (r7), "+r" (r8)=09=09=09=09=09=09\ > : : "r9", "r10", "r11", "r12", "cr0", "ctr", "lr", "memory");=09\ > - err =3D (long int) r0;=09=09=09=09=09=09\ > __asm__ __volatile__ ("" : "=3Dr" (rval) : "r" (r3));=09=09 \ > - rval;=09=09=09=09=09=09=09=09\ > + (long int) r0 & (1 << 28) ? -rval : rval;=09=09=09=09\ > }) > =20 > #define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...)=09=09\ > @@ -110,21 +109,20 @@ > : ASM_INPUT_##nr=09=09=09=09=09=09=09\ > : "r9", "r10", "r11", "r12",=09=09=09=09=09\ > "cr0", "ctr", "memory");=09=09=09=09=09\ > -=09 err =3D r0; \ > - r3; \ > + r0 & (1 << 28) ? -r3 : r3;=09=09=09=09=09=09\ > }) > #define INTERNAL_SYSCALL(name, err, nr, args...)=09=09=09\ > INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, args) > =20 > #undef INTERNAL_SYSCALL_DECL > -#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused)) > +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) > =20 > #undef INTERNAL_SYSCALL_ERROR_P > #define INTERNAL_SYSCALL_ERROR_P(val, err) \ > - ((void) (val), __builtin_expect ((err) & (1 << 28), 0)) > + ((unsigned long) (val) >=3D (unsigned long) -4095) > =20 > #undef INTERNAL_SYSCALL_ERRNO > -#define INTERNAL_SYSCALL_ERRNO(val, err) (val) > +#define INTERNAL_SYSCALL_ERRNO(val, err) (-(val)) > =20 > #if defined(__PPC64__) || defined(__powerpc64__) > # define SYSCALL_ARG_SIZE 8 What's the baseline for this patch? Thanks, Florian