<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-05-01 17:46 GMT+08:00 Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On 30 April 2016 at 18:36, Zhen Wu <<a href="mailto:wuzhen@jidemail.com">wuzhen@jidemail.com</a>> wrote:<br>
> 2016-04-29 18:22 GMT+08:00 Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>>:<br>
>><br>
>> On 28 April 2016 at 08:34, Chih-Wei Huang <<a href="mailto:cwhuang@android-x86.org">cwhuang@android-x86.org</a>> wrote:<br>
>> > From: WuZhen <<a href="mailto:wuzhen@jidemail.com">wuzhen@jidemail.com</a>><br>
>> ><br>
>> > Support multilib compilation use runtime feature selection.<br>
>> ><br>
>> > NO_REF_TASK<br>
>> > tested: local run<br>
>> ><br>
>> > Change-Id: Iee7961effdecde09cfbdaf09455bfb0912699ae3<br>
>> > Signed-off-by: Chih-Wei Huang <<a href="mailto:cwhuang@linux.org.tw">cwhuang@linux.org.tw</a>><br>
>> > ---<br>
>> >  <a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a>                    | 21 ++++++++++++++++++---<br>
>> >  Android.mk                           |  5 -----<br>
>> >  src/mapi/Android.mk                  |  3 +++<br>
>> >  src/mesa/<a href="http://Android.gen.mk" rel="noreferrer" target="_blank">Android.gen.mk</a>              | 25 ++++++++++++++++++-------<br>
>> >  src/mesa/<a href="http://Android.libmesa_dricore.mk" rel="noreferrer" target="_blank">Android.libmesa_dricore.mk</a>  | 20 +++++++++-----------<br>
>> >  src/mesa/<a href="http://Android.libmesa_sse41.mk" rel="noreferrer" target="_blank">Android.libmesa_sse41.mk</a>    |  5 ++++-<br>
>> >  src/mesa/<a href="http://Android.libmesa_st_mesa.mk" rel="noreferrer" target="_blank">Android.libmesa_st_mesa.mk</a>  | 20 +++++++++-----------<br>
>> >  src/mesa/<a href="http://Android.mesa_gen_matypes.mk" rel="noreferrer" target="_blank">Android.mesa_gen_matypes.mk</a> |  7 +++++--<br>
>> >  src/mesa/drivers/dri/i965/Android.mk |  5 -----<br>
>> >  9 files changed, 66 insertions(+), 45 deletions(-)<br>
>> ><br>
>><br>
>> Afact this patch does a few things:<br>
>>  - Moves -DUSE_SSE41 to the top level - good idea [patch 1]<br>
>>  - Consolidates -msse41 to <a href="http://libmesa_sse41.mk" rel="noreferrer" target="_blank">libmesa_sse41.mk</a> (effectively adding it to<br>
>> st_mesa) - good idea/bugfix.<br>
>> Take a look into <a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a>'s add -mstackrealign (and the commit<br>
>> that introduced it). You might want the same/similar fix. [patch 2]<br>
>><br>
>>  - Forces SSE4.1 even if there is no support for it. I.e.<br>
>> ARCH_X86_HAVE_SSE4_1 checks were dropped - very bad idea, please<br>
>> don't.<br>
><br>
><br>
> mesa seems always check for SSE4.1 support before using any of sse4.1<br>
> functions, if you are talking about compiler support for sse4.1, the<br>
> toolchain used in android should always support this. I only changed that<br>
> into always generate sse4.1 and rely on those runtion checks to avoid issues<br>
> on system without sse4.1 support, do you think this is a issue?<br>
><br>
</div></div>I'm thinking about a few things here:<br>
 - If someone is to have a hacked kernel which always advertises<br>
SSE4.1, even if it's not done natively but via emulation.<br>
Thus the actual usefulness of these codepaths will be... limited.<br>
 - The patch removes what seems to me a good approach only to replace<br>
it with a hacky version - the x86/x86-64 specific flags.<br></blockquote><div><br></div><div>If someone were go to such length as to faking CPUID results, there is really nothing we can do to stop them. The issue with</div><div>original flag is that it makes this feature test solely in build time, when that flag is defined, it add -msse4.1 globally. but if undefined, we're </div><div>crippling users that do have SSE4.1 support. And I think this is the same behavior as with autoconf builds, where USE_SSE41 is defined </div><div>if the compiler supports it. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span class="">
>>  - Adds separate (x86 and x86-64) SSE4.1 flags and libraries - not<br>
>> needed afaict, drop ?<br>
><br>
><br>
> I'm trying to avoid not breaking non-x86 builds.  this  is to seems better<br>
> than to surround them in a if clause. especially if we're to add flags for<br>
> other architectures.<br>
><br>
</span>The non-x86 build(s) end up broken because the ARCH_X86_HAVE_SSE4_1<br>
check was dropped. Please keep that one and then you won't need this<br>
workaround.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<span class=""><br>
>>  - Has some trailing '\' in which should cause build warning/errors -<br>
>> see comments below<br>
>>  - Gets "asm" building when host_arch != target_arch - have you guys<br>
>> tested it. what is the perf. improvement ? [patch 3]<br>
><br>
><br>
> No, we have not. We're trying to be in line to other platforms.<br>
><br>
</span>Although very admirable that you want to keep things in sync with the<br>
autoconf build, please don't add code that hasn't been tested.<br>
Note: this isn't that strict of a rule about the Android build<br>
although the asm code is very picky/fragile. I'm trying to avoid very<br>
nasty/subtle explosions.<br></blockquote><div><br></div><div>Agreed</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Thanks<br>
Emil<br>
<span class=""><br>
--<br>
You received this message because you are subscribed to the Google Groups "Android-x86 development" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:android-x86-devel%2Bunsubscribe@googlegroups.com">android-x86-devel+unsubscribe@googlegroups.com</a>.<br>
To post to this group, send email to <a href="mailto:android-x86-devel@googlegroups.com">android-x86-devel@googlegroups.com</a>.<br>
</span>To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/android-x86-devel/CACvgo53V-qWc6rftqqRBx2_zL6p6W-UTSP9YvT-ynFc2uXf19g%40mail.gmail.com" rel="noreferrer" target="_blank">https://groups.google.com/d/msgid/android-x86-devel/CACvgo53V-qWc6rftqqRBx2_zL6p6W-UTSP9YvT-ynFc2uXf19g%40mail.gmail.com</a>.<br>
<div class=""><div class="h5">For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" target="_blank">https://groups.google.com/d/optout</a>.<br>
</div></div></blockquote></div><br></div></div>