From patchwork Tue Mar 19 21:42:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 87385 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 44A5B385828B for ; Tue, 19 Mar 2024 21:43:24 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 4DAFE3858D37 for ; Tue, 19 Mar 2024 21:42:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4DAFE3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4DAFE3858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710884574; cv=none; b=JX0/SqK3VV+YZ2D1BBJVkbonqike5YruR1uI+hU89j0G3rkGZAXHLoY5cQQfr9U/KAsheMOUspsyesTTl7awBMGmlUinJByqp4Fgz7bxXuZ8TmE//kJnX1GppNcYEbiJyA/HbvrgtbVyG+EvnAYKoz5B9weMzje9JwpIkzeeyXk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710884574; c=relaxed/simple; bh=/7bRT4p9VWRJEKD88y2Oxd8JLzdyBGn07wYEeE9lQKo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=orcAsUVnG5++zclHz36G0QewEhjIv8WU2ZBbslkOC/yvPUA0SUbkRnU73fCcIlGSpLluIA/ALD1i5nYHIVjAnJRavqduzhT0oRYh81WeQfqxnWD0X5g39J9GyROrvJgKZMj2QllOHgEYAOiAQXhZhrVBh01uxgWCgw4MWx9EthY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4140efa16caso21158065e9.0 for ; Tue, 19 Mar 2024 14:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710884571; x=1711489371; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GqWDFOie7mX3TwU3LgIVX+4d9y6x5nENIVyjPNwgDWE=; b=LTRI8mwSgGIuXfQdkojCE8Nr8il4VweepW6p3WFjf+io80vZSKrNLDIjOOmZeitQ3d CsqKCfzGvfaPvKv5g3jLB6g8hTidAJjW9tDaTzpadxbgZFXn1l4huzsIrC6ok0ZbGVYv P+76eukxcO2iIyw9f5lVqA6uOq0565sYP7I1UQnnfCt9TkCcax86vB54b9DakEB7yWub mkFFLAYpOhUBF3vJPKq0IAEOP56DartR1I8xtCpCtFSWrhVxk+ZY8zM9qA2D+30TVuXy TKvjdgrBATjQ0i+wzGE8KD1r5vZ6sKPS72/Xbp0Mk0aucF+WNbPTX1lcU8YN+1mQYJmi nrRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710884571; x=1711489371; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GqWDFOie7mX3TwU3LgIVX+4d9y6x5nENIVyjPNwgDWE=; b=GyH2A/wFAA2tgCE8RbJWfl1OHzG2LJFQn5mkdU7jEEx5wreY3Ckx4l5qJfKhAU8zCf PXXz2Q7jBZS9thLFMlV0aIOhSJnNoYXRFrZ87eUN83ZIqUdlL0MqI9YINhtqCGEat/l9 KEbrCE+c4NSnBwTyeukfzvqxfprN524xO98jeWxh6i1hG0rQe6qvMgDq5WDdsreeVBxF mpSA0kWWUATF3CQVoz4HTdoLMmgtjnrNj8KlCk2yQWE1VHcsDe0ygpxDROUch597PKQq ulfsq0mfXWvByU7huXbdZi3crB6w8VUwixAAJYN0jaECNqhUfinUeagIwVHVIaiW1r8h qaPw== X-Gm-Message-State: AOJu0YynyG56F+wFdd07PS4Oho/26d+w82q5RXgtpskAhjmiKB3XEqnD 9+fUlYlxrSYnl3xAMZBloGxRQ/6kI0hxhHAFp2l41oiDFJM3pJ1fMdwJVcct X-Google-Smtp-Source: AGHT+IHM/bU0zuvq5hRuUkX7y0CmYCNwQ1HowV1Uk8fNUKD9TUZR34vbmkXMEl/HTZGJrK7cDY9qNw== X-Received: by 2002:a05:600c:2242:b0:414:a49:131a with SMTP id a2-20020a05600c224200b004140a49131amr7538290wmm.23.1710884571191; Tue, 19 Mar 2024 14:42:51 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id s10-20020a05600c45ca00b0041401eb021asm92763wmo.24.2024.03.19.14.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 14:42:49 -0700 (PDT) From: Stafford Horne To: GLIBC patches Cc: Linux OpenRISC , Stafford Horne Subject: [PATCH 1/4] or1k: Fix Linux user space signal ABI Date: Tue, 19 Mar 2024 21:42:41 +0000 Message-ID: <20240319214244.736981-2-shorne@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240319214244.736981-1-shorne@gmail.com> References: <20240319214244.736981-1-shorne@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org The OpenRISC sigcontext structure has always been defined as: struct user_regs_struct { /* GPR R0-R31... */ unsigned long gpr[32]; unsigned long pc; unsigned long sr; }; struct sigcontext { struct user_regs_struct regs; /* needs to be first */ unsigned long oldmask; /* unused */ }; With Linux v6.8 we added FPU support and repurposed the oldmask to use for the FPCSR (floating point control status register). struct sigcontext { struct user_regs_struct regs; /* needs to be first */ union { unsigned long fpcsr; unsigned long oldmask; /* unused */ }; }; The definition of mcontext_t was always missing the extra space for oldmask. This patch adds the field __fpcsr to mcontext_t to fix the ABI mismatch between glibc and Linux. --- sysdeps/unix/sysv/linux/or1k/sys/ucontext.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/unix/sysv/linux/or1k/sys/ucontext.h b/sysdeps/unix/sysv/linux/or1k/sys/ucontext.h index b17e919154..1b428592ee 100644 --- a/sysdeps/unix/sysv/linux/or1k/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/or1k/sys/ucontext.h @@ -38,6 +38,7 @@ typedef struct unsigned long int __gprs[__NGREG]; unsigned long int __pc; unsigned long int __sr; + unsigned long int __fpcsr; } mcontext_t; /* Userlevel context. */ From patchwork Tue Mar 19 21:42:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 87386 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8AB3138582A6 for ; Tue, 19 Mar 2024 21:43:26 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 6DE1C3858418 for ; Tue, 19 Mar 2024 21:42:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6DE1C3858418 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6DE1C3858418 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::432 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710884578; cv=none; b=CeOnQiE3u8uS9dLojIHKyqNu9QO0/7IS2Z+oMLsJbtKIn3emRK9hjpU0wdV884wDEvJSSBRJxkNVE56dakaVpE1tTzCu10qMf9SUIGxLyZI6JYbUXgVVEnwW9PnecP6F5S58iwfXxkjpY+wvrZtmgeNUsuZ7F8fhFtnd1tXOXTw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710884578; c=relaxed/simple; bh=rzGkCbNxNmfyMer+h/FPbJdKE393WxWFQlZfTTcNuio=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=lvVHt1474qONGpaVYDxRdd8roibk0zNWHhaF1kZTOH+MJK8XZ18/2Vpdit9OKUPENjJWNXTJC05KC0qoTC81drYYH6vAmSu+uQVWfxYPOUO8JkLkBi/WsXscBMMlpMC4vwcTUZwep4fOLtfuAVe7xsf8MIQfAFtPuA8rHDw4zPo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-33eee0258abso1750558f8f.3 for ; Tue, 19 Mar 2024 14:42:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710884573; x=1711489373; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fCdgl/DWJ2XjWent0NIObpJTy33XFQUHHm3ihhQ0Kg4=; b=Hk72X2EYnvmJcl6aD3kfgiJ9eSt7zSM/ULmiezSTa9Y7PnLMerUK9s62TE8DUcszQz 5VJJsiX/3q0QjvHjxRI+mv3Xb2+NsYlyBokrYEqojDwGnvkEq9MBXgN1hKcjtsAIT6/h mWHaJVPfCw1hO7US5pR6olZbHJiuKCKjkajgDwqlch898jr2o0zozhplV+rmvbDNEcTF gc+9rHQMeoqCaifQBboyUPamKnAlIQef+zOwHg8/BAGZ89PjKGunMBJlONMC3jnSMZ53 rCUwvcnMqmgiaDx66Z0xfaB5SGlopBHwyw/sqUToTiFfVWcmPvVyiH0jB1q3dmJElwdA 4rjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710884573; x=1711489373; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fCdgl/DWJ2XjWent0NIObpJTy33XFQUHHm3ihhQ0Kg4=; b=KBhoFH0VBn2N7jtsl9NYRptBsBe5u0UR2c6kfNrAdNVHz37outY72H+QEbyHMYyXa7 hmmW53vzIeZxa6x7GYhYs0XVry333fAJyDmOijmGhMXFU51KYPJnYovMdyrExB3o3x2k KLiGMOabrMy8o7OXaNtHoXZOmHir0Od1CIs0k8TzeDFxNlBNl6TihfiRRRyUgC9OBrfP Px2tFDf3jNOpn3H+W8ZJ5ElbJ3qQj8cDWopuXI9wsnW9nDriOwAwUEH7zsUzGUdjHRIK qahkNWaOaUGQAU2o+qUllod42+8+xDqVAnZD8PJpDZD++eKDmmtoF458YHKv1QaUg89U Gmyw== X-Gm-Message-State: AOJu0Ywjx0kh8wFXlrUR/GQ68nPU/rx7+nz/4oq6w6XCPj0gPyjCWptu QEc/HiHlJzXIBXOfR1GeArX/2pyd7XAQ3TqC/Wp44IU4sbHEWezrRCqHSIjC X-Google-Smtp-Source: AGHT+IGAYy/a469CQ0niHTRyTQyAmosTgM7ojdV8A8NVbY66XjE2CtKx5RXjzJu2AmO2UO5ragyA7g== X-Received: by 2002:a05:6000:12cb:b0:33e:ca35:9fe8 with SMTP id l11-20020a05600012cb00b0033eca359fe8mr197321wrx.19.1710884573399; Tue, 19 Mar 2024 14:42:53 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id bp2-20020a5d5a82000000b0033e43756d11sm10614604wrb.85.2024.03.19.14.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 14:42:52 -0700 (PDT) From: Stafford Horne To: GLIBC patches Cc: Linux OpenRISC , Stafford Horne Subject: [PATCH 2/4] or1k: Update libm test ulps Date: Tue, 19 Mar 2024 21:42:42 +0000 Message-ID: <20240319214244.736981-3-shorne@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240319214244.736981-1-shorne@gmail.com> References: <20240319214244.736981-1-shorne@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org To fix test failures: FAIL: math/test-float-hypot FAIL: math/test-float32-hypot --- sysdeps/or1k/libm-test-ulps | 1 + 1 file changed, 1 insertion(+) diff --git a/sysdeps/or1k/libm-test-ulps b/sysdeps/or1k/libm-test-ulps index 94b383669d..785bae70d0 100644 --- a/sysdeps/or1k/libm-test-ulps +++ b/sysdeps/or1k/libm-test-ulps @@ -834,6 +834,7 @@ float: 6 Function: "hypot": double: 1 +float: 1 Function: "hypot_downward": double: 1 From patchwork Tue Mar 19 21:42:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 87387 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 34DC43858C39 for ; Tue, 19 Mar 2024 21:43:30 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 5C2F9385841F for ; Tue, 19 Mar 2024 21:42:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5C2F9385841F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5C2F9385841F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::236 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710884580; cv=none; b=OGhGTB4vP2vifF+CLOzx9cBTvuFzdoB8JIKR2dwhT2vtTi1sIbj1KMsSsDH4PfBPS4DuHaJcKyHaDinRUcYkRuOHCWdphc7KpiM0hwYi+RDIQOAXc2b1RzeFO6jmxLzEuMNk19cfLb2JJl2XMrbMiLumLKBV+4+gWgvKKUdc+6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710884580; c=relaxed/simple; bh=9vm67h6z2zNPIDrHUWgEByQkFwcbMgGgzD38RVAwz08=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=lGS8FPYwG6wlgi883/PoJ3cef98fLJCqKuXy9F1KXp/ybfnRJI18aF7fGtpx9k2hiNz7DkFxzKbvV3N7vM7Rm7hlIzLIIOJADcZ0Ccwp6PLguaSUFoYsovuImRBr+t3S0vHyWR9+UeWxXOceyM0dQ+WUQJ9RHNdVzMapUr5SfXI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2d68c6a4630so5413701fa.3 for ; Tue, 19 Mar 2024 14:42:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710884576; x=1711489376; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9z9qLOgTMYvVX0wXoZxk7qct+eKNn8JwO/lREqZCH6s=; b=RH2fdEMvvmcPuu6LyFKd6e+wQ+Ya5mh6gMInluhw6eSko4MQP++ASakHqOb/PoGd/L IO5Ycza7E95pKypN/WkQuEEorlddYUpjTOui5QUFoeCqGc7y1qlD/vGpYxPX3WFhHmbr mSkjUHQnxDrA7oEeYfAlwFqVrstqZ+gESiQUrJUENFRW8snyuBTMzA/D8ylsUKxHmlXx cB8XQMt7YY2Csm1/xUJlVtukiR50sEPLRBvfsgiQQJuwbW73EnJv4pCxFgdiVDVWLWkr H8k2v6+QTtlYxZ91H0xIevAkA4SRfBuAC4EfQyOmP2I5UFmt0BkI0TPRZULv+lnMjUnd vOpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710884576; x=1711489376; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9z9qLOgTMYvVX0wXoZxk7qct+eKNn8JwO/lREqZCH6s=; b=gTlXz3Anik8TtC/QKHLL7DYjn+AHLVHaP4t5XFTtGqVz0TyMkZ1sXYY7ISiyWTADL7 W+i4ewhGz8GJfGdVJAP9i0BAKckbJn2FCrq2UsVgN+jMQ/8G9YF+Ucs5JMRy866Wcbna a/kZ6FfIqIT4vEKL6xD9lUcqHvpsHNu8aN0fmYiynOZM55n1xfQxiy8b5VetzVJ48asS ln8t77WYhh9FrfXJnPs2Wm6Rb+c1tDE1u7aD0m1ZaWo1GdstMBpTmEW+o9QHCQUOwLVh Vs6DmcwXtiRERKYY+xvi1PA8J19wjx3j0otZJ5I/n29GDLCmDAfXhLJNw549Q2veP209 V9kw== X-Gm-Message-State: AOJu0Yz6fevvux2HOuB4puOcD5NNn7KcxX7mCp5O5ihjiPyPT4h+mWEd 6BHJlZLWaJsOyUC+KNc98PpNTAsryvUIXOEujPlZh5crE40bg5jW3btcUgNz X-Google-Smtp-Source: AGHT+IHNv0UB0RRLVsaSeaiS0h3QlgYQpvcQZPkH8mzY9Wp3lcE8wSTkQcWK2XDEnkMYYaRji754Vg== X-Received: by 2002:a2e:8518:0:b0:2d4:764f:87ea with SMTP id j24-20020a2e8518000000b002d4764f87eamr2970125lji.34.1710884575603; Tue, 19 Mar 2024 14:42:55 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id p11-20020a05600c358b00b0041408af4b34sm107553wmq.10.2024.03.19.14.42.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 14:42:54 -0700 (PDT) From: Stafford Horne To: GLIBC patches Cc: Linux OpenRISC , Stafford Horne Subject: [PATCH 3/4] or1k: Only define fpu rouding and exceptions with hard-float Date: Tue, 19 Mar 2024 21:42:43 +0000 Message-ID: <20240319214244.736981-4-shorne@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240319214244.736981-1-shorne@gmail.com> References: <20240319214244.736981-1-shorne@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org This test failure: math/test-fenv If rounding mode and exception macros are defined then the fenv tests run and always fail. This patch adds an ifdef using the __or1k_hard_float__ macro provided by gcc to avoid defining these fenv macros when they cnnot be used. This is similar to what is done in csky. Note, I will post the or1k hard-float support soon. So, I prefer to leave the hard-float bits here for now. --- sysdeps/or1k/bits/fenv.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sysdeps/or1k/bits/fenv.h b/sysdeps/or1k/bits/fenv.h index 587039ca03..01267805e6 100644 --- a/sysdeps/or1k/bits/fenv.h +++ b/sysdeps/or1k/bits/fenv.h @@ -21,6 +21,7 @@ # error "Never use directly; include instead." #endif +#ifdef __or1k_hard_float__ /* Define bits representing exceptions in the FPCSR status word. */ enum { @@ -51,6 +52,24 @@ enum #define FE_UPWARD (0x2 << 1) #define FE_DOWNWARD (0x3 << 1) +#else + +/* In the soft-float case only rounding to nearest is supported, with + no exceptions. */ + +enum + { + __FE_UNDEFINED = -1, + + FE_TONEAREST = +# define FE_TONEAREST 0x0 + FE_TONEAREST + }; + +# define FE_ALL_EXCEPT 0 + +#endif /* __or1k_hard_float__ */ + /* Type representing exception flags. */ typedef unsigned int fexcept_t; From patchwork Tue Mar 19 21:42:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stafford Horne X-Patchwork-Id: 87388 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 67D683858420 for ; Tue, 19 Mar 2024 21:44:08 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 633923858CDB for ; Tue, 19 Mar 2024 21:43:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 633923858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 633923858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::333 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710884582; cv=none; b=ROzf7s5km83k0fgeXKzm0+7UyEUXiCvJwCbsgJCjE5d0Me1x1iT+AdEGIcuemXq8xh46DH+EB5m1kdzuLKNw1kZXQzS1r9RmT6YSFy4I6VHoki+FmcfAtkVM6RLgyDeS231NeItUlma/nYw4OECjl04sYmBITjbbD/nPKvMdaNc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710884582; c=relaxed/simple; bh=o3r6XltSn7T1uGTk07Wi7laRQqIz8JuIispTC34FJ+U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Zz8ESekToFJDytbBRFY/uF0NLcjJXSWAoE4FTcSO2K+acSkeO+HYxGNuxxhawJEI6t0xQKKhyDzCwxXfr8oRdMIz9uji73cX6+QOh/3nQq18yVZn12xtIzjQ3PHyokGXmgSeA3BNfJwN3Qz7rIffk4xV3wKiQtDZjVTI+INuaTk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-41468993f93so5668405e9.3 for ; Tue, 19 Mar 2024 14:43:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710884578; x=1711489378; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cFvKdRIMK1Zy3EK9VazDyW2mCoPbeoFiUZiDZoWkdHY=; b=PPZjPVHvTycFggVcC3G2fH66lQUNLFhzk+ywiZmslIz8ttbe7wSja1MOFxQoU0feUC De1kvieDWnRlduvcZezBmCWB20PPQ0w3aisBRgr2AG11VTDUgPDxT5MOPdVeEixMQQFQ XbiiantTLeC0fszYCvgT0ket9RxmXyV3Kuq+olQMGPf8pWeExVV4SGSjtTgr7U+UuKTn KeS2GXvfHl2/AxAjCYW+1hlTSKRgL4keuEOmm80DTzlacnwLmdcrGL3gvJQEaFM5EOaP axP318HIlvE1wB+jsifcTcK1dSifXn3ZNve/tN2gzUXQXKWxEfKBHbBsOdtir8Dh4rQ/ jo+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710884578; x=1711489378; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cFvKdRIMK1Zy3EK9VazDyW2mCoPbeoFiUZiDZoWkdHY=; b=mNBAzbg0VuI3rnXNDirsdwnY9qOoOGdibxH5lSddepF+8esQLEMtWO868LrT/rPQky wdLQ0NA5FWc8GYEFj7Xr5NIxy22mIYbEFL1FJSddRT2zV4slTJgHe+mG/Bg+s82aDHIQ 2KbWJpHf7ARspOhvuvpPP2XE5VP8odCLC5yAOtJaMwz8Os4a+hzlgsbH5mZ3V6Q4Yw11 cwUf6cfu5vxLkEBXivWpztQHI4mrC6lCZ41m9wnB+gFqyVs7GCydrpt1l1aZp7QtZS2R visMeklRBGSa9krfzusITcXPueByu6aQFLjvVBxiHkFRuQ+c9Y872/Ogz86r5+98DtdC 4ubg== X-Gm-Message-State: AOJu0YzJYdKfQuTZJXn8uxhHxB/S65n8W4+B722gwrjuvCmI/slnfWM4 /YleE1oSSQ04V6NW4ZOx8Mlbz5gvQ/wkWafRoDKe2cu1EwdNPHRQSB9Q00o0 X-Google-Smtp-Source: AGHT+IFjOr7178WzN8Wmv+aGpWzZvbz5fKIDGIQmfdzmSUi5iAy+j3CTov8Hr6kCWw+bzrGkiy1U+g== X-Received: by 2002:a05:600c:1551:b0:414:413:538d with SMTP id f17-20020a05600c155100b004140413538dmr2770014wmg.0.1710884578214; Tue, 19 Mar 2024 14:42:58 -0700 (PDT) Received: from localhost (cpc1-brnt4-2-0-cust862.4-2.cable.virginm.net. [86.9.131.95]) by smtp.gmail.com with ESMTPSA id b2-20020a05600c4e0200b004140837a0d4sm99647wmq.3.2024.03.19.14.42.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 14:42:56 -0700 (PDT) From: Stafford Horne To: GLIBC patches Cc: Linux OpenRISC , Stafford Horne Subject: [PATCH 4/4] or1k: Add prctl wrapper to unwrap variadic args Date: Tue, 19 Mar 2024 21:42:44 +0000 Message-ID: <20240319214244.736981-5-shorne@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240319214244.736981-1-shorne@gmail.com> References: <20240319214244.736981-1-shorne@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org On OpenRISC variadic functions and regular functions have different calling conventions so this wrapper is needed to translate. This wrapper is copied from x86_64/x32. I don't know the build system enough to find a cleaner way to share the code between x86_64/x32 and or1k (maybe Implies?), so I went with the straight copy. This fixes test failures: misc/tst-prctl nptl/tst-setgetname --- sysdeps/unix/sysv/linux/or1k/prctl.c | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/or1k/prctl.c diff --git a/sysdeps/unix/sysv/linux/or1k/prctl.c b/sysdeps/unix/sysv/linux/or1k/prctl.c new file mode 100644 index 0000000000..1aa707d175 --- /dev/null +++ b/sysdeps/unix/sysv/linux/or1k/prctl.c @@ -0,0 +1,42 @@ +/* prctl - Linux specific syscall. OpenRISC version. + Copyright (C) 2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + +/* Unconditionally read all potential arguments. This may pass + garbage values to the kernel, but avoids the need for teaching + glibc the argument counts of individual options (including ones + that are added to the kernel in the future). */ + +int +__prctl (int option, ...) +{ + va_list arg; + va_start (arg, option); + unsigned long int arg2 = va_arg (arg, unsigned long int); + unsigned long int arg3 = va_arg (arg, unsigned long int); + unsigned long int arg4 = va_arg (arg, unsigned long int); + unsigned long int arg5 = va_arg (arg, unsigned long int); + va_end (arg); + return INLINE_SYSCALL_CALL (prctl, option, arg2, arg3, arg4, arg5); +} + +libc_hidden_def (__prctl) +weak_alias (__prctl, prctl)