[PATCH] Add PTRACE_{GET|SET}VRREGS

Kumar Gala kumar.gala at freescale.com
Sat Sep 10 00:09:59 EST 2005


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