From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ADA51385734F; Tue, 4 Jul 2023 16:18:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADA51385734F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1688487539; bh=S2pBUPZpCyTowynkJ3fv0rmfvKhg5p2M926nmmyYGdc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OaDeK7N1k5U1p7W61b1ohUbG4hTXgqzRlELcsL1xsQ5Hb+ParzG55iV47FZLOt42U 7/mamiwxZNk3iyyQIiKN4NLWFq1rJ0QGZ3xxL1wzX6kMXOvIYaFoK/SvSeyHGcFosz i7FyZPbdBn+u14keN2veOPZ7Nlc/9onH6KkR1FZQ= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106895] powerpc64 unable to specify even/odd register pairs in extended inline asm Date: Tue, 04 Jul 2023 16:18:58 +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: 12.2.0 X-Bugzilla-Keywords: inline-asm X-Bugzilla-Severity: enhancement X-Bugzilla-Who: segher at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106895 --- Comment #8 from Segher Boessenkool --- (In reply to Peter Bergner from comment #6) > (In reply to Segher Boessenkool from comment #5) > > Constraints are completely the wrong tool for this. Just use modes, wh= ich > > *are* the right tool? >=20 > Well you cannot specify modes in the asm, so I think you're saying we need > use the correct type that maps to a internal to GCC mode that has the > even/odd register behavior, so something like: >=20 > unsigned int foo __attribute__ ((mode (XX))); >=20 > ...where XXmode is the new integer mode that gives us even/odd register > pairs? Of course we have to be careful about how this all works wrt -m32 > versus -m64. No, the type there is "unsigned int". I meant to say exactly what I did sa= y: just use modes. Which you indeed do in user code by the mode attribute, ye= s. And you do not need a new mode: PTImode should just work. But the user specifying that is currently broken it seems? Without -mpowerpc64 you cannot *have* 128-bit integers in registers. That should be fixed, but you cannot have it in just *two* registers, which is what is required here. For most targets that then means -m64 is required.=