[PATCH] power: Fix VSCR position on ucontext

Gabriel F. T. Gomes gabriel@inconstante.eti.br
Fri Nov 16 13:18:00 GMT 2018


On Wed, 14 Nov 2018, Florian Weimer wrote:

>* Rogerio Alves:
>
>> +#ifdef _ARCH_PWR8  
>
>Is it possible to perform run-time detection instead?

That's a fair point.  Even though we have bots that test powerpc64
(big-endian) builds configured with `--with-cpu=power8', that's not the
default.  Runtime detection could make this test work on default builds
(provided they are run on a POWER8 machine).

>+  /* Set SAT bit in VSCR register.  */
>+  asm volatile ("vspltisb %0,0\n"
>+                "vspltisb %1,-1\n"
>+                "vpkudus %0,%0,%1\n"

Also, if you replace `vpkudus' (only available since Power ISA 2.07) with
`vpkuwus' (available since PowerISA 2.03) the test remains valid and it
could be tested on older machines.



More information about the Libc-alpha mailing list