[rtems commit] i386: Replace fpcr clobber with memory clobber
Joel Sherrill
joel at rtems.org
Sun Jul 5 18:15:35 UTC 2020
If this is wrong and just caught now, should it also be applied to the 5
branch?
--joel
On Sun, Jul 5, 2020 at 11:00 AM Sebastian Huber <sebh at rtems.org> wrote:
> Module: rtems
> Branch: master
> Commit: d0c1ce658ed1e1510f54279f662fc8a096cae6f7
> Changeset:
> http://git.rtems.org/rtems/commit/?id=d0c1ce658ed1e1510f54279f662fc8a096cae6f7
>
> Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
> Date: Tue Apr 21 10:17:00 2020 +0200
>
> i386: Replace fpcr clobber with memory clobber
>
> Update #3943.
>
> ---
>
> cpukit/score/cpu/i386/include/rtems/score/cpu.h | 4 ++--
> cpukit/score/cpu/i386/sse_test.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/cpukit/score/cpu/i386/include/rtems/score/cpu.h
> b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
> index 225b728..632bf5f 100644
> --- a/cpukit/score/cpu/i386/include/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/i386/include/rtems/score/cpu.h
> @@ -621,7 +621,7 @@ void _CPU_Context_save_fp(
> __asm__ __volatile__( \
> "fldcw %0" \
> ::"m"((*(fp_context_pp))->fpucw) \
> - :"fpcr" \
> + :"memory" \
> ); \
> __builtin_ia32_ldmxcsr(_Thread_Executing->fp_context->mxcsr); \
> } while (0)
> @@ -640,7 +640,7 @@ void _CPU_Context_restore_fp(
> : \
> :"st","st(1)","st(2)","st(3)", \
> "st(4)","st(5)","st(6)","st(7)", \
> - "fpsr","fpcr" \
> + "fpsr","memory" \
> ); \
> if ( _Thread_Executing->fp_context ) { \
> _CPU_Context_restore_fp(&_Thread_Executing->fp_context); \
> diff --git a/cpukit/score/cpu/i386/sse_test.c
> b/cpukit/score/cpu/i386/sse_test.c
> index dc87371..14e7dd9 100644
> --- a/cpukit/score/cpu/i386/sse_test.c
> +++ b/cpukit/score/cpu/i386/sse_test.c
> @@ -229,7 +229,7 @@ fp_ld(Context_Control_sse *p_ctxt, int i)
> #define FPUCLOBBER \
> "st","st(1)","st(2)","st(3)", \
> "st(4)","st(5)","st(6)","st(7)",\
> - "fpsr","fpcr"
> + "fpsr","memory"
>
> /* There seems to be no way to say that mxcsr was clobbered */
>
>
> _______________________________________________
> vc mailing list
> vc at rtems.org
> http://lists.rtems.org/mailman/listinfo/vc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200705/783e828a/attachment.html>
More information about the devel
mailing list