From patchwork Tue Nov 19 14:56:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dragan Mladjenovic X-Patchwork-Id: 1197499 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107186-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=wavecomp.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="Q9rt/HDB"; dkim=pass (1024-bit key; unprotected) header.d=wavecomp.com header.i=@wavecomp.com header.b="TCrjpnPa"; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 47HTS73sR8z9sPn for ; Wed, 20 Nov 2019 01:56:55 +1100 (AEDT) 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:date:message-id :content-type:content-id:content-transfer-encoding:mime-version; q=dns; s=default; b=RhQSLCDg2OKkBobPENa1WDOqmOpoeBcBFUpmZCwdszC 7gVwJs/5KbqCVEx6FHskjnXSo3cNDAS14FfYICZXM11FnZigi8Be9V+uqafDh8Cy TzH8+230Qav+PkrfIA8qn4NEUUyJLBYj7SZ/e8RIp6ucaU/mO01a0ecKfT3qN5RM = 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:date:message-id :content-type:content-id:content-transfer-encoding:mime-version; s=default; bh=Uef6QPs7OyoE+m97GzQqNucsz34=; b=Q9rt/HDBapSDtW5MK TS5/EF2kJ6s/jUlPiRqEY0SSFP4u6YogGvC/Q/2XKl1xYzpL9oG8VxlESIguGPCj ZGtf2uwduO7//bBGwk14q+9OvkEsP7FelAkoWo1BdqWNBO30uXP4B97ncHC8R7UU 6OOVZq493F+S006UGfsBnwDZlQ= Received: (qmail 43302 invoked by alias); 19 Nov 2019 14:56:49 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 43291 invoked by uid 89); 19 Nov 2019 14:56:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_WEB, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: NAM02-CY1-obe.outbound.protection.outlook.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XG/XRi0j8jxjXTCofrRkpQGrbvUwJMCAXKcFaUUAKqTHB0PTrcsU2yZe7LGjgXqL2lqLJnPVul9AeyT6IKoipowSn3fCv1UH1qHqmiw1tUWS3CpzURAdDYKO6wleHw1ZN+Ttb4KbBUzUezFcp+fAFoMiIO3oqa8UWbU+34semJJv38sb4Jo1j5tZ9dGBOYHh0rSddqx/xhfBXtVGAzu6WQttrjaG3F7NXqvqSNN3PPRavnqccnMnLjLHIc01xHfTwsM/ExQGqyMmgJyBXLSm/0Qfqj78Z3/wy2B8Zdd3EcxErvqzEc3dRslvAgjuMZuE2uhQmmybPidjNk4a9bbbUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jmL4JBVONHwTjWmwdHcZMFlEbRK0z0cQAJRc0yAIHSI=; b=XfkJU7u2sno+25pBEJ9ae0QncCgZR6uHWspluMbM3RAFPcWxDoBq8KKkvOmtNKd/uG966Ff9cgEMIFT/SFrFq70KtgnrpeBQEyx/tPxD09Id8yUF2a9pfvXECCZo2cmDDKLDPTimvM8WgAK3/pYWk/JRljse8DX75JCuZCOHi0xTF8VoCs3dr1kdjjze7D6SfHzmWiQcQB7pp77PA1IRXW0JXhNzHYn4IfJfhWYTmWuoLW+J9WnrYxUheI1+g5/4M7W9PnJP+Vx+/Ub3JaO7pCOC435Mr+rVNLq4bE0kRwzup91J5Vns5KeRcEypmLqU8JH8y1rLs9kfGPpIQ8kNog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wavecomp.com; dmarc=pass action=none header.from=wavecomp.com; dkim=pass header.d=wavecomp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wavecomp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jmL4JBVONHwTjWmwdHcZMFlEbRK0z0cQAJRc0yAIHSI=; b=TCrjpnPa7lq8bg1/NCBNr4bYS5Hb4d676lqzo/b1oFY/URTmPvjILWDJDYP7qS9KpLhBstLEExGvjqtXTpU18l4Rnq747Ft6sOnPN8I6big638j5jclHl6rcCj+RYc/oRnXdOJyq3SRtt9mK/5ma3nquWiva37g4/8Ofm575Zi4= From: Dragan Mladjenovic To: "libc-alpha@sourceware.org" CC: Dragan Mladjenovic , Joseph Myers Subject: [PATCH] mips: Do not include hi and lo in __SYSCALL_CLOBBERS for R6 Date: Tue, 19 Nov 2019 14:56:43 +0000 Message-ID: <1574175364-5601-1-git-send-email-dmladjenovic@wavecomp.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmladjenovic@wavecomp.com; x-ms-exchange-transport-forked: True x-ms-oob-tlc-oobclassifiers: OLM:8273; received-spf: None (protection.outlook.com: wavecomp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 Content-ID: <721003CE7453D04D96A6151088D33790@namprd22.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: t22+mRoK3TRT82R9oaZjU03pA8tWEpPZS5lQO8gqb3hD7fpp38gugT85vCbgvysj+ns4JGJupEdO+APN8ebnyWMjo1mxA9h2cApXr3iw+xk= From: "Dragan Mladjenovic" GCC 10 (PR 91233) won't silently allow registers that are not architecturally available to be present in the clobber list anymore, resulting in build failure for mips*r6 targets in form of: ... .../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target 146 | __asm__ volatile ( \ | ^~~~~~~ This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension. This patch provides the alternative definitions of __SYSCALL_CLOBBERS for r6 targets that won't include those registers. * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (__SYSCALL_CLOBBERS): Exclude hi and lo from the clobber list for __mips_isa_rev >= 6. * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (__SYSCALL_CLOBBERS): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (__SYSCALL_CLOBBERS): Likewise. --- sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 9 +++++++-- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 9 +++++++-- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 86347fe..cbc2a4b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -346,8 +346,13 @@ libc_hidden_proto (__mips_syscall7, nomips16) _sc_ret.reg.v0; \ }) -#define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#if __mips_isa_rev >= 6 +# define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" +#else +# define __SYSCALL_CLOBBERS "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#endif #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index ca7a60e..fd16508 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -294,8 +294,13 @@ _sys_result; \ }) -#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#if __mips_isa_rev >= 6 +# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" +#else +# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#endif #endif /* __ASSEMBLER__ */ diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index 821dec9..8df4d9b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -290,8 +290,13 @@ _sys_result; \ }) -#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ - "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#if __mips_isa_rev >= 6 +# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "memory" +#else +# define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", \ + "$14", "$15", "$24", "$25", "hi", "lo", "memory" +#endif #endif /* __ASSEMBLER__ */