This is an archive of the discontinued LLVM Phabricator instance.

[Builtins] Fix div0 error in udivsi3
ClosedPublic

Authored by weimingz on Apr 5 2017, 10:11 AM.

Diff Detail

Event Timeline

weimingz created this revision.Apr 5 2017, 10:11 AM
compnerd requested changes to this revision.Apr 5 2017, 10:17 AM
compnerd added inline comments.
lib/builtins/arm/udivsi3.S
198

Why r6 and not r7? That would be the FP, and saving that makes stack walking better.

This revision now requires changes to proceed.Apr 5 2017, 10:17 AM
weimingz updated this revision to Diff 94265.Apr 5 2017, 11:23 AM
weimingz edited edge metadata.

I think the r7 (fp) was not set to initial SP, so it won't matter for stack-based unwinding. Anyway, use r7 now.

weimingz updated this revision to Diff 94270.Apr 5 2017, 12:29 PM

move up the "divby0" block for the case with HW div to make the code easier to read.

compnerd accepted this revision.Apr 5 2017, 8:04 PM
This revision is now accepted and ready to land.Apr 5 2017, 8:04 PM
This revision was automatically updated to reflect the committed changes.