[Bug target/110217] [avr] SREG: use BSET and BCLR instead of load/modify/write

2023-07-12 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110217 --- Comment #4 from Georg-Johann Lay --- At least CLI / SBI won't glitch at O0, same for ATOMIC_BLOCK. For SBI et al. you are right, they rely on insn combine. The right approach would have been compiler built-ins or API using inline asm. But

[Bug target/110217] [avr] SREG: use BSET and BCLR instead of load/modify/write

2023-07-12 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110217 --- Comment #3 from Georg-Johann Lay --- At least CLI / SBI won't glitch at O0, same for ATOMIC_BLOCK. For SBI et al. you are right, they rely on insn combine. The right approach would have been compiler built-ins or API using inline asm. But

[Bug target/110217] [avr] SREG: use BSET and BCLR instead of load/modify/write

2023-07-10 Thread mx682x at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110217 --- Comment #2 from mx682x at gmail dot com --- I see, thank you for you input. > Apart from that, the proposed patch won't work for indirect addressing, or > when the compiler is turning direct addresses to indirect addresses (using > CSE etc,

[Bug target/110217] [avr] SREG: use BSET and BCLR instead of load/modify/write

2023-06-30 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110217 Georg-Johann Lay changed: What|Removed |Added Severity|normal |enhancement --- Comment #1 from