This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2.19] S/390: Make ucontext_t extendible - update
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <kkojima at rr dot iij4u dot or dot jp>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 22 Jan 2014 17:07:44 +0000
- Subject: Re: [PATCH 2.19] S/390: Make ucontext_t extendible - update
- Authentication-results: sourceware.org; auth=none
- References: <20140103154754 dot GB30732 at bart> <Pine dot LNX dot 4 dot 64 dot 1401220259300 dot 25161 at digraph dot polyomino dot org dot uk> <20140122 dot 160218 dot 455306953 dot kkojima at rr dot iij4u dot or dot jp>
On Wed, 22 Jan 2014, kkojima@rr.iij4u.or.jp wrote:
> How about the attached patch for SH? It merges
> sysdeps/unix/sysv/linux/sh/sh[34]/sys/ucontext.h into
> sysdeps/unix/sysv/linux/sh/sys/ucontext.h and move
> sysdeps/sh/sh4/fpu/fpu_control.h to sysdeps/sh/fpu_control.h
> with modifying so as to handle no fpu case.
I haven't checked the details of the merge. But my understanding here is:
> +#ifdef __SH_FPU_ANY__
> +typedef int freg_t;
> +
> +/* Number of FPU registers. */
> +#define NFPREG 16
> +
> +/* Structure to describe FPU registers. */
> +typedef freg_t fpregset_t[NFPREG];
> +
> +/* Context to describe whole processor state. */
> +typedef struct
> + {
> + unsigned int oldmask;
> + gregset_t gregs;
> + unsigned int pc;
> + unsigned int pr;
> + unsigned int sr;
> + unsigned int gbr;
> + unsigned int mach;
> + unsigned int macl;
> + fpregset_t fpregs;
> + fpregset_t xfpregs;
> + unsigned int fpscr;
> + unsigned int fpul;
> + unsigned int ownedfp;
> + } mcontext_t;
(arch/sh/include/uapi/asm/sigcontext.h) that the kernel ABI is that the
extra parts are present in this structure when built for SH4 (or SH2A,
irrelevant to glibc?), whether or not an FPU is in use, and so the
conditional in the glibc header should match that.
Can you confirm that the ABIs supported by glibc for SH are SH4
hard-float, SH4 soft-float (differing at the function-call ABI level
although not in ucontext size) and SH3 soft-float, each of those for both
big-endian and little-endian (so six incompatible ABIs)?
--
Joseph S. Myers
joseph@codesourcery.com