This is an archive of the discontinued LLVM Phabricator instance.

[Bultin][ARM] Make aeabi_uldivmod and aeabi_ldivmod be Thumb1 compatible
ClosedPublic

Authored by weimingz on Jan 27 2017, 10:59 AM.

Details

Summary

in aeabi_ldivmod and uldivmod, using r6 instead of r12 as the temp reg due to limitation of Thumb1 ISA.
Now, all EABI sources are Thumb1 compatible.

Also added test cases by reusing the test cases from divmodsi4_test.c, udivmodsi4_test and udivmoddi4_test.c

Diff Detail

Repository
rL LLVM

Event Timeline

weimingz created this revision.Jan 27 2017, 10:59 AM
rengolin added inline comments.Jan 27 2017, 12:16 PM
lib/builtins/arm/aeabi_ldivmod.S
31 ↗(On Diff #86078)

This encoding only works in ARMv6+ (A8.8.103).

In ARMv4T you must use movs between two low regs.

weimingz added inline comments.Jan 27 2017, 2:22 PM
lib/builtins/arm/aeabi_ldivmod.S
31 ↗(On Diff #86078)

Good catch!

rengolin accepted this revision.Jan 30 2017, 4:52 AM

LGTM. Thanks!

This revision is now accepted and ready to land.Jan 30 2017, 4:52 AM
This revision was automatically updated to reflect the committed changes.
compiler-rt/trunk/test/builtins/Unit/arm/aeabi_uidivmod_test.c