This patch adds support for the following 32-bit shift builtins:
They are needed on architectures that do not have a 32-bit shift instruction, such as AVR.
Note: this patch depends on D78662.
aykevl on Apr 22 2020, 12:17 PM.Authored by
Shall we factor out the common part of lshrti3.c and lshrdi3.c and place that in an .inc file? We can thus avoid duplication.
I believe that addresses all review comments.
I'm not so sure about moving to an array of arrays. Coming from a Go background I'm used to this pattern (called "table driven tests") and I normally prefer it, but this pattern is rarely used in compiler-rt builtin tests and in particular is not used in the 64-bit versions of these tests (from which the 32-bit tests were derived: they are essentially the same tests but with shortened inputs).
A bit of comment fine-tuning. :)
UPD: Hmm, trivial "suggested changes" without any comment attached are rendered as a completely empty entries here (they are shown OK inline)...
Thanks @aykevl! This could be useful for MSP430 as well. Especially, the tests would be worth reusing even for target-specific assembly re-implementation of these routines.
Another bit of "non functional" comments.