[AVR] Do not use divmod calls for bigger integers
authorAyke van Laethem <aykevanlaethem@gmail.com>
Sat, 18 Apr 2020 21:42:48 +0000 (23:42 +0200)
committerAyke van Laethem <aykevanlaethem@gmail.com>
Mon, 20 Apr 2020 11:56:38 +0000 (13:56 +0200)
commit9505b5cb66856a53ef2416aaf65adc85d749fd42
tree7569512253471381fb42eee558cb04e006f9e987
parent76e0ab23f683693c05c5baa365365d7abb22d7c8
[AVR] Do not use divmod calls for bigger integers

The avr-libc provides *divmodqi4, *divmodhi4, and *divmodsi4 functions,
but does not provide a *divmoddi4. Instead it provides regular *divdi3
and *moddi3 functions.

Note that avr-libc doesn't support *divti3 or *modti3 for 128-bit
integer manipulation.

Source:
https://github.com/gcc-mirror/gcc/blob/releases/gcc-5.4.0/libgcc/config/avr/lib1funcs.S

Differential Revision: https://reviews.llvm.org/D78437
llvm/lib/Target/AVR/AVRISelLowering.cpp
llvm/test/CodeGen/AVR/div.ll