[fpc-devel] Review of AVR patch for bug 31925
Christo
christo.crause at gmail.com
Fri Sep 22 07:10:05 CEST 2017
On Wed, 2017-09-20 at 12:36 +0200, Karoly Balogh (Charlie/SGR) wrote:
> Few things I see: I wouldn't do IFDEF CPUAVR in inc/generic and
> inc/compproc. Use maybe IFDEF CPU8 and/or CPU16 instead. This code is
> indeed generic, and will be useful on other limited CPU archs as
> well. Or
> just follow the structure of other MUL helpers, and don't ifdef based
> on
> the CPU width at all. The linker will (should) optimize away this
> code on
> architectures where it is unnecessary.
>
> Also, instead of copypasting the helper function call code, I'd think
> about generalizing it, and extracting it to a private method of
> tcgavr,
> but as I'm not the maintainer of the AVR cg, i'm not sure this is
> what
> they would want there. :)
Thanks for the suggestions Karoly. I will remove the ifdefs, this makes
the code a bit cleaner. I don't understand the details of tcg(avr) so
it would be challenging for me to try refactoring code.
More information about the fpc-devel
mailing list