https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110217
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=55306&action=edit
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 &= 0x80 (or ~0x80) or similr. Right now, all
versions, as far as I know, are using in/andi(ori)/out instructions to change
the SREG.