This is an archive of the discontinued LLVM Phabricator instance.

Remove usage of GCC intrinsic and fix bug in alignment computation.
ClosedPublic

Authored by zturner on Jun 24 2014, 5:46 PM.

Details

Summary

GCC intrinsics are not available on all compilers, so this converts the usage of __builtin_ffs() to a portable equivalent.

This also seemingly fixes a bug in this code, as __builtin_ffs returns the 1-based index of least-significant 1-bit, but Section::Section() expects the log_2 alignment, which is the 0-based index of the least-significant 1-bit.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner updated this revision to Diff 10815.Jun 24 2014, 5:46 PM
zturner retitled this revision from to Remove usage of GCC intrinsic and fix bug in alignment computation..
zturner updated this object.
zturner edited the test plan for this revision. (Show Details)
zturner added a subscriber: Unknown Object (MLST).
zturner closed this revision.Jun 24 2014, 10:50 PM
zturner updated this revision to Diff 10817.

Closed by commit rL211669 (authored by @zturner).