[PATCH] power: Fix VSCR position on ucontext
Rogerio Alves
rcardoso@linux.ibm.com
Wed Dec 19 19:30:00 GMT 2018
I am sending patch v4 attached in this email with the fixes proposed
here. Thank you all for the review on this patch.
Regards
Em 10-12-2018 16:38, Tulio Magno Quites Machado Filho escreveu:
> "Gabriel F. T. Gomes" <gabriel@inconstante.eti.br> writes:
>
>> On Fri, 07 Dec 2018, Gabriel F. T. Gomes wrote:
>>
>>> On Fri, 07 Dec 2018, Rogerio Alves wrote:
>>>
>>>> +/* This test is supported only on POWER 5 or higher. */
>>>> +#define PPC_CPU_SUPPORTED (PPC_FEATURE_POWER5 | PPC_FEATURE_POWER5_PLUS | \
>>>> + PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 | \
>>>> + PPC_FEATURE2_ARCH_2_07)
>>>
>>> Is this actually needed? Glibc has code to fill all the bits for older
>>> architectures in sysdeps/powerpc/hwcapinfo.c [1]. So, as far as I can
>>> see, you only need to test for AT_HWCAP & PPC_FEATURE_POWER5.
>>>
>>> [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/hwcapinfo.c;h=a09b18309324423d0cdf04e88367899a4396bab7;hb=HEAD#l47
>>
>> Hrm, that's only true for the hwcap info that is copied into the TCB, not
>> when accessing it with getauxval, so my comment is wrong (as Rogerio
>> kindly pointed out to me in a private message... thanks).
>>
>> So, nevermind this comment.
>>
>>
>> On the other hand, on powerpc64 builds configured with --with-cpu set to
>> power4, power5, and power6, (but not to power8 or power7), I got the
>> following error message:
>>
>> ../sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c: In function âdo_testâ:
>> ../sysdeps/powerpc/powerpc64/tst-ucontext-ppc64-vscr.c:51:3: error: inconsistent operand constraints in an âasmâ
>> asm volatile ("vspltisb %0,0\n"
>> ^~~
>>
>> I guess we didn't get this error message before, because of the
>> `#ifdef ARCH_PWR8' statement. So, unless you know a better way to fix
>> this, you should reintroduce the `#ifdef' statement (now, you could use
>> ARCH_PWR7).
>
> You can use:
>
> .machine push;
> .machine "power7";
> ...
> .machine pop
>
> It should be safe to use with the current minimum required Binutils i.e.
> support for POWER7 was already available in GNU Binutils 2.25 (even P8 was
> supported).
>
Done. Using your suggestion fixed the issue thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-powerpc-Fix-VSCR-position-in-ucontext.patch
Type: text/x-patch
Size: 5484 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20181219/a6b41c6a/attachment.bin>
More information about the Libc-alpha
mailing list