Calculate instruction length.