diff mbox series

[APX] Adjust target-support check [PR 115341]

Message ID 20240606063904.89249-1-hongyu.wang@intel.com
State New
Headers show
Series [APX] Adjust target-support check [PR 115341] | expand

Commit Message

Hongyu Wang June 6, 2024, 6:39 a.m. UTC
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(-)

Comments

Hongtao Liu June 6, 2024, 6:58 a.m. UTC | #1
On Thu, Jun 6, 2024 at 2:39 PM Hongyu Wang <hongyu.wang@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
>
diff mbox series

Patch

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");
 	}
     } "-mapxf" ]
 }