https://gcc.gnu.org/g:4907b54ae3835d5cc70f7a0bfee18b8a5326da7d

commit r15-11308-g4907b54ae3835d5cc70f7a0bfee18b8a5326da7d
Author: Torbjörn SVENSSON <[email protected]>
Date:   Fri Apr 10 11:47:56 2026 +0200

    doc: testsuite: Simplify implementation and document arm_mixed_fp [PR113276]
    
    The documentation should have been part of r16-8549-g3d30fc2f73ccc1.
    
    gcc/ChangeLog:
    
            PR testsuite/113276
            * doc/sourcebuild.texi (arm_mixed_fp): Document.
    
    gcc/testsuite/ChangeLog:
    
            * lib/target-supports.exp (arm_mixed_fp): Simplify
            implementation.
    
    Signed-off-by: Torbjörn SVENSSON <[email protected]>
    (cherry picked from commit 113f406e521057894e4cd3af2355f814ad203e9a)

Diff:
---
 gcc/doc/sourcebuild.texi              | 5 +++++
 gcc/testsuite/lib/target-supports.exp | 7 +++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 12f418bba10c..456423e2a368 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2342,6 +2342,11 @@ ARM target supporting 
@code{-mbranch-protection=standard}.
 @item arm_pacbti_hw
 Test system supports for executing non nop pacbti instructions.
 
+@item arm_mixed_fp
+On Arm targets, true when the target uses hardware instructions for
+single-precision floatint-point values, but software emulation for
+double-precision values.
+
 @end table
 
 @subsubsection AArch64-specific attributes
diff --git a/gcc/testsuite/lib/target-supports.exp 
b/gcc/testsuite/lib/target-supports.exp
index 11f74e78f2fc..a0e4687b1754 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6193,10 +6193,9 @@ proc check_effective_target_arm_mixed_fp { } {
     }
 
     return [check_no_compiler_messages arm_mixed_fp assembly {
-       #ifndef __ARM_FP
-       # error __ARM_FP not defined
-       #elif ((__ARM_FP & 0xc) == 0xc)
-       # error __ARM_FP indicates that both single- and double-precision FP 
are supported
+       // Mixed FP means we have hw FP, but only for SFmode (ignores HFmode)
+       #if !defined(__ARM_FP) || ((__ARM_FP & 0xc) != 0x4)
+       #error Not mixed FP
        #endif
        int main (void) { return 0; }
     } "" ]

Reply via email to