The bit shift isn't needed... I've been using that hook code on xbox 360 for ages now, and it works as-is (like I said, reliable.) But yeah, they basically re-use the &3 bits for flags in some instructions because of 4 byte alignment for instructions.
notice...
range 0-0x1FFFFFC (0x3FFFFFC sign extended, negative bit 0x2000000) link bit 0x1
A DWORD/u32 is unsigned, subtraction of two u32 when the value being subtracted is greater than the value being subtracted from is by no means guaranteed to give you a value that can just be stuffed into the sign extend mask. Notice the dest/cur are reversed in subtraction of the backwards branch vs. the forward branch, this is to ensure a positive value as a result (instead of using int and a bunch of casting), which gets or'd with the bit that indicates negative/sign extend. To make this function totally safe/complete it really should have a range check before assembling the instruction, but in the case of a bootloader or something, you should know before using it if it will be effective as there are really no feed back mechanisms other than <crash><unplug from wall>.
Anyway, do what you want with the code. I posted it because I use it regularly and know absolutely it is reliable. About the most you'll get me to agree to is that the mask can be simplified from 0x3f to 0x1f.
edit:
bonus round... in a 32bit address system, is 0x80000000 address negative zero, or what? xD (it's much more work to mask that bit out and convert to int than to just deal with it as a pair of positive u32)