From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C6CE43858D33; Fri, 6 Jan 2023 11:23:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C6CE43858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673004227; bh=PPsuJQBKKHVCb82UwQTQ1Y7A1ftK9/pFTzWDYa8C1X4=; h=From:To:Subject:Date:From; b=e2vBInO1uDcLSy7HlHy+3/JzR3UXLDYCRevhmQh3bYnx4UYJRZ6u1WW+avn6Msn5Z w3YniE54OmL5uUMUbCMVbiLeA15HBSKhiQUTw9CAdkKehbAEyhbnJT7UH7s0YN/5/s IbzTNnhwKWeLe8r6CjX4S7/eClYUkPif36OrVdbY= From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108315] New: -mcpu=power10 changes ABI Date: Fri, 06 Jan 2023 11:23:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ABI, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amonakov 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone cf_gcctarget attachments.created Message-ID: 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=3D108315 Bug ID: 108315 Summary: -mcpu=3Dpower10 changes ABI Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ABI, wrong-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: amonakov at gcc dot gnu.org Target Milestone: --- Target: powerpc64le-*-* Created attachment 54202 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54202&action=3Dedit testcase At least the documentation should mention that if intentional. In the attached example, the function bar is compiled to bar: .localentry bar,1 mtctr 3 mr 12,3 bctr .long 0 .byte 0,0,0,0,0,0,0,0 i.e. it does not preserve r2 (it's compiled with -mcpu=3Dpower10). If the c= aller is not compiled with -mcpu=3Dpower10, it needs r2 preserved (bar has a localentry, so the nop in the caller stays a nop after linking). I verified the testcase misbehaves on Compile Farm's gcc135: as it does not= use any power10-specific instructions, it's runnable there.=