From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 423753858D32; Mon, 12 Jun 2023 09:23:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 423753858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686561783; bh=tspVusbVP/Md4sKo58dE3Ni7+d/5HQJH9gF1lMy2OmI=; h=From:To:Subject:Date:From; b=ZzJbhq3vJEgdutckdKunO48qQu0M3dGZFPeIkC4IqkhQDYb28j+vDVcILK3mJUNiq Y7ogWvn9c10UHVo9UZ/Qmg6a2l2zPrvMXZdmZCtfHKg+z7iTVf4XwFX04OW+VHpxI5 vRKtRfHqiTGjU0Fzsy1JQAXtFUj5llG5XPcbgMC4= From: "mx682x at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110217] New: [avr] SREG: use BSET and BCLR instead of load/modify/write Date: Mon, 12 Jun 2023 09:23:02 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mx682x at gmail dot com 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 bug_severity priority component assigned_to reporter target_milestone 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=3D110217 Bug ID: 110217 Summary: [avr] SREG: use BSET and BCLR instead of load/modify/write Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: mx682x at gmail dot com Target Milestone: --- Created attachment 55306 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55306&action=3Dedit patch file for gcc 13.1 Hello. I'd like to suggest a patch that makes the compiler use bset and bclr instructions when doing SREG &=3D 0x80 (or ~0x80) or similr. Right now, all versions, as far as I know, are using in/andi(ori)/out instructions to chan= ge the SREG.=