On Thu, Jun 6, 2024 at 2:39 PM Hongyu Wang <hongyu.w...@intel.com> wrote:
>
> Current target apxf check does not specify sub-features that assembler
> supports, so the check with older binutils will fail at assemble stage
> for new apx features like NF,CCMP or CFCMOV. Adjust the assembler check
> for latest apx subfeatures.
>
> Bootstrapped & regtested on x86-64-pc-linux-gnu with binutils 2.42 branch.
> OK for trunk?
>
> gcc/testsuite/ChangeLog:
>
>         PR target/115341
>         * lib/target-supports.exp (check_effective_target_apxf):
>         Check for latest apx sub-features.
> ---
>  gcc/testsuite/lib/target-supports.exp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/lib/target-supports.exp 
> b/gcc/testsuite/lib/target-supports.exp
> index 4766104c6d8..6ae716de39d 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -10451,7 +10451,9 @@ proc check_effective_target_apxf { } {
>         void
>         foo ()
>         {
> -         __asm__ volatile ("add\t%%r16, %%r31" ::);
> +         __asm__ volatile ("{nf} add\t%r16, %r31");
> +         __asm__ volatile ("cfcmoveq\t%r16, %r31");
> +         __asm__ volatile ("ccmpleq\t{dfv=sf} %r16, %r31");
I think you can add instructions for each sub feature.
Ok with that change.
>         }
>      } "-mapxf" ]
>  }
> --
> 2.31.1
>


-- 
BR,
Hongtao

Reply via email to