[PATCH] Add PTRACE_{GET|SET}VRREGS
Steve Munroe
sjmunroe at us.ibm.com
Wed Sep 14 06:19:23 EST 2005
Changing you internal structures is OK with me. But don't change the
size/alignment for PTRACE_GETVRREGS and PTRACE_SETVRREGS
Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center
Kumar Gala <kumar.gala at freescale.com>
09/09/2005 09:09 AM
To
Steve Munroe/Rochester/IBM at IBMUS
cc
Robert Jennings <rcjenn at austin.ibm.com>, Anton Blanchard
<anton at samba.org>, linuxppc64-dev <linuxppc64-dev at ozlabs.org>, Paul
Mackerras <paulus at samba.org>
Subject
Re: [PATCH] Add PTRACE_{GET|SET}VRREGS
Steve,
Can you provide any insight into Anton's comment.
What I would like to see is on ppc64:
struct thread_struct {
...
#ifdef CONFIG_ALTIVEC
/* Complete AltiVec register set */
vector128 vr[32] __attribute((aligned(16)));
/* AltiVec status */
vector128 vscr __attribute((aligned(16)));
unsigned long vrsave;
int used_vr; /* set if process has used
altivec */
#endif /* CONFIG_ALTIVEC */
};
turn into:
struct thread_struct {
...
#ifdef CONFIG_ALTIVEC
/* Complete AltiVec register set */
vector128 vr[32] __attribute((aligned(16)));
/* AltiVec status */
vector128 vscr __attribute((aligned(16)));
unsigned int vrsave;
int used_vr; /* set if process has used
altivec */
#endif /* CONFIG_ALTIVEC */
};
(Change of unsigned long to unsigned int for vrsave). This is
because vrsave is truly only 32-bits in all implementations.
Is there some reason this breaks the ppc64 ABI?
- kumar
On Sep 9, 2005, at 1:47 AM, Anton Blanchard wrote:
>
> Hi Kumar,
>
>
>> I repeat my request that we make vrsave an unsigned int instead of an
>> unsigned long in thread_struct since we are touch this code anyways.
>>
>
> Apparently the 3 word pad is there for a reason in the 64bit ABI,
> Steve
> Munroe would know the details.
>
> Anton
>
More information about the Linuxppc64-dev
mailing list