[mips] Define helper function searchRange

No functionality change.