This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 01/28] Note that powerpc fpu emulation status is not thread- or signal-safe.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 16 Aug 2013 11:18:28 -0400
- Subject: Re: [PATCH 01/28] Note that powerpc fpu emulation status is not thread- or signal-safe.
- References: <20130816081210 dot 22991 dot 30766 dot stgit at frit dot home> <20130816083201 dot 22991 dot 67938 dot stgit at frit dot home>
On 08/16/2013 04:32 AM, Alexandre Oliva wrote:
> for ports/ChangeLog.powerpc
>
> PR 15483
> * sysdeps/powerpc/nofpu/sim-full.c: Add FIXME note about
> the need for thread-specific variables preserved across signal
> handlers.
> * sysdeps/powerpc/nofpu/soft-supp.h: Likewise.
> * sysdeps/powerpc/soft-fp/sfp-machine.h: Likewise.
This looks good to me. We have a bug and a FIXME. I couldn't ask for more.
Please check this in.
> ---
> ports/sysdeps/powerpc/nofpu/sim-full.c | 5 +++++
> ports/sysdeps/powerpc/nofpu/soft-supp.h | 5 +++++
> ports/sysdeps/powerpc/soft-fp/sfp-machine.h | 5 +++++
> 3 files changed, 15 insertions(+)
>
> diff --git a/ports/sysdeps/powerpc/nofpu/sim-full.c b/ports/sysdeps/powerpc/nofpu/sim-full.c
> index fc061d0..e167033 100644
> --- a/ports/sysdeps/powerpc/nofpu/sim-full.c
> +++ b/ports/sysdeps/powerpc/nofpu/sim-full.c
> @@ -21,6 +21,11 @@
> #include "soft-fp.h"
> #include "soft-supp.h"
>
> +/* FIXME: these variables should be thread specific (see bugzilla bug
> + 15483) and ideally preserved across signal handlers, like hardware
> + FP status words, but the latter is quite difficult to accomplish in
> + userland. */
> +
> /* Global to store sticky exceptions. */
> int __sim_exceptions __attribute__ ((nocommon));
> libc_hidden_data_def (__sim_exceptions);
> diff --git a/ports/sysdeps/powerpc/nofpu/soft-supp.h b/ports/sysdeps/powerpc/nofpu/soft-supp.h
> index b9638bb..64a3d2a 100644
> --- a/ports/sysdeps/powerpc/nofpu/soft-supp.h
> +++ b/ports/sysdeps/powerpc/nofpu/soft-supp.h
> @@ -26,6 +26,11 @@ typedef union
> } fenv_union_t;
>
>
> +/* FIXME: these variables should be thread specific (see bugzilla bug
> + 15483) and ideally preserved across signal handlers, like hardware
> + FP status words, but the latter is quite difficult to accomplish in
> + userland. */
> +
> extern int __sim_exceptions;
> libc_hidden_proto (__sim_exceptions);
> extern int __sim_disabled_exceptions;
> diff --git a/ports/sysdeps/powerpc/soft-fp/sfp-machine.h b/ports/sysdeps/powerpc/soft-fp/sfp-machine.h
> index c2a190e..508d869 100644
> --- a/ports/sysdeps/powerpc/soft-fp/sfp-machine.h
> +++ b/ports/sysdeps/powerpc/soft-fp/sfp-machine.h
> @@ -54,6 +54,11 @@
> #define FP_ROUNDMODE __sim_round_mode
> #define FP_TRAPPING_EXCEPTIONS (~__sim_disabled_exceptions & 0x3e000000)
>
> +/* FIXME: these variables should be thread specific (see bugzilla bug
> + 15483) and ideally preserved across signal handlers, like hardware
> + FP status words, but the latter is quite difficult to accomplish in
> + userland. */
> +
> extern int __sim_exceptions;
> libc_hidden_proto (__sim_exceptions);
> extern int __sim_disabled_exceptions;
>