On Tue, Apr 14, 2020 at 07:27:43PM +0300, Dmitry Osipenko wrote: > 14.04.2020 18:45, Thierry Reding пишет: > ... > >> What about to try to replace this massive egyptian construction with a > >> single "u32 val;" ? > > > > I actually tried that after condensing what this used to look like into > > the above. The result was a huge failure because some of these temporary > > values end up being reused, so I ended up writing bogus values into some > > of these registers. > > It should be fine to keep those variables that are getting re-used. It > looks like there are much more variables that are never re-used, and > thus, they could be replaced. Okay, I made another pass over it and it looks slightly better now. I've kept a couple of the "option"-type variables that are constant but in my opinion make the code more readable compared to hard-coding them. In the cases where I kept them, I declared them constants, so the compiler will hopefully be able to optimize the code and their purpose should also be clearer. Thierry
Attachment:
signature.asc
Description: PGP signature