From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 06C9F3858D33; Thu, 18 Jan 2024 11:47:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06C9F3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705578470; bh=Nz1zzr97xtFUBs+2RabLUKRKJKHBJk62UwAkUz02WzE=; h=From:To:Subject:Date:From; b=Ysjgm+bLQTlJff0YUqsOV/ALqtQE6MByd0rVBCLM56jfDITzfZ9r5pnL9DHEvTgj/ d0MGQxtGEa+EBskvoIGpr1GD+jNvk9y3GSAc/mSn+KkFL0pXeit9e85SE3lB5VLWRH IRdds5rF3b/mIEMzvZvtq0lkj9dHVtqEcVvdpKH8= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] sparc: Use existing macros to avoid code duplication X-Act-Checkin: glibc X-Git-Author: Daniel Cederman X-Git-Refname: refs/heads/master X-Git-Oldrev: 8393f4f72bc8fc79328b2d739d3ff91c1753c3b5 X-Git-Newrev: 3bb1350c3681c5ca330dd92500dc59fba94b37eb Message-Id: <20240118114750.06C9F3858D33@sourceware.org> Date: Thu, 18 Jan 2024 11:47:49 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3bb1350c3681c5ca330dd92500dc59fba94b37eb commit 3bb1350c3681c5ca330dd92500dc59fba94b37eb Author: Daniel Cederman Date: Mon Jan 15 15:53:44 2024 +0100 sparc: Use existing macros to avoid code duplication Macros for using inline assembly to access the fp state register exists in both fenv_private.h and in fpu_control.h. Let fenv_private.h use the macros from fpu_control.h Signed-off-by: Daniel Cederman Reviewed-by: Adhemerval Zanella Diff: --- sysdeps/sparc/fpu/fenv_private.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sysdeps/sparc/fpu/fenv_private.h b/sysdeps/sparc/fpu/fenv_private.h index da7c7fe332..a31ba3cc7b 100644 --- a/sysdeps/sparc/fpu/fenv_private.h +++ b/sysdeps/sparc/fpu/fenv_private.h @@ -2,15 +2,11 @@ #define SPARC_FENV_PRIVATE_H 1 #include +#include /* For internal use only: access the fp state register. */ -#if __WORDSIZE == 64 -# define __fenv_stfsr(X) __asm__ __volatile__ ("stx %%fsr,%0" : "=m" (X)) -# define __fenv_ldfsr(X) __asm__ __volatile__ ("ldx %0,%%fsr" : : "m" (X)) -#else -# define __fenv_stfsr(X) __asm__ __volatile__ ("st %%fsr,%0" : "=m" (X)) -# define __fenv_ldfsr(X) __asm__ __volatile__ ("ld %0,%%fsr" : : "m" (X)) -#endif +#define __fenv_stfsr(X) _FPU_GETCW (X) +#define __fenv_ldfsr(X) _FPU_SETCW (X) static __always_inline void libc_feholdexcept (fenv_t *e)