From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id 5D1773858C39 for ; Mon, 3 Apr 2023 15:55:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D1773858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x530.google.com with SMTP id er13so78249198edb.9 for ; Mon, 03 Apr 2023 08:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680537351; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4K57Q9MSFrYaX7wFhJse0FZ++sKhjheSjwBsKZCdAcw=; b=mqcghPJjZyfO82hPltg0t6ql8NegjjTrhyCeRyqAwfwE94/8GcVBxXtdD5+SA6xKll qXvlrxpRyXFnWQD3wR9HfvWlFyNijQkBHjiIIN482qmtNo9hoYwFg8X4BOhUPQmKmdQV xZrOwhESbBz+rpqzbN2DnOQcRJcZWpHgJmQz0wsCgwMFiEd3AXx/K8FoubdO6a1sOdT9 RAZPiaFnZrpu5F8ZgY9LOSpypy37kQoM5djBfZFp3LbRDkOGpM7at9cnk3a5AFY8BIeK wpRBcBe/2XR3wokkudguhK0RMQquG6nJ8FwilC31bF/ckSeD8oEMr/6VDI0yFqr9EJ9L FqFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680537351; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4K57Q9MSFrYaX7wFhJse0FZ++sKhjheSjwBsKZCdAcw=; b=jqtAqf7rJhfueCh/XPIzsqZfe+jC5STxiY1q5KJYQCpI1FBQMJVUVx5yUpHVsvsFF1 CiPJKA70FsZRgxF/wVRz+X62aWVX2ON8Vkc+DebFht1fuz/6IiwG5Zd9kYLGY294o3GC KSGiWrE7KGpuRYXRuGnNGAkZAXMSr72fpJF3Prd4GbDwQdl6qG05g9+qb1FevbN52eK+ ud0zyH7U2FBjELe1NuK4LmI68RmUI1PMSOwg4wMDVMCdYfss9vepohRK4qAH2ttcJ+kH TVpLKPsrIsoQjz4oXX/oA4xt0Dezdf2RypH4SX60KRkDNNfG28pwDDxTt4pJ8eDNUfFY L/Jg== X-Gm-Message-State: AAQBX9cRp+qL/Ev4ifvIfQ5MkR7sDm4sniLVyt4JJZ1YkCh1QNzUc6P6 zoYGMvQcTtM8yh+Ga0s+MTsFaeBEeB+cpxMHnI0f+IMgiTQ= X-Google-Smtp-Source: AKy350Y+QiwAhI9JpgRS8oUTW2G7dwLNoDmU3k9eIJV9ucfjhUMj6PAH/IIcG/rGcYCq9LT80bJnBIDuTUVd08d7+QM= X-Received: by 2002:a17:907:9729:b0:92e:7a67:668a with SMTP id jg41-20020a170907972900b0092e7a67668amr19523657ejc.0.1680537350930; Mon, 03 Apr 2023 08:55:50 -0700 (PDT) MIME-Version: 1.0 References: <87bkk50y5n.fsf@oldenburg.str.redhat.com> In-Reply-To: <87bkk50y5n.fsf@oldenburg.str.redhat.com> From: Noah Goldstein Date: Mon, 3 Apr 2023 10:55:39 -0500 Message-ID: Subject: Re: [PATCH] x86_64: Fix asm constraints in feraiseexcept (bug 30305) To: Florian Weimer Cc: libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.4 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Apr 3, 2023 at 10:43=E2=80=AFAM Florian Weimer via Libc-alpha wrote: > > The divss instruction clobbers its first argument, and the constraints > need to reflect that. Fortunately, with GCC 12, generated code does > not actually change, so there is no externally visible bug. > > Tested on x86_64-linux-gnu. > > Suggested-by: Jakub Jelinek > > --- > sysdeps/x86_64/fpu/fraiseexcpt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/x86_64/fpu/fraiseexcpt.c b/sysdeps/x86_64/fpu/fraise= excpt.c > index 924eed96a9..e7430a4158 100644 > --- a/sysdeps/x86_64/fpu/fraiseexcpt.c > +++ b/sysdeps/x86_64/fpu/fraiseexcpt.c > @@ -33,7 +33,7 @@ __feraiseexcept (int excepts) > /* One example of an invalid operation is 0.0 / 0.0. */ > float f =3D 0.0; > > - __asm__ __volatile__ ("divss %0, %0 " : : "x" (f)); > + __asm__ __volatile__ ("divss %0, %0 " : "+x" (f)); > (void) &f; > } > > @@ -43,7 +43,7 @@ __feraiseexcept (int excepts) > float f =3D 1.0; > float g =3D 0.0; > > - __asm__ __volatile__ ("divss %1, %0" : : "x" (f), "x" (g)); > + __asm__ __volatile__ ("divss %1, %0" : "+x" (f) : "x" (g)); > (void) &f; > } > > > base-commit: ac2a14343e81098c196cef5d67b52e440c05c230 > LGTM. Reviewed-by: Noah Goldstein