public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/104988] New: Zero register (R1) clobbered by __udivmodsi4 for AVR
@ 2022-03-19 23:28 dv at vollmann dot ch
2022-03-19 23:54 ` [Bug target/104988] " dv at vollmann dot ch
2022-04-03 19:21 ` gjl at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: dv at vollmann dot ch @ 2022-03-19 23:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104988
Bug ID: 104988
Summary: Zero register (R1) clobbered by __udivmodsi4 for AVR
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: dv at vollmann dot ch
CC: dv at vollmann dot ch
Target Milestone: ---
Created attachment 52652
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52652&action=edit
compiler configuration
Line 1630 in libgcc/config/avr/lib1funcs.S defined r_cnt as __zero_reg__ and
uses it as loop count, i.e. it sets it to a non-zero value.
This is fine if the loop reaches its end, but causes chaos if there's an
interrupt before the loop end.
__zero_reg__ should never be set to a non-zero value!
Looking through the file there seem to be a number of other places where
__zero_reg__ is modified.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-03 19:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-19 23:28 [Bug libgcc/104988] New: Zero register (R1) clobbered by __udivmodsi4 for AVR dv at vollmann dot ch
2022-03-19 23:54 ` [Bug target/104988] " dv at vollmann dot ch
2022-04-03 19:21 ` gjl at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).