eclipse / omr

Eclipse OMR™ Cross platform components for building reliable, high performance language runtimes
http://www.eclipse.org/omr
Other
933 stars 392 forks source link

Define isPowerOf2 utility methods for unsigned #7377

Open hzongaro opened 2 weeks ago

hzongaro commented 2 weeks ago

There are isPowerOf2 methods defined in Bit.hpp for int32_t and int64_t values. This change defines new isPowerOf2 methods for values of type uint32_t and uint64_t.

Also added Doxygen comments for the various isPowerOf2 methods.

This change doesn't introduce any uses of these methods in OMR, but I will be able to take advantage of them in a downstream project.