From: "John Gilmore" <jwgli...@gmail.com> Sent: Tuesday, 28 August 2012 1:19 AM
Register contents that are a multiple of 4 are all of the form xxxxx...xx00 Inclusive ORing such a value with the mask 11111...1100 and testing the result for equality with this same mask then yields a simple, low-overhead test for a multiple-of-four value.
It's sufficient to test for the low-order 2 bits being zero.