You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using libgcc, which as far as I remember, does have the __divmoddi4 symbol.
AVR-GCC/avr-libc has special cases to the calling convention for certain arithmetic routines that require special lowering to match the custom calling convention.
The AVR LLVM backend will always emit these special calls to __divmod..., making it incompatible with compiler-rt. This affects runtime library calls to some division and multiplication routines.
Ideally, compiler-rt proper would be extended to support AVR, and then the AVR backend could be taught to ignore the ABI special cases when compiler-rt is linked. It's been a while since I last looked at it, but I seem to recall compiler-rt missing some AVR libgcc routines that are used by avr-gcc and correspondingly, AVR-LLVM. I'm pretty sure the __divmod* family of functions for small integer types were the problem, as compiler-rt didn't seem to cater for esoteric targets like AVR that have limited or a complete lack of multiplication/division hardware support.
Hi,
I got a problem when I run
avr-lit --llvm-sysroot /work/llvm-build
.It seems that libgcc doesn't have the function
__divmoddi4
. But LLVM will lower i64 sdivrem to libcall__divmoddi4
. Are you use libgcc or compiler-rt?Thank you.
The text was updated successfully, but these errors were encountered: