[Pixman] [PATCH v2] build: improve control logic for enabling MMI.

Shiyou Yin yinshiyou-hf at loongson.cn
Sat Mar 7 02:40:49 UTC 2020


>-----Original Message-----
>From: Adam Jackson [mailto:ajax at redhat.com]
>Sent: Saturday, March 7, 2020 4:22 AM
>To: Shiyou Yin; pixman at lists.freedesktop.org
>Subject: Re: [Pixman] [PATCH v2] build: improve control logic for enabling MMI.
>
>On Fri, 2020-03-06 at 19:28 +0800, Shiyou Yin wrote:
>> From: Yin Shiyou <yinshiyou-hf at loongson>
>>
>> 1. Replace LS_CFLAGS with MMI_CFLAGS to express its intention more accurately.
>>    LS_CFLAGS is still available, but it is not recommended.
>> 2. Improve the control logic for enabling MMI.
>>
>> Three essential conditions for enabling MMI:
>> 1) user have not specify --disable-loongson-mmi.
>> 2) MMI options has been specified by MMI_CFLAGS,CC or compiler's default setting.
>> 3) compiler supports these MMI options.
>
>It still seems unfortunate to me to need to choose. There's plenty of
>code in the world that can handle the CPU having either SSE or 3DNow, I
>don't really see why we should have to choose to build pixman for a
>specific generation of Loongson.
>
The key point is that the opcode of MMI instructions on 2 F and 3 A is different,
compiler use different options to hand this. 
For compilation phase, we can enable MMI base on compiler support, but it is difficult
to automatically make the right choice to use which option to compile MMI instruction.
SSE and 3DNow does not need to select the compilation option.

Fortunately, msa, lsx and lasx no longer need to make this kind of choice any more.
This patch is just improve the old setting for MMI.
I will submit MSA optimization patchs soon.




More information about the Pixman mailing list