From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A017A385BF9E; Fri, 26 Mar 2021 11:23:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A017A385BF9E From: "rearnsha at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99773] ARM v8.1-m MVE interaction with -mfloat-abi not clear Date: Fri, 26 Mar 2021 11:23:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rearnsha at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2021 11:23:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99773 --- Comment #4 from Richard Earnshaw --- (In reply to Christophe Lyon from comment #3) > I tried changing TARGET_HARD_FLOAT_SUB in arm.h to: > #define TARGET_HARD_FLOAT_SUB (arm_float_abi !=3D ARM_FLOAT_ABI_SOFT = \ > && (bitmap_bit_p (arm_active_target.isa,= \ > isa_bit_vfpv2) \ > || bitmap_bit_p (arm_active_target.is= a, \ > isa_bit_mve)) \ > && TARGET_32BIT) >=20 > but that has other implications, like enabing VFP patterns: for instance > mulsf3_vfp becomes enabled, leading to a failure when builing libgcc > (vmul.f32 is generated for powisf2, but rejected by the assembler) >=20 > So maybe we just change the condition to emit the attributes in > arm_file_start? >=20 > Something like: > if (! TARGET_SOFT_FLOAT || TARGET_HAVE_MVE) > { > if ((TARGET_HARD_FLOAT && TARGET_VFP_SINGLE) || TARGET_HAVE_MVE) > arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1); >=20 > if (TARGET_HARD_FLOAT_ABI || TARGET_HAVE_MVE) > arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1); > } >=20 It doesn't look right, either. Why would you want to set Tag_ABI_HardFP_us= e to 1 when there's no single-precision only FPU present? Untested, but I think something like if (TARGET_HARD_FLOAT && TARGET_VFP_SINGLE) arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1); if (TARGET_HARD_FLOAT_ABI) arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1); is probably the right solution, removing the ! TARGET_SOFT_FLOAT entirely.=