[fpc-devel] Review of AVR patch for bug 31925

Christo christo.crause at gmail.com
Wed Sep 20 08:06:40 CEST 2017


I have made an attempt at fixing an AVR related bug.  Since this is my
first attempt at messing with the compiler, I would like a review and
critique of my attempt.

The bug seems to be caused by the absence of the MUL instruction for
the limited AVR subarchitectures (avr1 - avr35). As far as I could see
there is no fallback code for the case where CPUAVR_HAS_MUL is not
defined for an 8 bit MUL operation.  I have copied the code for the
corresponding 16 bit MUL branch, then copied and adapted the pascal
code for fpc_mul_xxx etc in rtl/inc/generic.inc and added declarations
to rtl/inc/generic.inc.

Can anyone see any problems with this approach, or perhaps suggest a
better approach to fix this bug?

Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug31925.patch
Type: text/x-patch
Size: 7130 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20170920/da4fbd44/attachment.bin>


More information about the fpc-devel mailing list