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
My understanding is that there are no division hardware on the tkey, hence the compiler needs to issue calls to library functions for division operations. However, some (or all?) of those functions are missing, resulting in linker errors. (When compiling with gcc, those functions live in libgcc.{a,so}, but I don't have much clue about corresponding clang functions).
I can confirm that my code compiles fine with clang-16. But it is unclear to me if that means that division in general works, or if it's just division-by-constant that is improved. Looking at the generated code, I see no division instructions (obviously), and also no function calls, just a bunch of shift and mul.
So it would be good to verify that general division works for all supported integer sizes, before closing.
My understanding is that there are no division hardware on the tkey, hence the compiler needs to issue calls to library functions for division operations. However, some (or all?) of those functions are missing, resulting in linker errors. (When compiling with gcc, those functions live in libgcc.{a,so}, but I don't have much clue about corresponding clang functions).
I compile the below program as follows:
I would expect an implementation of __udivdi3 for this target to be included with clang, but if it is, for some reason it isn't found by the linker.
Example program (the use of volatile is just a hack to not get the interesting part all optimized away):
The text was updated successfully, but these errors were encountered: