[PATCH] x86-64: Fix a typo in fesetenv.c [BZ #33619]

H.J. Lu hjl.tools@gmail.com
Tue Nov 11 07:48:04 GMT 2025


On Tue, Nov 11, 2025 at 2:56 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Tue, Nov 11, 2025 at 2:12 PM Collin Funk <collin.funk1@gmail.com> wrote:
> >
> > "H.J. Lu" <hjl.tools@gmail.com> writes:
> >
> > >> I bisected 65 test failures to this commit. On a x86_64 Fedora 43 system
> > >> with the following gcc:
> > >>
> > >>     $ gcc --version | head -n 1
> > >>     gcc (GCC) 15.2.1 20251022 (Red Hat 15.2.1-3)
> > >>
> > >> The main ones are:
> > >>
> > >>     FAIL: math/test-fenv
> > >>     FAIL: math/test-fenv-clear
> > >>     FAIL: math/test-fenv-clear-sse
> > >>     FAIL: math/test-fenv-return
> > >>     FAIL: math/test-fenv-x87
> > >
> > > How can I reproduce these on Fedora 43?
> >
> > Here is what I did:
> >
> >     $ "$GLIBC_SRCDIR"/configure --prefix=/usr \
> >         && make -j $(nproc) \
> >         && make subdirs=math -j $(nproc) check
> >
> > Collin
>
> I opened:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=33619
>

Fix a typo in

commit 427c25278d1dae62dffa07ea5cd0fc33f07190af
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Oct 31 17:00:46 2025 -0300

    x86: Adapt "%v" usage on clang to emit VEX enconding

@@ -103,8 +104,8 @@ __fesetenv (const fenv_t *envp)
       temp.__mxcsr = envp->__mxcsr;
     }

-  __asm__ ("fldenv %0\n"
-          "%vldmxcsr %1" : : "m" (temp), "m" (temp.__mxcsr));
+  asm volatile ("fldenv %0" : "=m" (temp));
+  ldmxcsr_inline_asm (&temp.__mxcsr);

   /* Success.  */
   return 0;

"temp" is input not output.  This fixes BZ #33619.

OK for master if there are no regressions?

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-64-Fix-a-typo-in-fesetenv.c-BZ-33619.patch
Type: text/x-patch
Size: 1365 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20251111/4e41df38/attachment-0001.bin>


More information about the Libc-alpha mailing list