> On Sep 16, 2021, at 9:56 AM, Jakub Jelinek <[email protected]> wrote:
>
> On Thu, Sep 16, 2021 at 02:49:23PM +0000, Qing Zhao wrote:
>>> Testing for many instructions is always very fragile and dependent on exact
>>> compiler flags etc.
>>
>> Yes, It’s indeed very fragile.
>>> So, either the test should have a particular
>>> -march=/-mtune= options
>>
>> I might add specific -march to the testing cases.
>
> Even -mtune= is needed if you want to stay safe, otherwise people testing
> with --target_board=unix/-mtune=cascadelake (or whatever else) might get
> failures.
Okay. Will try this.
>
>>> and ideally also -fno-stack-protector
>>> -fno-stack-clash-protection etc.
>>
>> Could you explain a little bit on this why?
>
> In case people test e.g. with --target_board=unix/\{,-fstack-protector-all\}
> etc. (e.g. in Fedora/RHEL we do).
> For the RTL scanning checks if they are done fairly early, those options
> might not change anything, but with the ones scanning in the assembly,
> one needs to watch if those options don't add e.g. in the prologue or
> epilogue further copies of the instructions you scan for.
I see.
Thank you.
Qing
>
> Jakub
>