This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2.19] S/390: Make ucontext_t extendible - update


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]