]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[APX] Adjust target-support check [PR 115341]
authorHongyu Wang <hongyu.wang@intel.com>
Thu, 6 Jun 2024 05:00:26 +0000 (13:00 +0800)
committerHongyu Wang <hongyu.wang@intel.com>
Thu, 6 Jun 2024 07:28:12 +0000 (15:28 +0800)
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 all apx subfeatures.

gcc/testsuite/ChangeLog:

PR target/115341
* lib/target-supports.exp (check_effective_target_apxf):
Check for all apx sub-features.

gcc/testsuite/lib/target-supports.exp

index 4766104c6d80331ac5a3703e2f5d8b9c8f6b2b78..5c0a3dade222777402d2a44e63cb5be305341471 100644 (file)
@@ -10451,7 +10451,13 @@ proc check_effective_target_apxf { } {
        void
        foo ()
        {
-         __asm__ volatile ("add\t%%r16, %%r31" ::);
+         __asm__ volatile ("movq\t%r16, %rax");
+         __asm__ volatile ("push2p\t%r15, %r14");
+         __asm__ volatile ("addq\t%r16, %r31, %r17");
+         __asm__ volatile ("{nf} addq\t%r16, %r31");
+         __asm__ volatile ("setzule\t%al");
+         __asm__ volatile ("cfcmoveq\t%r16, %r31");
+         __asm__ volatile ("ccmpleq\t{dfv=sf} %r16, %r31");
        }
     } "-mapxf" ]
 }